Skip to content

Commit

Permalink
[SCSI] cxgbi: set ulpmode only if digest is on
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kxie@chelsio.com authored and James Bottomley committed Jan 24, 2011
1 parent 938abd8 commit c343a01
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions drivers/scsi/cxgbi/libcxgbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c343a01

Please sign in to comment.