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>

authored by Stefan Richter and committed by Jody McIntyre 8f0525ff 23e93f17

+5 -3
+5 -3
drivers/ieee1394/sbp2.c
··· 2410 */ 2411 switch (scsi_status) { 2412 case SBP2_SCSI_STATUS_GOOD: 2413 - SCpnt->result = DID_OK; 2414 break; 2415 2416 case SBP2_SCSI_STATUS_BUSY: ··· 2420 2421 case SBP2_SCSI_STATUS_CHECK_CONDITION: 2422 SBP2_DEBUG("SBP2_SCSI_STATUS_CHECK_CONDITION"); 2423 - SCpnt->result = CHECK_CONDITION << 1; 2424 2425 /* 2426 * Debug stuff ··· 2454 /* 2455 * Take care of any sbp2 response data mucking here (RBC stuff, etc.) 2456 */ 2457 - if (SCpnt->result == DID_OK) { 2458 sbp2_check_sbp2_response(scsi_id, SCpnt); 2459 } 2460 ··· 2472 * If a unit attention occurs, return busy status so it gets 2473 * retried... it could have happened because of a 1394 bus reset 2474 * or hot-plug... 2475 */ 2476 #if 0 2477 if ((scsi_status == SBP2_SCSI_STATUS_CHECK_CONDITION) &&
··· 2410 */ 2411 switch (scsi_status) { 2412 case SBP2_SCSI_STATUS_GOOD: 2413 + SCpnt->result = DID_OK << 16; 2414 break; 2415 2416 case SBP2_SCSI_STATUS_BUSY: ··· 2420 2421 case SBP2_SCSI_STATUS_CHECK_CONDITION: 2422 SBP2_DEBUG("SBP2_SCSI_STATUS_CHECK_CONDITION"); 2423 + SCpnt->result = CHECK_CONDITION << 1 | DID_OK << 16; 2424 2425 /* 2426 * Debug stuff ··· 2454 /* 2455 * Take care of any sbp2 response data mucking here (RBC stuff, etc.) 2456 */ 2457 + if (SCpnt->result == DID_OK << 16) { 2458 sbp2_check_sbp2_response(scsi_id, SCpnt); 2459 } 2460 ··· 2472 * If a unit attention occurs, return busy status so it gets 2473 * retried... it could have happened because of a 1394 bus reset 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. 2477 */ 2478 #if 0 2479 if ((scsi_status == SBP2_SCSI_STATUS_CHECK_CONDITION) &&