aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2014-11-06 23:05:25 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-10 12:57:10 -0500
commite2ac9628959cc152a811931a6422757b137ac4a4 (patch)
treeb73982788602de801c3e835d63247d7af174f740 /drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
parent6559a7e8296002b4379e5f2c26a2a3a339d5e60a (diff)
cxgb4: Cleanup macros so they follow the same style and look consistent, part 2
Various patches have ended up changing the style of the symbolic macros/register defines to different style. As a result, the current kernel.org files are a mix of different macro styles. Since this macro/register defines is used by different drivers a few patch series have ended up adding duplicate macro/register define entries with different styles. This makes these register define/macro files a complete mess and we want to make them clean and consistent. This patch cleans up a part of it. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/cxgbi/cxgb4i/cxgb4i.c')
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 3e0a0d315f72..ccacf09c2c16 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -499,10 +499,10 @@ static inline void send_tx_flowc_wr(struct cxgbi_sock *csk)
499 skb = alloc_wr(flowclen, 0, GFP_ATOMIC); 499 skb = alloc_wr(flowclen, 0, GFP_ATOMIC);
500 flowc = (struct fw_flowc_wr *)skb->head; 500 flowc = (struct fw_flowc_wr *)skb->head;
501 flowc->op_to_nparams = 501 flowc->op_to_nparams =
502 htonl(FW_WR_OP(FW_FLOWC_WR) | FW_FLOWC_WR_NPARAMS(8)); 502 htonl(FW_WR_OP_V(FW_FLOWC_WR) | FW_FLOWC_WR_NPARAMS_V(8));
503 flowc->flowid_len16 = 503 flowc->flowid_len16 =
504 htonl(FW_WR_LEN16(DIV_ROUND_UP(72, 16)) | 504 htonl(FW_WR_LEN16_V(DIV_ROUND_UP(72, 16)) |
505 FW_WR_FLOWID(csk->tid)); 505 FW_WR_FLOWID_V(csk->tid));
506 flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; 506 flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN;
507 flowc->mnemval[0].val = htonl(csk->cdev->pfvf); 507 flowc->mnemval[0].val = htonl(csk->cdev->pfvf);
508 flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; 508 flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH;
@@ -542,30 +542,31 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb,
542{ 542{
543 struct fw_ofld_tx_data_wr *req; 543 struct fw_ofld_tx_data_wr *req;
544 unsigned int submode = cxgbi_skcb_ulp_mode(skb) & 3; 544 unsigned int submode = cxgbi_skcb_ulp_mode(skb) & 3;
545 unsigned int wr_ulp_mode = 0; 545 unsigned int wr_ulp_mode = 0, val;
546 546
547 req = (struct fw_ofld_tx_data_wr *)__skb_push(skb, sizeof(*req)); 547 req = (struct fw_ofld_tx_data_wr *)__skb_push(skb, sizeof(*req));
548 548
549 if (is_ofld_imm(skb)) { 549 if (is_ofld_imm(skb)) {
550 req->op_to_immdlen = htonl(FW_WR_OP(FW_OFLD_TX_DATA_WR) | 550 req->op_to_immdlen = htonl(FW_WR_OP_V(FW_OFLD_TX_DATA_WR) |
551 FW_WR_COMPL(1) | 551 FW_WR_COMPL_F |
552 FW_WR_IMMDLEN(dlen)); 552 FW_WR_IMMDLEN_V(dlen));
553 req->flowid_len16 = htonl(FW_WR_FLOWID(csk->tid) | 553 req->flowid_len16 = htonl(FW_WR_FLOWID_V(csk->tid) |
554 FW_WR_LEN16(credits)); 554 FW_WR_LEN16_V(credits));
555 } else { 555 } else {
556 req->op_to_immdlen = 556 req->op_to_immdlen =
557 cpu_to_be32(FW_WR_OP(FW_OFLD_TX_DATA_WR) | 557 cpu_to_be32(FW_WR_OP_V(FW_OFLD_TX_DATA_WR) |
558 FW_WR_COMPL(1) | 558 FW_WR_COMPL_F |
559 FW_WR_IMMDLEN(0)); 559 FW_WR_IMMDLEN_V(0));
560 req->flowid_len16 = 560 req->flowid_len16 =
561 cpu_to_be32(FW_WR_FLOWID(csk->tid) | 561 cpu_to_be32(FW_WR_FLOWID_V(csk->tid) |
562 FW_WR_LEN16(credits)); 562 FW_WR_LEN16_V(credits));
563 } 563 }
564 if (submode) 564 if (submode)
565 wr_ulp_mode = FW_OFLD_TX_DATA_WR_ULPMODE(ULP2_MODE_ISCSI) | 565 wr_ulp_mode = FW_OFLD_TX_DATA_WR_ULPMODE_V(ULP2_MODE_ISCSI) |
566 FW_OFLD_TX_DATA_WR_ULPSUBMODE(submode); 566 FW_OFLD_TX_DATA_WR_ULPSUBMODE_V(submode);
567 val = skb_peek(&csk->write_queue) ? 0 : 1;
567 req->tunnel_to_proxy = htonl(wr_ulp_mode | 568 req->tunnel_to_proxy = htonl(wr_ulp_mode |
568 FW_OFLD_TX_DATA_WR_SHOVE(skb_peek(&csk->write_queue) ? 0 : 1)); 569 FW_OFLD_TX_DATA_WR_SHOVE_V(val));
569 req->plen = htonl(len); 570 req->plen = htonl(len);
570 if (!cxgbi_sock_flag(csk, CTPF_TX_DATA_SENT)) 571 if (!cxgbi_sock_flag(csk, CTPF_TX_DATA_SENT))
571 cxgbi_sock_set_flag(csk, CTPF_TX_DATA_SENT); 572 cxgbi_sock_set_flag(csk, CTPF_TX_DATA_SENT);