aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorKaren Xie <kxie@chelsio.com>2014-12-11 22:13:44 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-12 11:22:30 -0500
commit2126bc5e872cefd808a6590c5cec797997a6490d (patch)
tree55e49d82369a0761fc4c3cd65febab73833d7115 /drivers/scsi/cxgbi
parentf7bcd2e11107af39367fb726196f372f8ad05199 (diff)
cxgb4i: use set_wr_txq() to set tx queues
use cxgb4's set_wr_txq() for setting of the tx queue for a outgoing packet. remove the similar function in cxgb4i. 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.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 8b7e8f815357..a83d2ceded83 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -158,12 +158,6 @@ static struct scsi_transport_template *cxgb4i_stt;
158#define RCV_BUFSIZ_MASK 0x3FFU 158#define RCV_BUFSIZ_MASK 0x3FFU
159#define MAX_IMM_TX_PKT_LEN 128 159#define MAX_IMM_TX_PKT_LEN 128
160 160
161static inline void set_queue(struct sk_buff *skb, unsigned int queue,
162 const struct cxgbi_sock *csk)
163{
164 skb->queue_mapping = queue;
165}
166
167static int push_tx_frames(struct cxgbi_sock *, int); 161static int push_tx_frames(struct cxgbi_sock *, int);
168 162
169/* 163/*
@@ -405,7 +399,7 @@ static void send_abort_req(struct cxgbi_sock *csk)
405 399
406 csk->cpl_abort_req = NULL; 400 csk->cpl_abort_req = NULL;
407 req = (struct cpl_abort_req *)skb->head; 401 req = (struct cpl_abort_req *)skb->head;
408 set_queue(skb, CPL_PRIORITY_DATA, csk); 402 set_wr_txq(skb, CPL_PRIORITY_DATA, csk->port_id);
409 req->cmd = CPL_ABORT_SEND_RST; 403 req->cmd = CPL_ABORT_SEND_RST;
410 t4_set_arp_err_handler(skb, csk, abort_arp_failure); 404 t4_set_arp_err_handler(skb, csk, abort_arp_failure);
411 INIT_TP_WR(req, csk->tid); 405 INIT_TP_WR(req, csk->tid);
@@ -431,7 +425,7 @@ static void send_abort_rpl(struct cxgbi_sock *csk, int rst_status)
431 csk, csk->state, csk->flags, csk->tid, rst_status); 425 csk, csk->state, csk->flags, csk->tid, rst_status);
432 426
433 csk->cpl_abort_rpl = NULL; 427 csk->cpl_abort_rpl = NULL;
434 set_queue(skb, CPL_PRIORITY_DATA, csk); 428 set_wr_txq(skb, CPL_PRIORITY_DATA, csk->port_id);
435 INIT_TP_WR(rpl, csk->tid); 429 INIT_TP_WR(rpl, csk->tid);
436 OPCODE_TID(rpl) = cpu_to_be32(MK_OPCODE_TID(CPL_ABORT_RPL, csk->tid)); 430 OPCODE_TID(rpl) = cpu_to_be32(MK_OPCODE_TID(CPL_ABORT_RPL, csk->tid));
437 rpl->cmd = rst_status; 431 rpl->cmd = rst_status;
@@ -557,7 +551,7 @@ static inline int send_tx_flowc_wr(struct cxgbi_sock *csk)
557 flowc->mnemval[8].mnemonic = FW_FLOWC_MNEM_TXDATAPLEN_MAX; 551 flowc->mnemval[8].mnemonic = FW_FLOWC_MNEM_TXDATAPLEN_MAX;
558 flowc->mnemval[8].val = 16384; 552 flowc->mnemval[8].val = 16384;
559 553
560 set_queue(skb, CPL_PRIORITY_DATA, csk); 554 set_wr_txq(skb, CPL_PRIORITY_DATA, csk->port_id);
561 555
562 log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK, 556 log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK,
563 "csk 0x%p, tid 0x%x, %u,%u,%u,%u,%u,%u,%u.\n", 557 "csk 0x%p, tid 0x%x, %u,%u,%u,%u,%u,%u,%u.\n",
@@ -663,7 +657,7 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion)
663 break; 657 break;
664 } 658 }
665 __skb_unlink(skb, &csk->write_queue); 659 __skb_unlink(skb, &csk->write_queue);
666 set_queue(skb, CPL_PRIORITY_DATA, csk); 660 set_wr_txq(skb, CPL_PRIORITY_DATA, csk->port_id);
667 skb->csum = credits_needed + flowclen16; 661 skb->csum = credits_needed + flowclen16;
668 csk->wr_cred -= credits_needed; 662 csk->wr_cred -= credits_needed;
669 csk->wr_una_cred += credits_needed; 663 csk->wr_una_cred += credits_needed;
@@ -1555,7 +1549,7 @@ static int ddp_ppod_write_idata(struct cxgbi_device *cdev, unsigned int port_id,
1555 return -ENOMEM; 1549 return -ENOMEM;
1556 } 1550 }
1557 req = (struct ulp_mem_io *)skb->head; 1551 req = (struct ulp_mem_io *)skb->head;
1558 set_queue(skb, CPL_PRIORITY_CONTROL, NULL); 1552 set_wr_txq(skb, CPL_PRIORITY_CONTROL, 0);
1559 1553
1560 ulp_mem_io_set_hdr(lldi, req, wr_len, dlen, pm_addr); 1554 ulp_mem_io_set_hdr(lldi, req, wr_len, dlen, pm_addr);
1561 idata = (struct ulptx_idata *)(req + 1); 1555 idata = (struct ulptx_idata *)(req + 1);