Re: Low-level format with Sg drivers

Gilbert, Douglas (douglas.gilbert@rbcds.com)
Wed, 14 Apr 1999 16:06:27 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BE86B2.47941E04
Content-Type: text/plain;
charset="ISO-8859-1"

David Miller wrote:

>> Douglas Gilbert wrote:
>> >
>> > The default timeout can be elongated by the SG_SET_TIMEOUT
>> > ioctl.
>> 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.
>
> While we're on the subject, is there a command in linux which corresponds
> to the *BSD "scsi" command, allowing one to send scsi CDB to a scsi
> device? man -k scsi on a RH 5.2 system doesn't seem to indicate one:(

Susan (the original poster on this thread) has emailed me and told me
that elongating the timeout fixed the problem.

David, there is an ioctl that can be applied to any SCSI device file
descriptor called SCSI_IOCTL_SEND_COMMAND which I have just been
documenting. It is deprecated and broken in 2.2.5 (and most likely
has been for a while). A test program the I have written using
it works well for the first 10 or so invocations then starts to oops
the kernel (with _all_ subsequent module loads oopsing)! Also I managed
to apply it to an st device (of which I have none on my system) with
very bad results ... My primary concern is the sg device driver and
if gets bedded down, then I might look at SCSI_IOCTL_SEND_COMMAND.

Doug Gilbert

------_=_NextPart_001_01BE86B2.47941E04
Content-Type: text/html;
charset="ISO-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
Re: Low-level format with Sg drivers

David Miller wrote:

>> Douglas Gilbert wrote:
>> >
>> > The default timeout can be elongated by the SG_SET_TIMEOUT
>> > ioctl.
>> 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.
>
> While we're on the subject, is there a command in linux which corresponds
> to the *BSD "scsi" command, allowing one to send scsi CDB to a scsi
> device?  man -k scsi on a RH 5.2 system doesn't seem to indicate one:(

Susan (the original poster on this thread) has emailed me and told me
that elongating the timeout fixed the problem.

David, there is an ioctl that can be applied to any SCSI device file
descriptor called SCSI_IOCTL_SEND_COMMAND which I have just been
documenting. It is deprecated and broken in 2.2.5 (and most likely
has been for a while). A test program the I have written using
it works well for the first 10 or so invocations then starts to oops
the kernel (with _all_ subsequent module loads oopsing)! Also I managed
to apply it to an st device (of which I have none on my system) with
very bad results ... My primary concern is the sg device driver and
if gets bedded down, then I might look at SCSI_IOCTL_SEND_COMMAND.


Doug Gilbert

------_=_NextPart_001_01BE86B2.47941E04--

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