public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cciss: fix reporting of scsi status again.
@ 2009-12-17 14:22 Stephen M. Cameron
  2009-12-18 11:41 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen M. Cameron @ 2009-12-17 14:22 UTC (permalink / raw)
  To: axboe, James.Bottomley, akpm; +Cc: linux-kernel, mikem, linux-scsi, smcameron

From: Stephen M. Cameron <scameron@beardog.cce.hp.com>

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.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
 drivers/block/cciss_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
index 75a9ca9..0634ec7 100644
--- a/drivers/block/cciss_scsi.c
+++ b/drivers/block/cciss_scsi.c
@@ -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. */


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cciss: fix reporting of scsi status again.
  2009-12-17 14:22 [PATCH] cciss: fix reporting of scsi status again Stephen M. Cameron
@ 2009-12-18 11:41 ` Jens Axboe
  2009-12-18 15:15   ` scameron
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2009-12-18 11:41 UTC (permalink / raw)
  To: Stephen M. Cameron
  Cc: James.Bottomley, akpm, linux-kernel, mikem, linux-scsi, smcameron

On Thu, Dec 17 2009, Stephen M. Cameron wrote:
> From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> 
> 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.

> 
> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> ---
>  drivers/block/cciss_scsi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
> index 75a9ca9..0634ec7 100644
> --- a/drivers/block/cciss_scsi.c
> +++ b/drivers/block/cciss_scsi.c
> @@ -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. */
> 

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cciss: fix reporting of scsi status again.
  2009-12-18 11:41 ` Jens Axboe
@ 2009-12-18 15:15   ` scameron
  0 siblings, 0 replies; 3+ messages in thread
From: scameron @ 2009-12-18 15:15 UTC (permalink / raw)
  To: Jens Axboe
  Cc: James.Bottomley, akpm, linux-kernel, mikem, linux-scsi, smcameron

On Fri, Dec 18, 2009 at 12:41:37PM +0100, Jens Axboe wrote:
> On Thu, Dec 17 2009, Stephen M. Cameron wrote:
> > From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> > 
> > 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

> 
> > 
> > Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> > ---
> >  drivers/block/cciss_scsi.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
> > index 75a9ca9..0634ec7 100644
> > --- a/drivers/block/cciss_scsi.c
> > +++ b/drivers/block/cciss_scsi.c
> > @@ -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. */
> > 
> 
> -- 
> Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-18 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 14:22 [PATCH] cciss: fix reporting of scsi status again Stephen M. Cameron
2009-12-18 11:41 ` Jens Axboe
2009-12-18 15:15   ` scameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox