Skip to contentSkip to conversation

aic79xx: target hotplug fixes

PATCH New Hannes Reinecke 1 participant 1 message Apr 7, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aic79xx: target hotplug fixes

Hi all,

aic79xx has a _very_ peculiar handling for target hotplug. It detects the target reset okay, but then decides to change the command on the fly to TEST UNIT READY and tries to requeue the original command. Nice idea, but if we can't send the TEST UNIT READY command we'll get the sense code from that and not that one we'd have gotten from the original command.
And of course the requeueing bit is stuffed, too, as the TUR command will basically never requeued.
Especially harmful if the Midlayer does a rescanning, as the INQUIRY command sent by the rescan should _never_ return a CHECK CONDITION status as this is a violation of the SCSI spec.

This patch just strips out that peculiar handling and let the midlayer deal with it. Works far better that way and again some code cleanup achieved :-)

Please apply.

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke			[email protected]
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de

Subject: [PATCH] aic79xx: target hotplug fixes

When a target is added aic79xx tries to be overly clever: it changes the command on the fly to TEST UNIT READY and tries to requeue the original command. Sadly this breaks SCSI compability and of course the midlayer is getting a bit confused by it.

So we're just removing that bit of code and let the midlayer deal with it. It's clever enough by now. And the driver code is getting simpler.

---

 drivers/scsi/aic7xxx/aic79xx.h      |    2 +
 drivers/scsi/aic7xxx/aic79xx_core.c |   52 ++++++-----------------------------
 2 files changed, 10 insertions(+), 44 deletions(-)

41b91d017439519c496ceb20ee877b8fedd2b61b

drivers/scsi/aic7xxx/aic79xx.h +1 -1
index 1d11f7e..1c85db6 100644
@@ -589,7 +589,7 @@ typedef enum {
 	SCB_PACKETIZED		= 0x00800,
 	SCB_EXPECT_PPR_BUSFREE	= 0x01000,
 	SCB_PKT_SENSE		= 0x02000,
-	SCB_CMDPHASE_ABORT	= 0x04000,
+	SCB_EXTERNAL_RESET	= 0x04000,/* Device was reset externally */
 	SCB_ON_COL_LIST		= 0x08000,
 	SCB_SILENT		= 0x10000 /*
 					   * Be quiet about transmission type
drivers/scsi/aic7xxx/aic79xx_core.c +9 -43

74 lines not on this page · raw message

Signature · 1 line
1.1.3