From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,48929bc11b4b5b10 X-Google-Attributes: gid1164f8,public From: wilson@dbit.com (John Wilson) Subject: Re: SCSI Device Driver Date: 1998/11/06 Message-ID: <36438a2e.0@news.wizvax.net>#1/1 X-Deja-AN: 409197323 References: <71smj1$mmt$1@nnrp1.dejanews.com> X-Trace: 6 Nov 1998 18:45:50 -0500, dbit.dbit.com Organization: D Bit, Troy, NY Newsgroups: comp.sys.dec In article <71smj1$mmt$1@nnrp1.dejanews.com>, wrote: >I have a MSCP driver that talks to a SCSI SQ739 Dilog controller that has a >Zip unit attached. I'm trying to fix a bug in the driver where by it will >alert the user if some tries to read/write to Zip unit if there is no disk in >the drive. I've added a function that will get the unit status of the zip >drive. However, every time I post the "get unit status" to the controller, it >hang the machine and I have to reboot to get control again. This only occurs >is there is no disk in the drive. If there is a disk in the drive, the "get >unit status" command works fine and does not hang the machine. Does anyone >have any ideas what I maybe doing wrong here??? I've tried the "avail >command" but it does not give me the correct status if there is no disk in >the drive.... This is probably a pointless idea, but does the behavior change depending on whether you've enabled unit attentions? At least that gives the controller something to do with a disk changes, maybe it'll get you through a different code path in the firmware and get better behavior. Although, CMD controllers don't poll the SCSI device so the attention is delayed until the next attempt to do I/O on the device, dunno if Dilog is the same. If this is on a PDP-11, DUTEST might be a handy way to poke around the controller instead of having to get carried away instrumenting your driver. http://www.dbit.com/pub/pdp11/rt11/dutest.mac. It can be loaded by RT-11, but it's a stand-alone program so you can use something else instead (like the RSTS INIT.SYS "LOAD" command) as long as it comes up in kernel mode, and it has a simple command language that allows building and queueing command packets and reading response packets. John Wilson D Bit