[lkml]   [1998]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Scsi tape - returns ENXIO after an error (aha1542 + others) [PATCH]
This is sent to linux-kernel only because it replies a message sent there.
We really should keep this discussion in linux-scsi!

On Fri, 13 Nov 1998, Richard Fish wrote:

> C S Hendrix wrote:
> In message <>, Richard Fish writes:
> [snip]
> > Is there a way to do this in a way that is not specific to the SCSI
> > controller driver? Or would each low-level driver have to receive
> > a similar patch?
> Ok, here is a patch to scsi_error.c that will hopefully fix the problem
> for all controllers. This removes the need for a patch to aha1542.c.
> Please test and let me know if there are any problems.
>--- scsi_error.c.old Mon Jul 27 18:21:59 1998
>+++ scsi_error.c Fri Nov 13 08:42:21 1998
>@@ -945,6 +945,18 @@
> }
> /*
>+ * For tape drives, pass common failures to high-level driver
>+ */
>+ if( SCpnt->device->type == TYPE_TAPE &&
>+ (status_byte(SCpnt->result) == GOOD) ||
>+ (status_byte(SCpnt->result) & CHECK_CONDITION))
>+ {
>+ SCpnt->result &= 0xff00ffff;
>+ return SUCCESS;
>+ }

Your patch practically bypasses the error handling for tapes and this is
not correct. It would be better to selectively fix the error responses
that cause problems.

I don't have any SCSI adapter that uses the new error handling and so the
following is just speculation. The function scsi_check_sense() returns
SUCCESS in case of UNIT_ATTENTION and the comment says that in this case
the the information is passed up to the upper level driver. This is what
want to happen with FM, EOM, and ILI. If the test near the beginning of
the function is changed to

if (SCpnt->sense_buffer[2] & 0xe0)
return FAILED;

it might help.

In addition to the condition bits, the tape driver needs to get up the
information about BLANK_CHECK.

Before even thinking to add something like this to the kernel, someone
should check what the result would be for the whole middle-level SCSI
system, taking into account all device types.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:45    [W:0.071 / U:0.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site