*BSD News Article 9992


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA6936 ; Fri, 15 Jan 93 10:39:31 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!agate!tfs.com!tfs.com!julian
From: julian@tfs.com (Julian Elischer)
Subject: Re: Help: Toshiba CDROM
Message-ID: <1993Jan17.065606.11199@tfs.com>
Organization: TRW Financial Systems
References: <51495@shamash.cdc.com> <uufs2ug@zuni.esd.sgi.com>
Date: Sun, 17 Jan 1993 06:56:06 GMT
Lines: 69

In article <uufs2ug@zuni.esd.sgi.com> olson@anchor.esd.sgi.com (Dave Olson) writes:
>In <51495@shamash.cdc.com> pbd@runyon.cim.cdc.com (Paul Dokas) writes:
>
>| I've got access to a Toshiba CDROM (from an SGI box) here at work that 
>| I'd like to hook up to my 386BSD system, but I'm having some problems.
>| When I boot with the CDROM hung off of my Adaptec 1542B using Julian's
>| SCSI drivers I get the following:
>| 
>| Jan 15 13:28:59 stimpy /386bsd: pc0<color> at 0x60 irq 1 on isa
>| Jan 15 13:29:00 stimpy /386bsd: com1 at 0x3e8 irq 4 on isa
>| Jan 15 13:29:00 stimpy /386bsd: com2 fifo at 0x2e8 irq 3 on isa
>| Jan 15 13:29:00 stimpy /386bsd: wd0 0:<Maxtor 7213 AT> at 0x1f0 irq 14 on isa
>| Jan 15 13:29:00 stimpy /386bsd: fd0 drives 0: 1.2M, 1: 1.44M at 0x3f0 irq 6 drq 2 on isa
>| Jan 15 13:29:00 stimpy /386bsd: aha0 reading board settings, 200 nSEC ok, use 250 nSEC
>| Jan 15 13:29:00 stimpy /386bsd:   **aha0 probing for scsi devices**
>| Jan 15 13:29:00 stimpy /386bsd:   dev4,lu0: type 0(direct),fixed 'TOSHIBA CD-ROM DRIVE:XM 1971' scsi2
>
>This is because the drive lies, and claims to be a hard disk to work
>with our older systems brain dead PROMs (well, it seemed reasonable
>to require that bootable devices be a hard disk or a tape at one point...)
>That probably confused the code later on.  You can 'fix' this by
>modifying the driver to send the 10 byte command 0xc9 followed by
>9 0's if it sees that inquiry command.  Then it will claim to be
>a CD-ROM with removable media.  That lasts until the drive is
>power cycled, or a SCSI bus reset occurs.
>
>| Jan 15 13:29:01 stimpy /386bsd: sd0: illegal request
>| Jan 15 13:29:01 stimpy /386bsd:  could not mode sense (4) for unit 0
>| Jan 15 13:29:01 stimpy /386bsd:         sd0: 0MB, cyls 0, heads 0, secs 0, bytes/sec 0
>
>The stupid drive (like many CD-ROM drives) doesn't support modesense
>page 3 or 4.  Presumably the driver does this only for hard disks,
>and not CD-ROMs, so the fix above should take care of this.

There is actually a clean fix..
you can add an identification line in the file scsiconf.c
that contains strings that will match this drive,
but will attach it to the cd subdriver..
There is a 'sample' line that matches a MAXTOR hard disk.
use it as a pattern, but make sure that the order in the array
is right, or you will redirect all hard disks to the 
cdrom driver.

there is an array of structs, each of which is matched against the
returned data from the inquire command. One of the fields
is the attach routines to call if that structure is the 
'closest match' to the device. (as I said above, watch out for
order, because this will match any hard disk as well as
the default hard disk matching line).

This is exactly the reason for this..
 If the drive will not act as a cdrom, then you may have SOME problems
 but you may be able to add the command given above to
 the cdrom attach routine to make it behave.

>
>--
>Let no one tell me that silence gives consent,  |   Dave Olson
>because whoever is silent dissents.             |   Silicon Graphics, Inc.
>    Maria Isabel Barreno                        |   olson@sgi.com


+----------------------------------+       ______ _  __
|   __--_|\  Julian Elischer       |       \     U \/ / On assignment
|  /       \ julian@tfs.com        +------>x   USA    \ in a very strange
| (   OZ    ) 2118 Milvia st. Berkeley CA. \___   ___ | country !
+- X_.---._/  USA+(510) 704-3137(wk)           \_/   \\            
          v