aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi/libcxgbi.c
diff options
context:
space:
mode:
authorkxie@chelsio.com <kxie@chelsio.com>2011-01-07 17:45:39 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-01-24 12:36:00 -0500
commitc343a01cca2a4182b89d976e203a54ec0ea5446b (patch)
tree7e9929f17d8a5e5e010fb4eec5813c4fdf4f02f5 /drivers/scsi/cxgbi/libcxgbi.c
parent938abd8449c27fc67203e1a7c350199cea1158da (diff)
[SCSI] cxgbi: set ulpmode only if digest is on
There is no need to set ulpmode on the tx skbs if no digest is enabled. Signed-off-by: Karen Xie <kxie@chelsio.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/cxgbi/libcxgbi.c')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index d2ad3d676724..6de6a6f3f1e8 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1908,13 +1908,16 @@ EXPORT_SYMBOL_GPL(cxgbi_conn_alloc_pdu);
1908 1908
1909static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc) 1909static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc)
1910{ 1910{
1911 u8 submode = 0; 1911 if (hcrc || dcrc) {
1912 1912 u8 submode = 0;
1913 if (hcrc) 1913
1914 submode |= 1; 1914 if (hcrc)
1915 if (dcrc) 1915 submode |= 1;
1916 submode |= 2; 1916 if (dcrc)
1917 cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode; 1917 submode |= 2;
1918 cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode;
1919 } else
1920 cxgbi_skcb_ulp_mode(skb) = 0;
1918} 1921}
1919 1922
1920int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset, 1923int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,