* [PATCH 1/2] cxgbi: set ulpmode only if digest is on
@ 2011-01-07 22:45 kxie
2011-01-07 22:50 ` Karen Xie
2011-01-11 20:24 ` Mike Christie
0 siblings, 2 replies; 3+ messages in thread
From: kxie @ 2011-01-07 22:45 UTC (permalink / raw)
To: linux-scsi, open-iscsi; +Cc: kxie, James.Bottomley, michaelc
[PATCH 1/2] cxgbi: set ulpmode only if digest is on
From: Karen Xie <kxie@chelsio.com>
There is need to set ulpmode on the tx skbs if no digest is enabled.
Signed-off-by: Karen Xie <kxie@chelsio.com>
---
drivers/scsi/cxgbi/libcxgbi.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index be56617..17dcada 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1908,13 +1908,16 @@ EXPORT_SYMBOL_GPL(cxgbi_conn_alloc_pdu);
static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc)
{
- u8 submode = 0;
-
- if (hcrc)
- submode |= 1;
- if (dcrc)
- submode |= 2;
- cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode;
+ if (hcrc || dcrc) {
+ u8 submode = 0;
+
+ if (hcrc)
+ submode |= 1;
+ if (dcrc)
+ submode |= 2;
+ cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode;
+ } else
+ cxgbi_skcb_ulp_mode(skb) = 0;
}
int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH 1/2] cxgbi: set ulpmode only if digest is on
2011-01-07 22:45 [PATCH 1/2] cxgbi: set ulpmode only if digest is on kxie
@ 2011-01-07 22:50 ` Karen Xie
2011-01-11 20:24 ` Mike Christie
1 sibling, 0 replies; 3+ messages in thread
From: Karen Xie @ 2011-01-07 22:50 UTC (permalink / raw)
To: linux-scsi, open-iscsi; +Cc: James.Bottomley, michaelc
Oops, I mean "There is NO need to set ulpmode on the tx skbs if no
digest is enabled."
-----Original Message-----
From: kxie@chelsio.com [mailto:kxie@chelsio.com]
Sent: Friday, January 07, 2011 2:46 PM
To: linux-scsi@vger.kernel.org; open-iscsi@googlegroups.com
Cc: Karen Xie; James.Bottomley@HansenPartnership.com;
michaelc@cs.wisc.edu
Subject: [PATCH 1/2] cxgbi: set ulpmode only if digest is on
[PATCH 1/2] cxgbi: set ulpmode only if digest is on
From: Karen Xie <kxie@chelsio.com>
There is need to set ulpmode on the tx skbs if no digest is enabled.
Signed-off-by: Karen Xie <kxie@chelsio.com>
---
drivers/scsi/cxgbi/libcxgbi.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/cxgbi/libcxgbi.c
b/drivers/scsi/cxgbi/libcxgbi.c
index be56617..17dcada 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1908,13 +1908,16 @@ EXPORT_SYMBOL_GPL(cxgbi_conn_alloc_pdu);
static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int
dcrc)
{
- u8 submode = 0;
-
- if (hcrc)
- submode |= 1;
- if (dcrc)
- submode |= 2;
- cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode;
+ if (hcrc || dcrc) {
+ u8 submode = 0;
+
+ if (hcrc)
+ submode |= 1;
+ if (dcrc)
+ submode |= 2;
+ cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) |
submode;
+ } else
+ cxgbi_skcb_ulp_mode(skb) = 0;
}
int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] cxgbi: set ulpmode only if digest is on
2011-01-07 22:45 [PATCH 1/2] cxgbi: set ulpmode only if digest is on kxie
2011-01-07 22:50 ` Karen Xie
@ 2011-01-11 20:24 ` Mike Christie
1 sibling, 0 replies; 3+ messages in thread
From: Mike Christie @ 2011-01-11 20:24 UTC (permalink / raw)
To: open-iscsi; +Cc: kxie, linux-scsi, James.Bottomley
On 01/07/2011 04:45 PM, kxie@chelsio.com wrote:
> [PATCH 1/2] cxgbi: set ulpmode only if digest is on
>
> From: Karen Xie<kxie@chelsio.com>
>
> There is need to set ulpmode on the tx skbs if no digest is enabled.
>
> Signed-off-by: Karen Xie<kxie@chelsio.com>
> ---
> drivers/scsi/cxgbi/libcxgbi.c | 17 ++++++++++-------
> 1 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
> index be56617..17dcada 100644
> --- a/drivers/scsi/cxgbi/libcxgbi.c
> +++ b/drivers/scsi/cxgbi/libcxgbi.c
> @@ -1908,13 +1908,16 @@ EXPORT_SYMBOL_GPL(cxgbi_conn_alloc_pdu);
>
> static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc)
> {
> - u8 submode = 0;
> -
> - if (hcrc)
> - submode |= 1;
> - if (dcrc)
> - submode |= 2;
> - cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI<< 4) | submode;
> + if (hcrc || dcrc) {
> + u8 submode = 0;
> +
> + if (hcrc)
> + submode |= 1;
> + if (dcrc)
> + submode |= 2;
> + cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI<< 4) | submode;
> + } else
> + cxgbi_skcb_ulp_mode(skb) = 0;
> }
>
> int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
>
Ok.
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-11 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 22:45 [PATCH 1/2] cxgbi: set ulpmode only if digest is on kxie
2011-01-07 22:50 ` Karen Xie
2011-01-11 20:24 ` 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.