lkml.org 
[lkml]   [1999]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Low-level format with Sg drivers
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

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.139 / U:5.996 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site