Messages in this thread | | | From | "Gilbert, Douglas" <> | Subject | Re: Low-level format with Sg drivers | Date | Wed, 14 Apr 1999 16:06:27 -0400 |
| |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2232.0"> <TITLE>Re: Low-level format with Sg drivers</TITLE> </HEAD> <BODY>
<P><FONT SIZE=2>David Miller wrote:</FONT> </P>
<P><FONT SIZE=2>>> Douglas Gilbert wrote:</FONT> <BR><FONT SIZE=2>>> > </FONT> <BR><FONT SIZE=2>>> > The default timeout can be elongated by the SG_SET_TIMEOUT</FONT> <BR><FONT SIZE=2>>> > ioctl.</FONT> <BR><FONT SIZE=2>>> Doug</FONT> <BR><FONT SIZE=2>>> </FONT> <BR><FONT SIZE=2>>> Actually when I checked again the sense buffer from the read right after</FONT> <BR><FONT SIZE=2>>> the low-level format quit was Unit Attention, Data Path Failure</FONT> <BR><FONT SIZE=2>>> (Should use 40 NN). I haven't figured out what 40 NN is yet. I guess</FONT> <BR><FONT SIZE=2>>> this message may not be surprising since I just did a low level format</FONT> <BR><FONT SIZE=2>>> on the disk. Maybe things get lost between the write and the read. </FONT> <BR><FONT SIZE=2>>> </FONT> <BR><FONT SIZE=2>>> Your idea about the timeout is worth a try. I am also going to try an</FONT> <BR><FONT SIZE=2>>> ioctl call to the sd* driver and see if that works. </FONT> <BR><FONT SIZE=2>></FONT> <BR><FONT SIZE=2>> While we're on the subject, is there a command in linux which corresponds</FONT> <BR><FONT SIZE=2>> to the *BSD "scsi" command, allowing one to send scsi CDB to a scsi</FONT> <BR><FONT SIZE=2>> device? man -k scsi on a RH 5.2 system doesn't seem to indicate one:(</FONT> </P>
<P><FONT SIZE=2>Susan (the original poster on this thread) has emailed me and told me</FONT> <BR><FONT SIZE=2>that elongating the timeout fixed the problem.</FONT> </P>
<P><FONT SIZE=2>David, there is an ioctl that can be applied to any SCSI device file</FONT> <BR><FONT SIZE=2>descriptor called SCSI_IOCTL_SEND_COMMAND which I have just been</FONT> <BR><FONT SIZE=2>documenting. It is deprecated and broken in 2.2.5 (and most likely</FONT> <BR><FONT SIZE=2>has been for a while). A test program the I have written using </FONT> <BR><FONT SIZE=2>it works well for the first 10 or so invocations then starts to oops </FONT> <BR><FONT SIZE=2>the kernel (with _all_ subsequent module loads oopsing)! Also I managed</FONT> <BR><FONT SIZE=2>to apply it to an st device (of which I have none on my system) with</FONT> <BR><FONT SIZE=2>very bad results ... My primary concern is the sg device driver and</FONT> <BR><FONT SIZE=2>if gets bedded down, then I might look at SCSI_IOCTL_SEND_COMMAND.</FONT> </P> <BR>
<P><FONT SIZE=2>Doug Gilbert</FONT> </P>
</BODY> </HTML> | |