Re: Scsi tape - returns ENXIO after an error (aha1542 + others) [PATCH]

Richard Fish (rjf@estinc.com)
Fri, 13 Nov 1998 10:25:02 -0700


This is a multi-part message in MIME format.
--------------3AF8EA9E4D3A3723E605D589
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

C S Hendrix wrote:

In message <3649ADCF.87BC328A@estinc.com>, Richard Fish writes:
> > Some weeks ago, there was discussion on linux-kernel about a problem
> > with SCSI tape drives connected to a 1542 being put offline after any
> > kind of error. Since it still occurs in the 2.1.127 kernel, I'm
> > assuming there was no fix for this.

[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.

-- 
Richard Fish                      Enhanced Software Technologies, Inc.
Software Developer                4014 E Broadway Rd Suite 405
rjf@estinc.com                    Phoenix, AZ  85040 
(602) 470-1115                    http://www.estinc.com
--------------3AF8EA9E4D3A3723E605D589
Content-Type: text/plain; charset=us-ascii;
 name="scsi-error-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="scsi-error-patch"

--- 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; + } + + + /* * First check the host byte, to see if there is anything in there * that would indicate what we need to do. */

--------------3AF8EA9E4D3A3723E605D589--

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