summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorKaren Xie <kxie@chelsio.com>2014-12-12 06:13:32 +0300
committerDavid S. Miller <davem@davemloft.net>2014-12-12 19:22:29 +0300
commit7857c62a35041a21a66ccab551601c942b748330 (patch)
tree4adda8cfcdc8fd61f1577f0993fbd552fc22c5b4 /drivers/scsi/cxgbi
parent84944d8cf5d16c281e9389d90de20b9ceb96765e (diff)
downloadlinux-7857c62a35041a21a66ccab551601c942b748330.tar.xz
cxgb4i: fix credit check for tx_data_wr
make sure any tx credit related checking is done before adding the wr header. Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 8abe8a303386..197d7de189fb 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -549,10 +549,11 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb,
struct fw_ofld_tx_data_wr *req;
unsigned int submode = cxgbi_skcb_ulp_mode(skb) & 3;
unsigned int wr_ulp_mode = 0, val;
+ bool imm = is_ofld_imm(skb);
req = (struct fw_ofld_tx_data_wr *)__skb_push(skb, sizeof(*req));
- if (is_ofld_imm(skb)) {
+ if (imm) {
req->op_to_immdlen = htonl(FW_WR_OP_V(FW_OFLD_TX_DATA_WR) |
FW_WR_COMPL_F |
FW_WR_IMMDLEN_V(dlen));