summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-03-28 20:03:45 -0500
committerJody McIntyre <scjody@modernduck.com>2006-03-28 20:03:45 -0500
commit8f0525ff1901f4fafe6d02d5d373ca38103ff5a7 (patch)
tree1a68c033d4cac80a412063eb7a201c9104e87672 /drivers/ieee1394/sbp2.c
parent23e93f1742372bc938e53151bdbf88d284ee9561 (diff)
downloadtalos-op-linux-8f0525ff1901f4fafe6d02d5d373ca38103ff5a7.tar.gz
talos-op-linux-8f0525ff1901f4fafe6d02d5d373ca38103ff5a7.zip
sbp2: proper treatment of DID_OK
Sbp2 relied on DID_OK to be defined as 0. Always shift DID_OK into the right position anyway, and explicitly return DID_OK together with CHECK_CONDITION. Also comment on some #if 0 code. The patch does not change current behaviour. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index ce3b43dd229b..eb7106b8fd0a 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -2410,7 +2410,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
*/
switch (scsi_status) {
case SBP2_SCSI_STATUS_GOOD:
- SCpnt->result = DID_OK;
+ SCpnt->result = DID_OK << 16;
break;
case SBP2_SCSI_STATUS_BUSY:
@@ -2420,7 +2420,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
case SBP2_SCSI_STATUS_CHECK_CONDITION:
SBP2_DEBUG("SBP2_SCSI_STATUS_CHECK_CONDITION");
- SCpnt->result = CHECK_CONDITION << 1;
+ SCpnt->result = CHECK_CONDITION << 1 | DID_OK << 16;
/*
* Debug stuff
@@ -2454,7 +2454,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
/*
* Take care of any sbp2 response data mucking here (RBC stuff, etc.)
*/
- if (SCpnt->result == DID_OK) {
+ if (SCpnt->result == DID_OK << 16) {
sbp2_check_sbp2_response(scsi_id, SCpnt);
}
@@ -2472,6 +2472,8 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id,
* If a unit attention occurs, return busy status so it gets
* retried... it could have happened because of a 1394 bus reset
* or hot-plug...
+ * XXX DID_BUS_BUSY is actually a bad idea because it will defy
+ * the scsi layer's retry logic.
*/
#if 0
if ((scsi_status == SBP2_SCSI_STATUS_CHECK_CONDITION) &&
OpenPOWER on IntegriCloud