diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2014-11-06 23:05:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-10 12:57:10 -0500 |
commit | e2ac9628959cc152a811931a6422757b137ac4a4 (patch) | |
tree | b73982788602de801c3e835d63247d7af174f740 /drivers/scsi | |
parent | 6559a7e8296002b4379e5f2c26a2a3a339d5e60a (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')
-rw-r--r-- | drivers/scsi/csiostor/csio_attr.c | 8 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_hw.c | 14 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_lnode.c | 18 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_mb.c | 172 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_scsi.c | 24 | ||||
-rw-r--r-- | drivers/scsi/csiostor/csio_wr.h | 2 | ||||
-rw-r--r-- | drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 35 |
7 files changed, 137 insertions, 136 deletions
diff --git a/drivers/scsi/csiostor/csio_attr.c b/drivers/scsi/csiostor/csio_attr.c index 065a87ace623..2d1c4ebd40f9 100644 --- a/drivers/scsi/csiostor/csio_attr.c +++ b/drivers/scsi/csiostor/csio_attr.c | |||
@@ -451,9 +451,9 @@ csio_fcoe_alloc_vnp(struct csio_hw *hw, struct csio_lnode *ln) | |||
451 | 451 | ||
452 | /* Process Mbox response of VNP command */ | 452 | /* Process Mbox response of VNP command */ |
453 | rsp = (struct fw_fcoe_vnp_cmd *)(mbp->mb); | 453 | rsp = (struct fw_fcoe_vnp_cmd *)(mbp->mb); |
454 | if (FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16)) != FW_SUCCESS) { | 454 | if (FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16)) != FW_SUCCESS) { |
455 | csio_ln_err(ln, "FCOE VNP ALLOC cmd returned 0x%x!\n", | 455 | csio_ln_err(ln, "FCOE VNP ALLOC cmd returned 0x%x!\n", |
456 | FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16))); | 456 | FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16))); |
457 | ret = -EINVAL; | 457 | ret = -EINVAL; |
458 | goto out_free; | 458 | goto out_free; |
459 | } | 459 | } |
@@ -526,9 +526,9 @@ csio_fcoe_free_vnp(struct csio_hw *hw, struct csio_lnode *ln) | |||
526 | 526 | ||
527 | /* Process Mbox response of VNP command */ | 527 | /* Process Mbox response of VNP command */ |
528 | rsp = (struct fw_fcoe_vnp_cmd *)(mbp->mb); | 528 | rsp = (struct fw_fcoe_vnp_cmd *)(mbp->mb); |
529 | if (FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16)) != FW_SUCCESS) { | 529 | if (FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16)) != FW_SUCCESS) { |
530 | csio_ln_err(ln, "FCOE VNP FREE cmd returned 0x%x!\n", | 530 | csio_ln_err(ln, "FCOE VNP FREE cmd returned 0x%x!\n", |
531 | FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16))); | 531 | FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16))); |
532 | ret = -EINVAL; | 532 | ret = -EINVAL; |
533 | } | 533 | } |
534 | 534 | ||
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c index 0eaec4748957..5f06877aa7c4 100644 --- a/drivers/scsi/csiostor/csio_hw.c +++ b/drivers/scsi/csiostor/csio_hw.c | |||
@@ -1370,9 +1370,9 @@ csio_hw_fw_config_file(struct csio_hw *hw, | |||
1370 | caps_cmd = (struct fw_caps_config_cmd *)(mbp->mb); | 1370 | caps_cmd = (struct fw_caps_config_cmd *)(mbp->mb); |
1371 | CSIO_INIT_MBP(mbp, caps_cmd, CSIO_MB_DEFAULT_TMO, hw, NULL, 1); | 1371 | CSIO_INIT_MBP(mbp, caps_cmd, CSIO_MB_DEFAULT_TMO, hw, NULL, 1); |
1372 | caps_cmd->op_to_write = | 1372 | caps_cmd->op_to_write = |
1373 | htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | | 1373 | htonl(FW_CMD_OP_V(FW_CAPS_CONFIG_CMD) | |
1374 | FW_CMD_REQUEST | | 1374 | FW_CMD_REQUEST_F | |
1375 | FW_CMD_READ); | 1375 | FW_CMD_READ_F); |
1376 | caps_cmd->cfvalid_to_len16 = | 1376 | caps_cmd->cfvalid_to_len16 = |
1377 | htonl(FW_CAPS_CONFIG_CMD_CFVALID | | 1377 | htonl(FW_CAPS_CONFIG_CMD_CFVALID | |
1378 | FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) | | 1378 | FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) | |
@@ -1407,9 +1407,9 @@ csio_hw_fw_config_file(struct csio_hw *hw, | |||
1407 | * And now tell the firmware to use the configuration we just loaded. | 1407 | * And now tell the firmware to use the configuration we just loaded. |
1408 | */ | 1408 | */ |
1409 | caps_cmd->op_to_write = | 1409 | caps_cmd->op_to_write = |
1410 | htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | | 1410 | htonl(FW_CMD_OP_V(FW_CAPS_CONFIG_CMD) | |
1411 | FW_CMD_REQUEST | | 1411 | FW_CMD_REQUEST_F | |
1412 | FW_CMD_WRITE); | 1412 | FW_CMD_WRITE_F); |
1413 | caps_cmd->cfvalid_to_len16 = htonl(FW_LEN16(*caps_cmd)); | 1413 | caps_cmd->cfvalid_to_len16 = htonl(FW_LEN16(*caps_cmd)); |
1414 | 1414 | ||
1415 | if (csio_mb_issue(hw, mbp)) { | 1415 | if (csio_mb_issue(hw, mbp)) { |
@@ -1678,7 +1678,7 @@ csio_get_fcoe_resinfo(struct csio_hw *hw) | |||
1678 | } | 1678 | } |
1679 | 1679 | ||
1680 | rsp = (struct fw_fcoe_res_info_cmd *)(mbp->mb); | 1680 | rsp = (struct fw_fcoe_res_info_cmd *)(mbp->mb); |
1681 | retval = FW_CMD_RETVAL_GET(ntohl(rsp->retval_len16)); | 1681 | retval = FW_CMD_RETVAL_G(ntohl(rsp->retval_len16)); |
1682 | if (retval != FW_SUCCESS) { | 1682 | if (retval != FW_SUCCESS) { |
1683 | csio_err(hw, "FW_FCOE_RES_INFO_CMD failed with ret x%x\n", | 1683 | csio_err(hw, "FW_FCOE_RES_INFO_CMD failed with ret x%x\n", |
1684 | retval); | 1684 | retval); |
diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c index ffe9be04dc39..48e45b1ea4e5 100644 --- a/drivers/scsi/csiostor/csio_lnode.c +++ b/drivers/scsi/csiostor/csio_lnode.c | |||
@@ -603,7 +603,7 @@ csio_ln_vnp_read_cbfn(struct csio_hw *hw, struct csio_mb *mbp) | |||
603 | enum fw_retval retval; | 603 | enum fw_retval retval; |
604 | __be32 nport_id; | 604 | __be32 nport_id; |
605 | 605 | ||
606 | retval = FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16)); | 606 | retval = FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16)); |
607 | if (retval != FW_SUCCESS) { | 607 | if (retval != FW_SUCCESS) { |
608 | csio_err(hw, "FCOE VNP read cmd returned error:0x%x\n", retval); | 608 | csio_err(hw, "FCOE VNP read cmd returned error:0x%x\n", retval); |
609 | mempool_free(mbp, hw->mb_mempool); | 609 | mempool_free(mbp, hw->mb_mempool); |
@@ -770,7 +770,7 @@ csio_ln_read_fcf_cbfn(struct csio_hw *hw, struct csio_mb *mbp) | |||
770 | (struct fw_fcoe_fcf_cmd *)(mbp->mb); | 770 | (struct fw_fcoe_fcf_cmd *)(mbp->mb); |
771 | enum fw_retval retval; | 771 | enum fw_retval retval; |
772 | 772 | ||
773 | retval = FW_CMD_RETVAL_GET(ntohl(rsp->retval_len16)); | 773 | retval = FW_CMD_RETVAL_G(ntohl(rsp->retval_len16)); |
774 | if (retval != FW_SUCCESS) { | 774 | if (retval != FW_SUCCESS) { |
775 | csio_ln_err(ln, "FCOE FCF cmd failed with ret x%x\n", | 775 | csio_ln_err(ln, "FCOE FCF cmd failed with ret x%x\n", |
776 | retval); | 776 | retval); |
@@ -1506,7 +1506,7 @@ csio_fcoe_fwevt_handler(struct csio_hw *hw, __u8 cpl_op, __be64 *cmd) | |||
1506 | } | 1506 | } |
1507 | } else if (cpl_op == CPL_FW6_PLD) { | 1507 | } else if (cpl_op == CPL_FW6_PLD) { |
1508 | wr = (struct fw_wr_hdr *) (cmd + 4); | 1508 | wr = (struct fw_wr_hdr *) (cmd + 4); |
1509 | if (FW_WR_OP_GET(be32_to_cpu(wr->hi)) | 1509 | if (FW_WR_OP_G(be32_to_cpu(wr->hi)) |
1510 | == FW_RDEV_WR) { | 1510 | == FW_RDEV_WR) { |
1511 | 1511 | ||
1512 | rdev_wr = (struct fw_rdev_wr *) (cmd + 4); | 1512 | rdev_wr = (struct fw_rdev_wr *) (cmd + 4); |
@@ -1574,17 +1574,17 @@ out_pld: | |||
1574 | return; | 1574 | return; |
1575 | } else { | 1575 | } else { |
1576 | csio_warn(hw, "unexpected WR op(0x%x) recv\n", | 1576 | csio_warn(hw, "unexpected WR op(0x%x) recv\n", |
1577 | FW_WR_OP_GET(be32_to_cpu((wr->hi)))); | 1577 | FW_WR_OP_G(be32_to_cpu((wr->hi)))); |
1578 | CSIO_INC_STATS(hw, n_cpl_unexp); | 1578 | CSIO_INC_STATS(hw, n_cpl_unexp); |
1579 | } | 1579 | } |
1580 | } else if (cpl_op == CPL_FW6_MSG) { | 1580 | } else if (cpl_op == CPL_FW6_MSG) { |
1581 | wr = (struct fw_wr_hdr *) (cmd); | 1581 | wr = (struct fw_wr_hdr *) (cmd); |
1582 | if (FW_WR_OP_GET(be32_to_cpu(wr->hi)) == FW_FCOE_ELS_CT_WR) { | 1582 | if (FW_WR_OP_G(be32_to_cpu(wr->hi)) == FW_FCOE_ELS_CT_WR) { |
1583 | csio_ln_mgmt_wr_handler(hw, wr, | 1583 | csio_ln_mgmt_wr_handler(hw, wr, |
1584 | sizeof(struct fw_fcoe_els_ct_wr)); | 1584 | sizeof(struct fw_fcoe_els_ct_wr)); |
1585 | } else { | 1585 | } else { |
1586 | csio_warn(hw, "unexpected WR op(0x%x) recv\n", | 1586 | csio_warn(hw, "unexpected WR op(0x%x) recv\n", |
1587 | FW_WR_OP_GET(be32_to_cpu((wr->hi)))); | 1587 | FW_WR_OP_G(be32_to_cpu((wr->hi)))); |
1588 | CSIO_INC_STATS(hw, n_cpl_unexp); | 1588 | CSIO_INC_STATS(hw, n_cpl_unexp); |
1589 | } | 1589 | } |
1590 | } else { | 1590 | } else { |
@@ -1668,12 +1668,12 @@ csio_ln_prep_ecwr(struct csio_ioreq *io_req, uint32_t wr_len, | |||
1668 | __be32 port_id; | 1668 | __be32 port_id; |
1669 | 1669 | ||
1670 | wr = (struct fw_fcoe_els_ct_wr *)fw_wr; | 1670 | wr = (struct fw_fcoe_els_ct_wr *)fw_wr; |
1671 | wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_FCOE_ELS_CT_WR) | | 1671 | wr->op_immdlen = cpu_to_be32(FW_WR_OP_V(FW_FCOE_ELS_CT_WR) | |
1672 | FW_FCOE_ELS_CT_WR_IMMDLEN(immd_len)); | 1672 | FW_FCOE_ELS_CT_WR_IMMDLEN(immd_len)); |
1673 | 1673 | ||
1674 | wr_len = DIV_ROUND_UP(wr_len, 16); | 1674 | wr_len = DIV_ROUND_UP(wr_len, 16); |
1675 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(flow_id) | | 1675 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(flow_id) | |
1676 | FW_WR_LEN16(wr_len)); | 1676 | FW_WR_LEN16_V(wr_len)); |
1677 | wr->els_ct_type = sub_op; | 1677 | wr->els_ct_type = sub_op; |
1678 | wr->ctl_pri = 0; | 1678 | wr->ctl_pri = 0; |
1679 | wr->cp_en_class = 0; | 1679 | wr->cp_en_class = 0; |
diff --git a/drivers/scsi/csiostor/csio_mb.c b/drivers/scsi/csiostor/csio_mb.c index 15b635142546..ffa848987608 100644 --- a/drivers/scsi/csiostor/csio_mb.c +++ b/drivers/scsi/csiostor/csio_mb.c | |||
@@ -59,7 +59,7 @@ csio_mb_fw_retval(struct csio_mb *mbp) | |||
59 | 59 | ||
60 | hdr = (struct fw_cmd_hdr *)(mbp->mb); | 60 | hdr = (struct fw_cmd_hdr *)(mbp->mb); |
61 | 61 | ||
62 | return FW_CMD_RETVAL_GET(ntohl(hdr->lo)); | 62 | return FW_CMD_RETVAL_G(ntohl(hdr->lo)); |
63 | } | 63 | } |
64 | 64 | ||
65 | /* | 65 | /* |
@@ -81,9 +81,9 @@ csio_mb_hello(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
81 | 81 | ||
82 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); | 82 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); |
83 | 83 | ||
84 | cmdp->op_to_write = htonl(FW_CMD_OP(FW_HELLO_CMD) | | 84 | cmdp->op_to_write = htonl(FW_CMD_OP_V(FW_HELLO_CMD) | |
85 | FW_CMD_REQUEST | FW_CMD_WRITE); | 85 | FW_CMD_REQUEST_F | FW_CMD_WRITE_F); |
86 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 86 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
87 | cmdp->err_to_clearinit = htonl( | 87 | cmdp->err_to_clearinit = htonl( |
88 | FW_HELLO_CMD_MASTERDIS(master == CSIO_MASTER_CANT) | | 88 | FW_HELLO_CMD_MASTERDIS(master == CSIO_MASTER_CANT) | |
89 | FW_HELLO_CMD_MASTERFORCE(master == CSIO_MASTER_MUST) | | 89 | FW_HELLO_CMD_MASTERFORCE(master == CSIO_MASTER_MUST) | |
@@ -112,7 +112,7 @@ csio_mb_process_hello_rsp(struct csio_hw *hw, struct csio_mb *mbp, | |||
112 | struct fw_hello_cmd *rsp = (struct fw_hello_cmd *)(mbp->mb); | 112 | struct fw_hello_cmd *rsp = (struct fw_hello_cmd *)(mbp->mb); |
113 | uint32_t value; | 113 | uint32_t value; |
114 | 114 | ||
115 | *retval = FW_CMD_RETVAL_GET(ntohl(rsp->retval_len16)); | 115 | *retval = FW_CMD_RETVAL_G(ntohl(rsp->retval_len16)); |
116 | 116 | ||
117 | if (*retval == FW_SUCCESS) { | 117 | if (*retval == FW_SUCCESS) { |
118 | hw->fwrev = ntohl(rsp->fwrev); | 118 | hw->fwrev = ntohl(rsp->fwrev); |
@@ -144,9 +144,9 @@ csio_mb_bye(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
144 | 144 | ||
145 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); | 145 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); |
146 | 146 | ||
147 | cmdp->op_to_write = htonl(FW_CMD_OP(FW_BYE_CMD) | | 147 | cmdp->op_to_write = htonl(FW_CMD_OP_V(FW_BYE_CMD) | |
148 | FW_CMD_REQUEST | FW_CMD_WRITE); | 148 | FW_CMD_REQUEST_F | FW_CMD_WRITE_F); |
149 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 149 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
150 | 150 | ||
151 | } | 151 | } |
152 | 152 | ||
@@ -167,9 +167,9 @@ csio_mb_reset(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
167 | 167 | ||
168 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); | 168 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); |
169 | 169 | ||
170 | cmdp->op_to_write = htonl(FW_CMD_OP(FW_RESET_CMD) | | 170 | cmdp->op_to_write = htonl(FW_CMD_OP_V(FW_RESET_CMD) | |
171 | FW_CMD_REQUEST | FW_CMD_WRITE); | 171 | FW_CMD_REQUEST_F | FW_CMD_WRITE_F); |
172 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 172 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
173 | cmdp->val = htonl(reset); | 173 | cmdp->val = htonl(reset); |
174 | cmdp->halt_pkd = htonl(halt); | 174 | cmdp->halt_pkd = htonl(halt); |
175 | 175 | ||
@@ -202,12 +202,12 @@ csio_mb_params(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
202 | 202 | ||
203 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); | 203 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); |
204 | 204 | ||
205 | cmdp->op_to_vfn = htonl(FW_CMD_OP(FW_PARAMS_CMD) | | 205 | cmdp->op_to_vfn = htonl(FW_CMD_OP_V(FW_PARAMS_CMD) | |
206 | FW_CMD_REQUEST | | 206 | FW_CMD_REQUEST_F | |
207 | (wr ? FW_CMD_WRITE : FW_CMD_READ) | | 207 | (wr ? FW_CMD_WRITE_F : FW_CMD_READ_F) | |
208 | FW_PARAMS_CMD_PFN(pf) | | 208 | FW_PARAMS_CMD_PFN(pf) | |
209 | FW_PARAMS_CMD_VFN(vf)); | 209 | FW_PARAMS_CMD_VFN(vf)); |
210 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 210 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
211 | 211 | ||
212 | /* Write Params */ | 212 | /* Write Params */ |
213 | if (wr) { | 213 | if (wr) { |
@@ -245,7 +245,7 @@ csio_mb_process_read_params_rsp(struct csio_hw *hw, struct csio_mb *mbp, | |||
245 | uint32_t i; | 245 | uint32_t i; |
246 | __be32 *p = &rsp->param[0].val; | 246 | __be32 *p = &rsp->param[0].val; |
247 | 247 | ||
248 | *retval = FW_CMD_RETVAL_GET(ntohl(rsp->retval_len16)); | 248 | *retval = FW_CMD_RETVAL_G(ntohl(rsp->retval_len16)); |
249 | 249 | ||
250 | if (*retval == FW_SUCCESS) | 250 | if (*retval == FW_SUCCESS) |
251 | for (i = 0; i < nparams; i++, p += 2) | 251 | for (i = 0; i < nparams; i++, p += 2) |
@@ -271,9 +271,9 @@ csio_mb_ldst(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, int reg) | |||
271 | * specified PCI-E Configuration Space register. | 271 | * specified PCI-E Configuration Space register. |
272 | */ | 272 | */ |
273 | ldst_cmd->op_to_addrspace = | 273 | ldst_cmd->op_to_addrspace = |
274 | htonl(FW_CMD_OP(FW_LDST_CMD) | | 274 | htonl(FW_CMD_OP_V(FW_LDST_CMD) | |
275 | FW_CMD_REQUEST | | 275 | FW_CMD_REQUEST_F | |
276 | FW_CMD_READ | | 276 | FW_CMD_READ_F | |
277 | FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_PCIE)); | 277 | FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_PCIE)); |
278 | ldst_cmd->cycles_to_len16 = htonl(FW_LEN16(struct fw_ldst_cmd)); | 278 | ldst_cmd->cycles_to_len16 = htonl(FW_LEN16(struct fw_ldst_cmd)); |
279 | ldst_cmd->u.pcie.select_naccess = FW_LDST_CMD_NACCESS(1); | 279 | ldst_cmd->u.pcie.select_naccess = FW_LDST_CMD_NACCESS(1); |
@@ -306,10 +306,10 @@ csio_mb_caps_config(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
306 | 306 | ||
307 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, wr ? 0 : 1); | 307 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, wr ? 0 : 1); |
308 | 308 | ||
309 | cmdp->op_to_write = htonl(FW_CMD_OP(FW_CAPS_CONFIG_CMD) | | 309 | cmdp->op_to_write = htonl(FW_CMD_OP_V(FW_CAPS_CONFIG_CMD) | |
310 | FW_CMD_REQUEST | | 310 | FW_CMD_REQUEST_F | |
311 | (wr ? FW_CMD_WRITE : FW_CMD_READ)); | 311 | (wr ? FW_CMD_WRITE_F : FW_CMD_READ_F)); |
312 | cmdp->cfvalid_to_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 312 | cmdp->cfvalid_to_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
313 | 313 | ||
314 | /* Read config */ | 314 | /* Read config */ |
315 | if (!wr) | 315 | if (!wr) |
@@ -351,21 +351,21 @@ csio_mb_port(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
351 | 351 | ||
352 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); | 352 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); |
353 | 353 | ||
354 | cmdp->op_to_portid = htonl(FW_CMD_OP(FW_PORT_CMD) | | 354 | cmdp->op_to_portid = htonl(FW_CMD_OP_V(FW_PORT_CMD) | |
355 | FW_CMD_REQUEST | | 355 | FW_CMD_REQUEST_F | |
356 | (wr ? FW_CMD_EXEC : FW_CMD_READ) | | 356 | (wr ? FW_CMD_EXEC_F : FW_CMD_READ_F) | |
357 | FW_PORT_CMD_PORTID(portid)); | 357 | FW_PORT_CMD_PORTID(portid)); |
358 | if (!wr) { | 358 | if (!wr) { |
359 | cmdp->action_to_len16 = htonl( | 359 | cmdp->action_to_len16 = htonl( |
360 | FW_PORT_CMD_ACTION(FW_PORT_ACTION_GET_PORT_INFO) | | 360 | FW_PORT_CMD_ACTION(FW_PORT_ACTION_GET_PORT_INFO) | |
361 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 361 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
362 | return; | 362 | return; |
363 | } | 363 | } |
364 | 364 | ||
365 | /* Set port */ | 365 | /* Set port */ |
366 | cmdp->action_to_len16 = htonl( | 366 | cmdp->action_to_len16 = htonl( |
367 | FW_PORT_CMD_ACTION(FW_PORT_ACTION_L1_CFG) | | 367 | FW_PORT_CMD_ACTION(FW_PORT_ACTION_L1_CFG) | |
368 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 368 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
369 | 369 | ||
370 | if (fc & PAUSE_RX) | 370 | if (fc & PAUSE_RX) |
371 | lfc |= FW_PORT_CAP_FC_RX; | 371 | lfc |= FW_PORT_CAP_FC_RX; |
@@ -393,7 +393,7 @@ csio_mb_process_read_port_rsp(struct csio_hw *hw, struct csio_mb *mbp, | |||
393 | { | 393 | { |
394 | struct fw_port_cmd *rsp = (struct fw_port_cmd *)(mbp->mb); | 394 | struct fw_port_cmd *rsp = (struct fw_port_cmd *)(mbp->mb); |
395 | 395 | ||
396 | *retval = FW_CMD_RETVAL_GET(ntohl(rsp->action_to_len16)); | 396 | *retval = FW_CMD_RETVAL_G(ntohl(rsp->action_to_len16)); |
397 | 397 | ||
398 | if (*retval == FW_SUCCESS) | 398 | if (*retval == FW_SUCCESS) |
399 | *caps = ntohs(rsp->u.info.pcap); | 399 | *caps = ntohs(rsp->u.info.pcap); |
@@ -415,9 +415,9 @@ csio_mb_initialize(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, | |||
415 | 415 | ||
416 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); | 416 | CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); |
417 | 417 | ||
418 | cmdp->op_to_write = htonl(FW_CMD_OP(FW_INITIALIZE_CMD) | | 418 | cmdp->op_to_write = htonl(FW_CMD_OP_V(FW_INITIALIZE_CMD) | |
419 | FW_CMD_REQUEST | FW_CMD_WRITE); | 419 | FW_CMD_REQUEST_F | FW_CMD_WRITE_F); |
420 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 420 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
421 | 421 | ||
422 | } | 422 | } |
423 | 423 | ||
@@ -443,13 +443,13 @@ csio_mb_iq_alloc(struct csio_hw *hw, struct csio_mb *mbp, void *priv, | |||
443 | 443 | ||
444 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); | 444 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); |
445 | 445 | ||
446 | cmdp->op_to_vfn = htonl(FW_CMD_OP(FW_IQ_CMD) | | 446 | cmdp->op_to_vfn = htonl(FW_CMD_OP_V(FW_IQ_CMD) | |
447 | FW_CMD_REQUEST | FW_CMD_EXEC | | 447 | FW_CMD_REQUEST_F | FW_CMD_EXEC_F | |
448 | FW_IQ_CMD_PFN(iq_params->pfn) | | 448 | FW_IQ_CMD_PFN(iq_params->pfn) | |
449 | FW_IQ_CMD_VFN(iq_params->vfn)); | 449 | FW_IQ_CMD_VFN(iq_params->vfn)); |
450 | 450 | ||
451 | cmdp->alloc_to_len16 = htonl(FW_IQ_CMD_ALLOC | | 451 | cmdp->alloc_to_len16 = htonl(FW_IQ_CMD_ALLOC | |
452 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 452 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
453 | 453 | ||
454 | cmdp->type_to_iqandstindex = htonl( | 454 | cmdp->type_to_iqandstindex = htonl( |
455 | FW_IQ_CMD_VIID(iq_params->viid) | | 455 | FW_IQ_CMD_VIID(iq_params->viid) | |
@@ -499,12 +499,12 @@ csio_mb_iq_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, | |||
499 | if (!cascaded_req) | 499 | if (!cascaded_req) |
500 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); | 500 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); |
501 | 501 | ||
502 | cmdp->op_to_vfn |= htonl(FW_CMD_OP(FW_IQ_CMD) | | 502 | cmdp->op_to_vfn |= htonl(FW_CMD_OP_V(FW_IQ_CMD) | |
503 | FW_CMD_REQUEST | FW_CMD_WRITE | | 503 | FW_CMD_REQUEST_F | FW_CMD_WRITE_F | |
504 | FW_IQ_CMD_PFN(iq_params->pfn) | | 504 | FW_IQ_CMD_PFN(iq_params->pfn) | |
505 | FW_IQ_CMD_VFN(iq_params->vfn)); | 505 | FW_IQ_CMD_VFN(iq_params->vfn)); |
506 | cmdp->alloc_to_len16 |= htonl(iq_start_stop | | 506 | cmdp->alloc_to_len16 |= htonl(iq_start_stop | |
507 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 507 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
508 | cmdp->iqid |= htons(iq_params->iqid); | 508 | cmdp->iqid |= htons(iq_params->iqid); |
509 | cmdp->fl0id |= htons(iq_params->fl0id); | 509 | cmdp->fl0id |= htons(iq_params->fl0id); |
510 | cmdp->fl1id |= htons(iq_params->fl1id); | 510 | cmdp->fl1id |= htons(iq_params->fl1id); |
@@ -588,7 +588,7 @@ csio_mb_iq_alloc_write_rsp(struct csio_hw *hw, struct csio_mb *mbp, | |||
588 | { | 588 | { |
589 | struct fw_iq_cmd *rsp = (struct fw_iq_cmd *)(mbp->mb); | 589 | struct fw_iq_cmd *rsp = (struct fw_iq_cmd *)(mbp->mb); |
590 | 590 | ||
591 | *ret_val = FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16)); | 591 | *ret_val = FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16)); |
592 | if (*ret_val == FW_SUCCESS) { | 592 | if (*ret_val == FW_SUCCESS) { |
593 | iq_params->physiqid = ntohs(rsp->physiqid); | 593 | iq_params->physiqid = ntohs(rsp->physiqid); |
594 | iq_params->iqid = ntohs(rsp->iqid); | 594 | iq_params->iqid = ntohs(rsp->iqid); |
@@ -622,12 +622,12 @@ csio_mb_iq_free(struct csio_hw *hw, struct csio_mb *mbp, void *priv, | |||
622 | 622 | ||
623 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); | 623 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); |
624 | 624 | ||
625 | cmdp->op_to_vfn = htonl(FW_CMD_OP(FW_IQ_CMD) | | 625 | cmdp->op_to_vfn = htonl(FW_CMD_OP_V(FW_IQ_CMD) | |
626 | FW_CMD_REQUEST | FW_CMD_EXEC | | 626 | FW_CMD_REQUEST_F | FW_CMD_EXEC_F | |
627 | FW_IQ_CMD_PFN(iq_params->pfn) | | 627 | FW_IQ_CMD_PFN(iq_params->pfn) | |
628 | FW_IQ_CMD_VFN(iq_params->vfn)); | 628 | FW_IQ_CMD_VFN(iq_params->vfn)); |
629 | cmdp->alloc_to_len16 = htonl(FW_IQ_CMD_FREE | | 629 | cmdp->alloc_to_len16 = htonl(FW_IQ_CMD_FREE | |
630 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 630 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
631 | cmdp->type_to_iqandstindex = htonl(FW_IQ_CMD_TYPE(iq_params->type)); | 631 | cmdp->type_to_iqandstindex = htonl(FW_IQ_CMD_TYPE(iq_params->type)); |
632 | 632 | ||
633 | cmdp->iqid = htons(iq_params->iqid); | 633 | cmdp->iqid = htons(iq_params->iqid); |
@@ -657,12 +657,12 @@ csio_mb_eq_ofld_alloc(struct csio_hw *hw, struct csio_mb *mbp, void *priv, | |||
657 | struct fw_eq_ofld_cmd *cmdp = (struct fw_eq_ofld_cmd *)(mbp->mb); | 657 | struct fw_eq_ofld_cmd *cmdp = (struct fw_eq_ofld_cmd *)(mbp->mb); |
658 | 658 | ||
659 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); | 659 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); |
660 | cmdp->op_to_vfn = htonl(FW_CMD_OP(FW_EQ_OFLD_CMD) | | 660 | cmdp->op_to_vfn = htonl(FW_CMD_OP_V(FW_EQ_OFLD_CMD) | |
661 | FW_CMD_REQUEST | FW_CMD_EXEC | | 661 | FW_CMD_REQUEST_F | FW_CMD_EXEC_F | |
662 | FW_EQ_OFLD_CMD_PFN(eq_ofld_params->pfn) | | 662 | FW_EQ_OFLD_CMD_PFN(eq_ofld_params->pfn) | |
663 | FW_EQ_OFLD_CMD_VFN(eq_ofld_params->vfn)); | 663 | FW_EQ_OFLD_CMD_VFN(eq_ofld_params->vfn)); |
664 | cmdp->alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_ALLOC | | 664 | cmdp->alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_ALLOC | |
665 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 665 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
666 | 666 | ||
667 | } /* csio_mb_eq_ofld_alloc */ | 667 | } /* csio_mb_eq_ofld_alloc */ |
668 | 668 | ||
@@ -704,12 +704,12 @@ csio_mb_eq_ofld_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, | |||
704 | if (!cascaded_req) | 704 | if (!cascaded_req) |
705 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); | 705 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); |
706 | 706 | ||
707 | cmdp->op_to_vfn |= htonl(FW_CMD_OP(FW_EQ_OFLD_CMD) | | 707 | cmdp->op_to_vfn |= htonl(FW_CMD_OP_V(FW_EQ_OFLD_CMD) | |
708 | FW_CMD_REQUEST | FW_CMD_WRITE | | 708 | FW_CMD_REQUEST_F | FW_CMD_WRITE_F | |
709 | FW_EQ_OFLD_CMD_PFN(eq_ofld_params->pfn) | | 709 | FW_EQ_OFLD_CMD_PFN(eq_ofld_params->pfn) | |
710 | FW_EQ_OFLD_CMD_VFN(eq_ofld_params->vfn)); | 710 | FW_EQ_OFLD_CMD_VFN(eq_ofld_params->vfn)); |
711 | cmdp->alloc_to_len16 |= htonl(eq_start_stop | | 711 | cmdp->alloc_to_len16 |= htonl(eq_start_stop | |
712 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 712 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
713 | 713 | ||
714 | cmdp->eqid_pkd |= htonl(FW_EQ_OFLD_CMD_EQID(eq_ofld_params->eqid)); | 714 | cmdp->eqid_pkd |= htonl(FW_EQ_OFLD_CMD_EQID(eq_ofld_params->eqid)); |
715 | 715 | ||
@@ -773,7 +773,7 @@ csio_mb_eq_ofld_alloc_write_rsp(struct csio_hw *hw, | |||
773 | { | 773 | { |
774 | struct fw_eq_ofld_cmd *rsp = (struct fw_eq_ofld_cmd *)(mbp->mb); | 774 | struct fw_eq_ofld_cmd *rsp = (struct fw_eq_ofld_cmd *)(mbp->mb); |
775 | 775 | ||
776 | *ret_val = FW_CMD_RETVAL_GET(ntohl(rsp->alloc_to_len16)); | 776 | *ret_val = FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16)); |
777 | 777 | ||
778 | if (*ret_val == FW_SUCCESS) { | 778 | if (*ret_val == FW_SUCCESS) { |
779 | eq_ofld_params->eqid = FW_EQ_OFLD_CMD_EQID_GET( | 779 | eq_ofld_params->eqid = FW_EQ_OFLD_CMD_EQID_GET( |
@@ -807,12 +807,12 @@ csio_mb_eq_ofld_free(struct csio_hw *hw, struct csio_mb *mbp, void *priv, | |||
807 | 807 | ||
808 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); | 808 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); |
809 | 809 | ||
810 | cmdp->op_to_vfn = htonl(FW_CMD_OP(FW_EQ_OFLD_CMD) | | 810 | cmdp->op_to_vfn = htonl(FW_CMD_OP_V(FW_EQ_OFLD_CMD) | |
811 | FW_CMD_REQUEST | FW_CMD_EXEC | | 811 | FW_CMD_REQUEST_F | FW_CMD_EXEC_F | |
812 | FW_EQ_OFLD_CMD_PFN(eq_ofld_params->pfn) | | 812 | FW_EQ_OFLD_CMD_PFN(eq_ofld_params->pfn) | |
813 | FW_EQ_OFLD_CMD_VFN(eq_ofld_params->vfn)); | 813 | FW_EQ_OFLD_CMD_VFN(eq_ofld_params->vfn)); |
814 | cmdp->alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_FREE | | 814 | cmdp->alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_FREE | |
815 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 815 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
816 | cmdp->eqid_pkd = htonl(FW_EQ_OFLD_CMD_EQID(eq_ofld_params->eqid)); | 816 | cmdp->eqid_pkd = htonl(FW_EQ_OFLD_CMD_EQID(eq_ofld_params->eqid)); |
817 | 817 | ||
818 | } /* csio_mb_eq_ofld_free */ | 818 | } /* csio_mb_eq_ofld_free */ |
@@ -840,15 +840,15 @@ csio_write_fcoe_link_cond_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, | |||
840 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); | 840 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); |
841 | 841 | ||
842 | cmdp->op_to_portid = htonl(( | 842 | cmdp->op_to_portid = htonl(( |
843 | FW_CMD_OP(FW_FCOE_LINK_CMD) | | 843 | FW_CMD_OP_V(FW_FCOE_LINK_CMD) | |
844 | FW_CMD_REQUEST | | 844 | FW_CMD_REQUEST_F | |
845 | FW_CMD_WRITE | | 845 | FW_CMD_WRITE_F | |
846 | FW_FCOE_LINK_CMD_PORTID(port_id))); | 846 | FW_FCOE_LINK_CMD_PORTID(port_id))); |
847 | cmdp->sub_opcode_fcfi = htonl( | 847 | cmdp->sub_opcode_fcfi = htonl( |
848 | FW_FCOE_LINK_CMD_SUB_OPCODE(sub_opcode) | | 848 | FW_FCOE_LINK_CMD_SUB_OPCODE(sub_opcode) | |
849 | FW_FCOE_LINK_CMD_FCFI(fcfi)); | 849 | FW_FCOE_LINK_CMD_FCFI(fcfi)); |
850 | cmdp->lstatus = link_status; | 850 | cmdp->lstatus = link_status; |
851 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 851 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
852 | 852 | ||
853 | } /* csio_write_fcoe_link_cond_init_mb */ | 853 | } /* csio_write_fcoe_link_cond_init_mb */ |
854 | 854 | ||
@@ -873,11 +873,11 @@ csio_fcoe_read_res_info_init_mb(struct csio_hw *hw, struct csio_mb *mbp, | |||
873 | 873 | ||
874 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); | 874 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); |
875 | 875 | ||
876 | cmdp->op_to_read = htonl((FW_CMD_OP(FW_FCOE_RES_INFO_CMD) | | 876 | cmdp->op_to_read = htonl((FW_CMD_OP_V(FW_FCOE_RES_INFO_CMD) | |
877 | FW_CMD_REQUEST | | 877 | FW_CMD_REQUEST_F | |
878 | FW_CMD_READ)); | 878 | FW_CMD_READ_F)); |
879 | 879 | ||
880 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 880 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
881 | 881 | ||
882 | } /* csio_fcoe_read_res_info_init_mb */ | 882 | } /* csio_fcoe_read_res_info_init_mb */ |
883 | 883 | ||
@@ -908,13 +908,13 @@ csio_fcoe_vnp_alloc_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, | |||
908 | 908 | ||
909 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); | 909 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); |
910 | 910 | ||
911 | cmdp->op_to_fcfi = htonl((FW_CMD_OP(FW_FCOE_VNP_CMD) | | 911 | cmdp->op_to_fcfi = htonl((FW_CMD_OP_V(FW_FCOE_VNP_CMD) | |
912 | FW_CMD_REQUEST | | 912 | FW_CMD_REQUEST_F | |
913 | FW_CMD_EXEC | | 913 | FW_CMD_EXEC_F | |
914 | FW_FCOE_VNP_CMD_FCFI(fcfi))); | 914 | FW_FCOE_VNP_CMD_FCFI(fcfi))); |
915 | 915 | ||
916 | cmdp->alloc_to_len16 = htonl(FW_FCOE_VNP_CMD_ALLOC | | 916 | cmdp->alloc_to_len16 = htonl(FW_FCOE_VNP_CMD_ALLOC | |
917 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 917 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
918 | 918 | ||
919 | cmdp->gen_wwn_to_vnpi = htonl(FW_FCOE_VNP_CMD_VNPI(vnpi)); | 919 | cmdp->gen_wwn_to_vnpi = htonl(FW_FCOE_VNP_CMD_VNPI(vnpi)); |
920 | 920 | ||
@@ -948,11 +948,11 @@ csio_fcoe_vnp_read_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, | |||
948 | (struct fw_fcoe_vnp_cmd *)(mbp->mb); | 948 | (struct fw_fcoe_vnp_cmd *)(mbp->mb); |
949 | 949 | ||
950 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); | 950 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); |
951 | cmdp->op_to_fcfi = htonl(FW_CMD_OP(FW_FCOE_VNP_CMD) | | 951 | cmdp->op_to_fcfi = htonl(FW_CMD_OP_V(FW_FCOE_VNP_CMD) | |
952 | FW_CMD_REQUEST | | 952 | FW_CMD_REQUEST_F | |
953 | FW_CMD_READ | | 953 | FW_CMD_READ_F | |
954 | FW_FCOE_VNP_CMD_FCFI(fcfi)); | 954 | FW_FCOE_VNP_CMD_FCFI(fcfi)); |
955 | cmdp->alloc_to_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 955 | cmdp->alloc_to_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
956 | cmdp->gen_wwn_to_vnpi = htonl(FW_FCOE_VNP_CMD_VNPI(vnpi)); | 956 | cmdp->gen_wwn_to_vnpi = htonl(FW_FCOE_VNP_CMD_VNPI(vnpi)); |
957 | } | 957 | } |
958 | 958 | ||
@@ -978,12 +978,12 @@ csio_fcoe_vnp_free_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, | |||
978 | 978 | ||
979 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); | 979 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); |
980 | 980 | ||
981 | cmdp->op_to_fcfi = htonl(FW_CMD_OP(FW_FCOE_VNP_CMD) | | 981 | cmdp->op_to_fcfi = htonl(FW_CMD_OP_V(FW_FCOE_VNP_CMD) | |
982 | FW_CMD_REQUEST | | 982 | FW_CMD_REQUEST_F | |
983 | FW_CMD_EXEC | | 983 | FW_CMD_EXEC_F | |
984 | FW_FCOE_VNP_CMD_FCFI(fcfi)); | 984 | FW_FCOE_VNP_CMD_FCFI(fcfi)); |
985 | cmdp->alloc_to_len16 = htonl(FW_FCOE_VNP_CMD_FREE | | 985 | cmdp->alloc_to_len16 = htonl(FW_FCOE_VNP_CMD_FREE | |
986 | FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 986 | FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
987 | cmdp->gen_wwn_to_vnpi = htonl(FW_FCOE_VNP_CMD_VNPI(vnpi)); | 987 | cmdp->gen_wwn_to_vnpi = htonl(FW_FCOE_VNP_CMD_VNPI(vnpi)); |
988 | } | 988 | } |
989 | 989 | ||
@@ -1009,11 +1009,11 @@ csio_fcoe_read_fcf_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, | |||
1009 | 1009 | ||
1010 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); | 1010 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); |
1011 | 1011 | ||
1012 | cmdp->op_to_fcfi = htonl(FW_CMD_OP(FW_FCOE_FCF_CMD) | | 1012 | cmdp->op_to_fcfi = htonl(FW_CMD_OP_V(FW_FCOE_FCF_CMD) | |
1013 | FW_CMD_REQUEST | | 1013 | FW_CMD_REQUEST_F | |
1014 | FW_CMD_READ | | 1014 | FW_CMD_READ_F | |
1015 | FW_FCOE_FCF_CMD_FCFI(fcfi)); | 1015 | FW_FCOE_FCF_CMD_FCFI(fcfi)); |
1016 | cmdp->retval_len16 = htonl(FW_CMD_LEN16(sizeof(*cmdp) / 16)); | 1016 | cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16)); |
1017 | 1017 | ||
1018 | } /* csio_fcoe_read_fcf_init_mb */ | 1018 | } /* csio_fcoe_read_fcf_init_mb */ |
1019 | 1019 | ||
@@ -1029,9 +1029,9 @@ csio_fcoe_read_portparams_init_mb(struct csio_hw *hw, struct csio_mb *mbp, | |||
1029 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); | 1029 | CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); |
1030 | mbp->mb_size = 64; | 1030 | mbp->mb_size = 64; |
1031 | 1031 | ||
1032 | cmdp->op_to_flowid = htonl(FW_CMD_OP(FW_FCOE_STATS_CMD) | | 1032 | cmdp->op_to_flowid = htonl(FW_CMD_OP_V(FW_FCOE_STATS_CMD) | |
1033 | FW_CMD_REQUEST | FW_CMD_READ); | 1033 | FW_CMD_REQUEST_F | FW_CMD_READ_F); |
1034 | cmdp->free_to_len16 = htonl(FW_CMD_LEN16(CSIO_MAX_MB_SIZE/16)); | 1034 | cmdp->free_to_len16 = htonl(FW_CMD_LEN16_V(CSIO_MAX_MB_SIZE/16)); |
1035 | 1035 | ||
1036 | cmdp->u.ctl.nstats_port = FW_FCOE_STATS_CMD_NSTATS(portparams->nstats) | | 1036 | cmdp->u.ctl.nstats_port = FW_FCOE_STATS_CMD_NSTATS(portparams->nstats) | |
1037 | FW_FCOE_STATS_CMD_PORT(portparams->portid); | 1037 | FW_FCOE_STATS_CMD_PORT(portparams->portid); |
@@ -1053,7 +1053,7 @@ csio_mb_process_portparams_rsp(struct csio_hw *hw, | |||
1053 | uint8_t *src; | 1053 | uint8_t *src; |
1054 | uint8_t *dst; | 1054 | uint8_t *dst; |
1055 | 1055 | ||
1056 | *retval = FW_CMD_RETVAL_GET(ntohl(rsp->free_to_len16)); | 1056 | *retval = FW_CMD_RETVAL_G(ntohl(rsp->free_to_len16)); |
1057 | 1057 | ||
1058 | memset(&stats, 0, sizeof(struct fw_fcoe_port_stats)); | 1058 | memset(&stats, 0, sizeof(struct fw_fcoe_port_stats)); |
1059 | 1059 | ||
@@ -1305,7 +1305,7 @@ csio_mb_issue(struct csio_hw *hw, struct csio_mb *mbp) | |||
1305 | hdr = cpu_to_be64(csio_rd_reg64(hw, data_reg)); | 1305 | hdr = cpu_to_be64(csio_rd_reg64(hw, data_reg)); |
1306 | fw_hdr = (struct fw_cmd_hdr *)&hdr; | 1306 | fw_hdr = (struct fw_cmd_hdr *)&hdr; |
1307 | 1307 | ||
1308 | switch (FW_CMD_OP_GET(ntohl(fw_hdr->hi))) { | 1308 | switch (FW_CMD_OP_G(ntohl(fw_hdr->hi))) { |
1309 | case FW_DEBUG_CMD: | 1309 | case FW_DEBUG_CMD: |
1310 | csio_mb_debug_cmd_handler(hw); | 1310 | csio_mb_debug_cmd_handler(hw); |
1311 | continue; | 1311 | continue; |
@@ -1498,7 +1498,7 @@ csio_mb_isr_handler(struct csio_hw *hw) | |||
1498 | hdr = cpu_to_be64(csio_rd_reg64(hw, data_reg)); | 1498 | hdr = cpu_to_be64(csio_rd_reg64(hw, data_reg)); |
1499 | fw_hdr = (struct fw_cmd_hdr *)&hdr; | 1499 | fw_hdr = (struct fw_cmd_hdr *)&hdr; |
1500 | 1500 | ||
1501 | switch (FW_CMD_OP_GET(ntohl(fw_hdr->hi))) { | 1501 | switch (FW_CMD_OP_G(ntohl(fw_hdr->hi))) { |
1502 | case FW_DEBUG_CMD: | 1502 | case FW_DEBUG_CMD: |
1503 | csio_mb_debug_cmd_handler(hw); | 1503 | csio_mb_debug_cmd_handler(hw); |
1504 | return -EINVAL; | 1504 | return -EINVAL; |
@@ -1571,11 +1571,11 @@ csio_mb_tmo_handler(struct csio_hw *hw) | |||
1571 | fw_hdr = (struct fw_cmd_hdr *)(mbp->mb); | 1571 | fw_hdr = (struct fw_cmd_hdr *)(mbp->mb); |
1572 | 1572 | ||
1573 | csio_dbg(hw, "Mailbox num:%x op:0x%x timed out\n", hw->pfn, | 1573 | csio_dbg(hw, "Mailbox num:%x op:0x%x timed out\n", hw->pfn, |
1574 | FW_CMD_OP_GET(ntohl(fw_hdr->hi))); | 1574 | FW_CMD_OP_G(ntohl(fw_hdr->hi))); |
1575 | 1575 | ||
1576 | mbm->mcurrent = NULL; | 1576 | mbm->mcurrent = NULL; |
1577 | CSIO_INC_STATS(mbm, n_tmo); | 1577 | CSIO_INC_STATS(mbm, n_tmo); |
1578 | fw_hdr->lo = htonl(FW_CMD_RETVAL(FW_ETIMEDOUT)); | 1578 | fw_hdr->lo = htonl(FW_CMD_RETVAL_V(FW_ETIMEDOUT)); |
1579 | 1579 | ||
1580 | return mbp; | 1580 | return mbp; |
1581 | } | 1581 | } |
@@ -1624,10 +1624,10 @@ csio_mb_cancel_all(struct csio_hw *hw, struct list_head *cbfn_q) | |||
1624 | hdr = (struct fw_cmd_hdr *)(mbp->mb); | 1624 | hdr = (struct fw_cmd_hdr *)(mbp->mb); |
1625 | 1625 | ||
1626 | csio_dbg(hw, "Cancelling pending mailbox num %x op:%x\n", | 1626 | csio_dbg(hw, "Cancelling pending mailbox num %x op:%x\n", |
1627 | hw->pfn, FW_CMD_OP_GET(ntohl(hdr->hi))); | 1627 | hw->pfn, FW_CMD_OP_G(ntohl(hdr->hi))); |
1628 | 1628 | ||
1629 | CSIO_INC_STATS(mbm, n_cancel); | 1629 | CSIO_INC_STATS(mbm, n_cancel); |
1630 | hdr->lo = htonl(FW_CMD_RETVAL(FW_HOSTERROR)); | 1630 | hdr->lo = htonl(FW_CMD_RETVAL_V(FW_HOSTERROR)); |
1631 | } | 1631 | } |
1632 | } | 1632 | } |
1633 | 1633 | ||
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index 86103c8475d8..b37c69a2772a 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c | |||
@@ -230,10 +230,10 @@ csio_scsi_init_cmd_wr(struct csio_ioreq *req, void *addr, uint32_t size) | |||
230 | struct csio_dma_buf *dma_buf; | 230 | struct csio_dma_buf *dma_buf; |
231 | uint8_t imm = csio_hw_to_scsim(hw)->proto_cmd_len; | 231 | uint8_t imm = csio_hw_to_scsim(hw)->proto_cmd_len; |
232 | 232 | ||
233 | wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_SCSI_CMD_WR) | | 233 | wr->op_immdlen = cpu_to_be32(FW_WR_OP_V(FW_SCSI_CMD_WR) | |
234 | FW_SCSI_CMD_WR_IMMDLEN(imm)); | 234 | FW_SCSI_CMD_WR_IMMDLEN(imm)); |
235 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(rn->flowid) | | 235 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(rn->flowid) | |
236 | FW_WR_LEN16( | 236 | FW_WR_LEN16_V( |
237 | DIV_ROUND_UP(size, 16))); | 237 | DIV_ROUND_UP(size, 16))); |
238 | 238 | ||
239 | wr->cookie = (uintptr_t) req; | 239 | wr->cookie = (uintptr_t) req; |
@@ -391,10 +391,10 @@ csio_scsi_init_read_wr(struct csio_ioreq *req, void *wrp, uint32_t size) | |||
391 | uint8_t imm = csio_hw_to_scsim(hw)->proto_cmd_len; | 391 | uint8_t imm = csio_hw_to_scsim(hw)->proto_cmd_len; |
392 | struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); | 392 | struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); |
393 | 393 | ||
394 | wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_SCSI_READ_WR) | | 394 | wr->op_immdlen = cpu_to_be32(FW_WR_OP_V(FW_SCSI_READ_WR) | |
395 | FW_SCSI_READ_WR_IMMDLEN(imm)); | 395 | FW_SCSI_READ_WR_IMMDLEN(imm)); |
396 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(rn->flowid) | | 396 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(rn->flowid) | |
397 | FW_WR_LEN16(DIV_ROUND_UP(size, 16))); | 397 | FW_WR_LEN16_V(DIV_ROUND_UP(size, 16))); |
398 | wr->cookie = (uintptr_t)req; | 398 | wr->cookie = (uintptr_t)req; |
399 | wr->iqid = cpu_to_be16(csio_q_physiqid(hw, req->iq_idx)); | 399 | wr->iqid = cpu_to_be16(csio_q_physiqid(hw, req->iq_idx)); |
400 | wr->tmo_val = (uint8_t)(req->tmo); | 400 | wr->tmo_val = (uint8_t)(req->tmo); |
@@ -444,10 +444,10 @@ csio_scsi_init_write_wr(struct csio_ioreq *req, void *wrp, uint32_t size) | |||
444 | uint8_t imm = csio_hw_to_scsim(hw)->proto_cmd_len; | 444 | uint8_t imm = csio_hw_to_scsim(hw)->proto_cmd_len; |
445 | struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); | 445 | struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); |
446 | 446 | ||
447 | wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_SCSI_WRITE_WR) | | 447 | wr->op_immdlen = cpu_to_be32(FW_WR_OP_V(FW_SCSI_WRITE_WR) | |
448 | FW_SCSI_WRITE_WR_IMMDLEN(imm)); | 448 | FW_SCSI_WRITE_WR_IMMDLEN(imm)); |
449 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(rn->flowid) | | 449 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(rn->flowid) | |
450 | FW_WR_LEN16(DIV_ROUND_UP(size, 16))); | 450 | FW_WR_LEN16_V(DIV_ROUND_UP(size, 16))); |
451 | wr->cookie = (uintptr_t)req; | 451 | wr->cookie = (uintptr_t)req; |
452 | wr->iqid = cpu_to_be16(csio_q_physiqid(hw, req->iq_idx)); | 452 | wr->iqid = cpu_to_be16(csio_q_physiqid(hw, req->iq_idx)); |
453 | wr->tmo_val = (uint8_t)(req->tmo); | 453 | wr->tmo_val = (uint8_t)(req->tmo); |
@@ -674,9 +674,9 @@ csio_scsi_init_abrt_cls_wr(struct csio_ioreq *req, void *addr, uint32_t size, | |||
674 | struct csio_rnode *rn = req->rnode; | 674 | struct csio_rnode *rn = req->rnode; |
675 | struct fw_scsi_abrt_cls_wr *wr = (struct fw_scsi_abrt_cls_wr *)addr; | 675 | struct fw_scsi_abrt_cls_wr *wr = (struct fw_scsi_abrt_cls_wr *)addr; |
676 | 676 | ||
677 | wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_SCSI_ABRT_CLS_WR)); | 677 | wr->op_immdlen = cpu_to_be32(FW_WR_OP_V(FW_SCSI_ABRT_CLS_WR)); |
678 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(rn->flowid) | | 678 | wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(rn->flowid) | |
679 | FW_WR_LEN16( | 679 | FW_WR_LEN16_V( |
680 | DIV_ROUND_UP(size, 16))); | 680 | DIV_ROUND_UP(size, 16))); |
681 | 681 | ||
682 | wr->cookie = (uintptr_t) req; | 682 | wr->cookie = (uintptr_t) req; |
diff --git a/drivers/scsi/csiostor/csio_wr.h b/drivers/scsi/csiostor/csio_wr.h index 8d30e7ac1f5e..0c0dd9a658cc 100644 --- a/drivers/scsi/csiostor/csio_wr.h +++ b/drivers/scsi/csiostor/csio_wr.h | |||
@@ -101,7 +101,7 @@ | |||
101 | 101 | ||
102 | /* WR status is at the same position as retval in a CMD header */ | 102 | /* WR status is at the same position as retval in a CMD header */ |
103 | #define csio_wr_status(_wr) \ | 103 | #define csio_wr_status(_wr) \ |
104 | (FW_CMD_RETVAL_GET(ntohl(((struct fw_cmd_hdr *)(_wr))->lo))) | 104 | (FW_CMD_RETVAL_G(ntohl(((struct fw_cmd_hdr *)(_wr))->lo))) |
105 | 105 | ||
106 | struct csio_hw; | 106 | struct csio_hw; |
107 | 107 | ||
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); |