public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix problem in sym2 auto request sense
@ 2004-03-21 15:59 James Bottomley
  0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2004-03-21 15:59 UTC (permalink / raw)
  To: willy; +Cc: SCSI Mailing List

sym2 currently returns DID_ERROR if its auto request sense fails for
some reason.  This is wrong because it leaves a contingent allegiance
condition on the device and it will ever after return BUSY to all
commands.

I tripped this in the somewhat artificial situation of two wide devices
connected over a narrow bus (the DATA phase of the request sense can
thus never complete successfully).

The solution is to kick the device very hard in this rare scenario.

James

===== drivers/scsi/sym53c8xx_2/sym_glue.c 1.44 vs edited =====
--- 1.44/drivers/scsi/sym53c8xx_2/sym_glue.c	Sat Mar 20 16:00:09 2004
+++ edited/drivers/scsi/sym53c8xx_2/sym_glue.c	Sun Mar 21 09:54:45 2004
@@ -384,6 +384,12 @@
 			}
 #endif
 		} else {
+			/* Error return from our internal request
+			 * sense.  This is bad: we must clear the
+			 * contingent allegiance condition otherwise
+			 * the device will always return BUSY.  Use a
+			 * big stick */
+			sym_reset_scsi_bus(np, 1);
 			cam_status = DID_ERROR;
 		}
 	} else if (cp->host_status == HS_COMPLETE) 	/* Bad SCSI status */




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-21 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-21 15:59 [PATCH] fix problem in sym2 auto request sense James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox