Messages in this thread | | | Date | Tue, 13 Apr 1999 07:57:46 -0600 | From | "Susan E. Wiig" <> | Subject | Re: Low-level format with Sg drivers |
| |
Douglas Gilbert wrote: > > Susan E. Wiig wrote: > > > > Has anyone out there ever done a low level format using the generic scsi > > drivers. Why I ask is when I do it the write sends out the command to > > the drive, a Zip drive in this case, and the drive goes off and happily > > starts to do the low level format but it comes back too soon. It then > > does the read but there is a sense error. The sense error I get is > > Medium Error, Not ready to ready transition ( medium may have > > changed). I know the commands I send to the drive are correct, in fact > > I have looked them up in the Zip specs. > > > > Could there be some type of signal that is causing the low-level > > formatting to be ending to soon, or is there some signal I should send > > between the write and the read in the scsi call? > > > > I am at a loss. > > Susan, > I have not tried a low level format (by which I assume you mean the > SCSI command FORMAT UNIT). One thing to look out for would be the > default 60 second timeout. From your error message from the sense > buffer that doesn't seem to be your problem. Typically the SCSI > command you execute after closing the door on the removable media > will get the "not ready to ready transition" error. The usual > response is to try it again. But if this was the case it should be > reported pretty well immediately. > > If there is a timeout after 60 seconds then I would expect the > 'host_status' to be set to DID_TIME_OUT (0x03). Could it be > possible a timeout occurred and the sense_buffer already had > that data in it from an earlier command? > > The default timeout can be elongated by the SG_SET_TIMEOUT > ioctl. > > Doug Gilbert Doug
Actually when I checked again the sense buffer from the read right after the low-level format quit was Unit Attention, Data Path Failure (Should use 40 NN). I haven't figured out what 40 NN is yet. I guess this message may not be surprising since I just did a low level format on the disk. Maybe things get lost between the write and the read.
Your idea about the timeout is worth a try. I am also going to try an ioctl call to the sd* driver and see if that works.
Let you know what happens. Susan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |