RE: [PATCH 1/2] cxgbi: set ulpmode only if digest is on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops, I mean "There is NO need to set ulpmode on the tx skbs if no
digest is enabled."

-----Original Message-----
From: kxie@xxxxxxxxxxx [mailto:kxie@xxxxxxxxxxx] 
Sent: Friday, January 07, 2011 2:46 PM
To: linux-scsi@xxxxxxxxxxxxxxx; open-iscsi@xxxxxxxxxxxxxxxx
Cc: Karen Xie; James.Bottomley@xxxxxxxxxxxxxxxxxxxxx;
michaelc@xxxxxxxxxxx
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@xxxxxxxxxxx>

There is need to set ulpmode on the tx skbs if no digest is enabled.

Signed-off-by: Karen Xie <kxie@xxxxxxxxxxx>
---
 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,
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux