diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-03-28 20:03:45 -0500 |
---|---|---|
committer | Jody McIntyre <scjody@modernduck.com> | 2006-03-28 20:03:45 -0500 |
commit | 8f0525ff1901f4fafe6d02d5d373ca38103ff5a7 (patch) | |
tree | 1a68c033d4cac80a412063eb7a201c9104e87672 /drivers/ieee1394 | |
parent | 23e93f1742372bc938e53151bdbf88d284ee9561 (diff) |
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')
-rw-r--r-- | drivers/ieee1394/sbp2.c | 8 |
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, | |||
2410 | */ | 2410 | */ |
2411 | switch (scsi_status) { | 2411 | switch (scsi_status) { |
2412 | case SBP2_SCSI_STATUS_GOOD: | 2412 | case SBP2_SCSI_STATUS_GOOD: |
2413 | SCpnt->result = DID_OK; | 2413 | SCpnt->result = DID_OK << 16; |
2414 | break; | 2414 | break; |
2415 | 2415 | ||
2416 | case SBP2_SCSI_STATUS_BUSY: | 2416 | case SBP2_SCSI_STATUS_BUSY: |
@@ -2420,7 +2420,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, | |||
2420 | 2420 | ||
2421 | case SBP2_SCSI_STATUS_CHECK_CONDITION: | 2421 | case SBP2_SCSI_STATUS_CHECK_CONDITION: |
2422 | SBP2_DEBUG("SBP2_SCSI_STATUS_CHECK_CONDITION"); | 2422 | SBP2_DEBUG("SBP2_SCSI_STATUS_CHECK_CONDITION"); |
2423 | SCpnt->result = CHECK_CONDITION << 1; | 2423 | SCpnt->result = CHECK_CONDITION << 1 | DID_OK << 16; |
2424 | 2424 | ||
2425 | /* | 2425 | /* |
2426 | * Debug stuff | 2426 | * Debug stuff |
@@ -2454,7 +2454,7 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, | |||
2454 | /* | 2454 | /* |
2455 | * Take care of any sbp2 response data mucking here (RBC stuff, etc.) | 2455 | * Take care of any sbp2 response data mucking here (RBC stuff, etc.) |
2456 | */ | 2456 | */ |
2457 | if (SCpnt->result == DID_OK) { | 2457 | if (SCpnt->result == DID_OK << 16) { |
2458 | sbp2_check_sbp2_response(scsi_id, SCpnt); | 2458 | sbp2_check_sbp2_response(scsi_id, SCpnt); |
2459 | } | 2459 | } |
2460 | 2460 | ||
@@ -2472,6 +2472,8 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, | |||
2472 | * If a unit attention occurs, return busy status so it gets | 2472 | * If a unit attention occurs, return busy status so it gets |
2473 | * retried... it could have happened because of a 1394 bus reset | 2473 | * retried... it could have happened because of a 1394 bus reset |
2474 | * or hot-plug... | 2474 | * or hot-plug... |
2475 | * XXX DID_BUS_BUSY is actually a bad idea because it will defy | ||
2476 | * the scsi layer's retry logic. | ||
2475 | */ | 2477 | */ |
2476 | #if 0 | 2478 | #if 0 |
2477 | if ((scsi_status == SBP2_SCSI_STATUS_CHECK_CONDITION) && | 2479 | if ((scsi_status == SBP2_SCSI_STATUS_CHECK_CONDITION) && |