mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] qla2xxx: correctly shift host byte
@ 2018-04-06  7:52 Johannes Thumshirn
  2018-04-06 15:01 ` Bart Van Assche
  2018-04-06 15:33 ` Bart Van Assche
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2018-04-06  7:52 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Linux Kernel Mailinglist, Linux SCSI Mailinglist,
	Himanshu Madhani, Johannes Thumshirn

The host byte has to be shifted by 16 not 6.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/qla2xxx/qla_isr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 89f93ebd819d..49d67e1d571f 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2368,7 +2368,7 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
 	bsg_job->reply_len = sizeof(struct fc_bsg_reply);
 	/* Always return DID_OK, bsg will send the vendor specific response
 	 * in this case only */
-	sp->done(sp, DID_OK << 6);
+	sp->done(sp, DID_OK << 16);
 
 }
 
-- 
2.16.2

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

* Re: [PATCH] qla2xxx: correctly shift host byte
  2018-04-06  7:52 [PATCH] qla2xxx: correctly shift host byte Johannes Thumshirn
@ 2018-04-06 15:01 ` Bart Van Assche
  2018-04-09 12:17   ` Johannes Thumshirn
  2018-04-06 15:33 ` Bart Van Assche
  1 sibling, 1 reply; 5+ messages in thread
From: Bart Van Assche @ 2018-04-06 15:01 UTC (permalink / raw)
  To: jthumshirn, martin.petersen; +Cc: linux-scsi, linux-kernel, himanshu.madhani

On Fri, 2018-04-06 at 09:52 +0200, Johannes Thumshirn wrote:
> The host byte has to be shifted by 16 not 6.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  drivers/scsi/qla2xxx/qla_isr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> index 89f93ebd819d..49d67e1d571f 100644
> --- a/drivers/scsi/qla2xxx/qla_isr.c
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -2368,7 +2368,7 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
>  	bsg_job->reply_len = sizeof(struct fc_bsg_reply);
>  	/* Always return DID_OK, bsg will send the vendor specific response
>  	 * in this case only */
> -	sp->done(sp, DID_OK << 6);
> +	sp->done(sp, DID_OK << 16);
>  
>  }

Please mention in the description of this patch that this patch does not
change any functionality because DID_OK == 0. Anyway:

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>

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

* Re: [PATCH] qla2xxx: correctly shift host byte
  2018-04-06  7:52 [PATCH] qla2xxx: correctly shift host byte Johannes Thumshirn
  2018-04-06 15:01 ` Bart Van Assche
@ 2018-04-06 15:33 ` Bart Van Assche
  2018-04-09 12:17   ` Johannes Thumshirn
  1 sibling, 1 reply; 5+ messages in thread
From: Bart Van Assche @ 2018-04-06 15:33 UTC (permalink / raw)
  To: jthumshirn, martin.petersen; +Cc: linux-scsi, linux-kernel, himanshu.madhani

On Fri, 2018-04-06 at 09:52 +0200, Johannes Thumshirn wrote:
> The host byte has to be shifted by 16 not 6.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  drivers/scsi/qla2xxx/qla_isr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> index 89f93ebd819d..49d67e1d571f 100644
> --- a/drivers/scsi/qla2xxx/qla_isr.c
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -2368,7 +2368,7 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
>  	bsg_job->reply_len = sizeof(struct fc_bsg_reply);
>  	/* Always return DID_OK, bsg will send the vendor specific response
>  	 * in this case only */
> -	sp->done(sp, DID_OK << 6);
> +	sp->done(sp, DID_OK << 16);
>  
>  }

Hello Johannes,

Had you noticed the following statements? I think the "<< 1" should be removed
from these statements.

$ git grep 'SAM_STAT.*<< 1'
drivers/scsi/qla2xxx/qla_isr.c:         cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
drivers/scsi/qla2xxx/qla_isr.c:         cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
drivers/scsi/qla2xxx/qla_isr.c:         cmd->result |= SAM_STAT_CHECK_CONDITION << 1;

Thanks,

Bart.

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

* Re: [PATCH] qla2xxx: correctly shift host byte
  2018-04-06 15:01 ` Bart Van Assche
@ 2018-04-09 12:17   ` Johannes Thumshirn
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2018-04-09 12:17 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: martin.petersen, linux-scsi, linux-kernel, himanshu.madhani

On Fri, Apr 06, 2018 at 03:01:20PM +0000, Bart Van Assche wrote:
> Please mention in the description of this patch that this patch does not
> change any functionality because DID_OK == 0. Anyway:
> 
> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>

I'll do. Thanks for the review.
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

* Re: [PATCH] qla2xxx: correctly shift host byte
  2018-04-06 15:33 ` Bart Van Assche
@ 2018-04-09 12:17   ` Johannes Thumshirn
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2018-04-09 12:17 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: martin.petersen, linux-scsi, linux-kernel, himanshu.madhani

On Fri, Apr 06, 2018 at 03:33:30PM +0000, Bart Van Assche wrote:
> On Fri, 2018-04-06 at 09:52 +0200, Johannes Thumshirn wrote:
> > The host byte has to be shifted by 16 not 6.
> > 
> > Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> > ---
> >  drivers/scsi/qla2xxx/qla_isr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> > index 89f93ebd819d..49d67e1d571f 100644
> > --- a/drivers/scsi/qla2xxx/qla_isr.c
> > +++ b/drivers/scsi/qla2xxx/qla_isr.c
> > @@ -2368,7 +2368,7 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
> >  	bsg_job->reply_len = sizeof(struct fc_bsg_reply);
> >  	/* Always return DID_OK, bsg will send the vendor specific response
> >  	 * in this case only */
> > -	sp->done(sp, DID_OK << 6);
> > +	sp->done(sp, DID_OK << 16);
> >  
> >  }
> 
> Hello Johannes,
> 
> Had you noticed the following statements? I think the "<< 1" should be removed
> from these statements.
> 
> $ git grep 'SAM_STAT.*<< 1'
> drivers/scsi/qla2xxx/qla_isr.c:         cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
> drivers/scsi/qla2xxx/qla_isr.c:         cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
> drivers/scsi/qla2xxx/qla_isr.c:         cmd->result |= SAM_STAT_CHECK_CONDITION << 1;

Thanks for the heads up, but this will be a separate patch.

Byte,
       Johannes
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

end of thread, other threads:[~2018-04-09 12:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06  7:52 [PATCH] qla2xxx: correctly shift host byte Johannes Thumshirn
2018-04-06 15:01 ` Bart Van Assche
2018-04-09 12:17   ` Johannes Thumshirn
2018-04-06 15:33 ` Bart Van Assche
2018-04-09 12:17   ` Johannes Thumshirn

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

all inboxes | Powered by JetHome®