Skip to contentSkip to conversation

cciss: fix reporting of scsi status again.

PATCH In review Stephen M. Cameron 2 participants 3 messages Dec 17, 2009 – Dec 18, 2009

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

PATCH 1/1 cciss: fix reporting of scsi status again.

From: Stephen M. Cameron <[email protected]>

cciss: fix reporting of scsi status again. This reverts an earlier attempt to fix the status byte reporting. The status byte does not need to be shifted << 1. Code like "scp-result |= CHECK_CONDITION << 1" in other drivers works because CHECK_CONDITION is 0x01, not 0x02 -- CHECK_CONDITION is pre-shifted to the right 1 bit for some reason.

---
 drivers/block/cciss_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/block/cciss_scsi.c +1 -1
index 75a9ca9..0634ec7 100644
@@ -728,7 +728,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
 
 	cmd->result = (DID_OK << 16); 		/* host byte */
 	cmd->result |= (COMMAND_COMPLETE << 8);	/* msg byte */
-	cmd->result |= (ei->ScsiStatus << 1);
+	cmd->result |= ei->ScsiStatus;
 	/* printk("Scsistatus is 0x%02x\n", ei->ScsiStatus);  */
 
 	/* copy the sense data whether we need to or not. */
#1 lore raw
Quoted 7 lines · Stephen M. Cameron

From: Stephen M. Cameron <[email protected]>

cciss: fix reporting of scsi status again. This reverts an earlier attempt to fix the status byte reporting. The status byte does not need to be shifted << 1. Code like "scp-result |= CHECK_CONDITION << 1" in other drivers works because CHECK_CONDITION is 0x01, not 0x02 -- CHECK_CONDITION is pre-shifted to the right 1 bit for some reason.

What's this against? Current -git (2.6.33-rc1) already looks correct.

Quoted 20 lines
---
 drivers/block/cciss_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/block/cciss_scsi.c +1 -1
index 75a9ca9..0634ec7 100644
@@ -728,7 +728,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
 
 	cmd->result = (DID_OK << 16); 		/* host byte */
 	cmd->result |= (COMMAND_COMPLETE << 8);	/* msg byte */
-	cmd->result |= (ei->ScsiStatus << 1);
+	cmd->result |= ei->ScsiStatus;
 	/* printk("Scsistatus is 0x%02x\n", ei->ScsiStatus);  */
 
 	/* copy the sense data whether we need to or not. */
Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 10 lines · Jens Axboe
Quoted 7 lines · Stephen M. Cameron

From: Stephen M. Cameron <[email protected]>

cciss: fix reporting of scsi status again. This reverts an earlier attempt to fix the status byte reporting. The status byte does not need to be shifted << 1. Code like "scp-result |= CHECK_CONDITION << 1" in other drivers works because CHECK_CONDITION is 0x01, not 0x02 -- CHECK_CONDITION is pre-shifted to the right 1 bit for some reason.

What's this against? Current -git (2.6.33-rc1) already looks correct.

Oh, hmm. Well, I guess that's good.

I had sent up a patch previously which "fixed" this (botched it). Maybe my botched patch was recognized as crap and not picked up.

-- steve

Quoted 24 lines
Quoted 21 lines
---
 drivers/block/cciss_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/block/cciss_scsi.c +1 -1
index 75a9ca9..0634ec7 100644
@@ -728,7 +728,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag)
 
 	cmd->result = (DID_OK << 16); 		/* host byte */
 	cmd->result |= (COMMAND_COMPLETE << 8);	/* msg byte */
-	cmd->result |= (ei->ScsiStatus << 1);
+	cmd->result |= ei->ScsiStatus;
 	/* printk("Scsistatus is 0x%02x\n", ei->ScsiStatus);  */
 
 	/* copy the sense data whether we need to or not. */
Signature · 1 line
Jens Axboe