Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!mattd From: mattd@Apple.COM (Matt Deatherage) Newsgroups: comp.sys.apple Subject: Re: Removable Hard Drives Message-ID: <36632@apple.Apple.COM> Date: 19 Nov 89 19:00:29 GMT Organization: Apple Computer Inc, Cupertino, CA Lines: 63 unknown@ucscb.UCSC.EDU (The Unknown User) writes: > > Well, the engineer explained it all to me, although I've forgotten >much of it now, so the following simple explanation is probably wrong in >many respects. At AppleFest, the drive could only give back one of four >responses if access is made. Of those four, only an I/O error was appropriate >when a cartridge was taken out (under any circumstances from what I >remember). He showed me what happened under System 5.0. It just opened >a window with 0 items if you took out the cartridge and still tried to open >the device. He said that he was working on a SMARTPORT version of the >cartridge drive which would be much more intelligent and allow on-line >dismounting of cartridges (thus I could do what I want to do!).. > >unknown@ucscb.ucsc.edu [lots of stuff deleted to save bandwidth] Unless CMS supplies a GS/OS loaded driver for their card, which they currently do not, they get a generated driver (GS/OS makes one up for them). They ge the highest level of generated driver they can (if their card supports Extended SmartPort, they get that; else they get SmartPort, or if they don't support that, they get ProDOS Block Device). A ProDOS Block Device has four possible return values when called. They are, (without numerical equivalents): * No Device Connected * I/O error * Write Protected * Device off-line It is the fourth code that should be returned for a removable system to let GS/OS know the device exists but there's no media in it. That's how the 3.5" drives work. That's how the CD-ROM works (and it's SCSI). That's how every removable device works. If they didn't return "device off-line", I can imagine they were having some problems. The SCSI Manager also allows for removable devices (obviously, since the CD-ROM works with it just fine). However, when the Manager makes a SCSI call to see if the device is removable [Note: I'm just guessing here; I know it figures out somehow that devices are removable and I seem to remember some kind of SCSI inquiry that allows this determination], they have to respond correctly. During development of 5.0, we had problems with some hard drives not working with the SCSI Manager; it turned out that the drives in question wer responding to SCSI inquiries with totally bogus values (such as "I don't support reading or writing"). The Manager has to assume a basic set of characteristics (like all devices must be read-enabled) for GS/OS to work, so that's what it does. If this removable drive returns bogus SCSI values, then the Manager probably assumes a default set of characteristics, including the (likely) chance that it is not removable. I've seen removable hard drives work with 5.0's SCSI Manager in our lab. I know it's possible. -- ----------------------------------------------------------------------------- Matt Deatherage, Apple Computer, Inc. | "The opinions expressed in this tome Send PERSONAL mail ONLY (please) to: | should not be construed to imply that Amer. Online: Matt DTS | Apple Computer, Inc., or any of its ThisNet: mattd@apple.com | subsidiaries, in whole or in part, ThatNet: (stuff)!ames!apple!mattd | have any opinion on any subject." Other mail by request only, please. | "So there." -----------------------------------------------------------------------------