All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] BNX2I: Fixed the endian on TTT for NOP out transmission
@ 2011-08-26 18:16 Eddie Wai
  2011-08-26 20:38 ` Mike Christie
  0 siblings, 1 reply; 2+ messages in thread
From: Eddie Wai @ 2011-08-26 18:16 UTC (permalink / raw)
  To: James Bottomley
  Cc: Mike Christie, open-iscsi, linux-scsi, Michael Chan,
	Anil Veerabhadrappa, Ben Li, Eddie Wai

The iscsi_nopout task's TTT is defined as __be32 while the DMA
memory to the chip is CPU specific.  This creates a problem for
unsolicited NOP-In responses where the TTT is not the RESERVED
tag of 0xFFs.  This patch adds a call to be32_to_cpu for the TTT
specified.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
---
 drivers/scsi/bnx2i/bnx2i_hwi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 9ae80cd..dba72a4 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -563,7 +563,7 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn,
 	nopout_wqe->itt = ((u16)task->itt |
 			   (ISCSI_TASK_TYPE_MPATH <<
 			    ISCSI_TMF_REQUEST_TYPE_SHIFT));
-	nopout_wqe->ttt = nopout_hdr->ttt;
+	nopout_wqe->ttt = be32_to_cpu(nopout_hdr->ttt);
 	nopout_wqe->flags = 0;
 	if (!unsol)
 		nopout_wqe->flags = ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION;
-- 
1.7.0.5



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

* Re: [PATCH] BNX2I: Fixed the endian on TTT for NOP out transmission
  2011-08-26 18:16 [PATCH] BNX2I: Fixed the endian on TTT for NOP out transmission Eddie Wai
@ 2011-08-26 20:38 ` Mike Christie
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Christie @ 2011-08-26 20:38 UTC (permalink / raw)
  To: Eddie Wai
  Cc: James Bottomley, open-iscsi, linux-scsi, Michael Chan,
	Anil Veerabhadrappa, Ben Li

On 08/26/2011 01:16 PM, Eddie Wai wrote:
> The iscsi_nopout task's TTT is defined as __be32 while the DMA
> memory to the chip is CPU specific.  This creates a problem for
> unsolicited NOP-In responses where the TTT is not the RESERVED
> tag of 0xFFs.  This patch adds a call to be32_to_cpu for the TTT
> specified.
> 
> Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
> ---
>  drivers/scsi/bnx2i/bnx2i_hwi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
> index 9ae80cd..dba72a4 100644
> --- a/drivers/scsi/bnx2i/bnx2i_hwi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
> @@ -563,7 +563,7 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn,
>  	nopout_wqe->itt = ((u16)task->itt |
>  			   (ISCSI_TASK_TYPE_MPATH <<
>  			    ISCSI_TMF_REQUEST_TYPE_SHIFT));
> -	nopout_wqe->ttt = nopout_hdr->ttt;
> +	nopout_wqe->ttt = be32_to_cpu(nopout_hdr->ttt);
>  	nopout_wqe->flags = 0;
>  	if (!unsol)
>  		nopout_wqe->flags = ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION;


Looks ok.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

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

end of thread, other threads:[~2011-08-26 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 18:16 [PATCH] BNX2I: Fixed the endian on TTT for NOP out transmission Eddie Wai
2011-08-26 20:38 ` Mike Christie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.