RDMA/cxgb4/csiostor: Cleansup FW related macros/register defines for PF/VF and LDST
This patch cleanups PF/VF and LDST related macros/register defines that are defined in t4fw_api.h and the affected files. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

gecommit door
David S. Miller

bovenliggende
77a80e23cc
commit
5167865aaa
@@ -85,13 +85,13 @@ csio_mb_hello(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo,
|
||||
FW_CMD_REQUEST_F | FW_CMD_WRITE_F);
|
||||
cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16));
|
||||
cmdp->err_to_clearinit = htonl(
|
||||
FW_HELLO_CMD_MASTERDIS(master == CSIO_MASTER_CANT) |
|
||||
FW_HELLO_CMD_MASTERFORCE(master == CSIO_MASTER_MUST) |
|
||||
FW_HELLO_CMD_MBMASTER(master == CSIO_MASTER_MUST ?
|
||||
m_mbox : FW_HELLO_CMD_MBMASTER_MASK) |
|
||||
FW_HELLO_CMD_MBASYNCNOT(a_mbox) |
|
||||
FW_HELLO_CMD_STAGE(fw_hello_cmd_stage_os) |
|
||||
FW_HELLO_CMD_CLEARINIT);
|
||||
FW_HELLO_CMD_MASTERDIS_V(master == CSIO_MASTER_CANT) |
|
||||
FW_HELLO_CMD_MASTERFORCE_V(master == CSIO_MASTER_MUST) |
|
||||
FW_HELLO_CMD_MBMASTER_V(master == CSIO_MASTER_MUST ?
|
||||
m_mbox : FW_HELLO_CMD_MBMASTER_M) |
|
||||
FW_HELLO_CMD_MBASYNCNOT_V(a_mbox) |
|
||||
FW_HELLO_CMD_STAGE_V(fw_hello_cmd_stage_os) |
|
||||
FW_HELLO_CMD_CLEARINIT_F);
|
||||
|
||||
}
|
||||
|
||||
@@ -118,11 +118,11 @@ csio_mb_process_hello_rsp(struct csio_hw *hw, struct csio_mb *mbp,
|
||||
hw->fwrev = ntohl(rsp->fwrev);
|
||||
|
||||
value = ntohl(rsp->err_to_clearinit);
|
||||
*mpfn = FW_HELLO_CMD_MBMASTER_GET(value);
|
||||
*mpfn = FW_HELLO_CMD_MBMASTER_G(value);
|
||||
|
||||
if (value & FW_HELLO_CMD_INIT)
|
||||
if (value & FW_HELLO_CMD_INIT_F)
|
||||
*state = CSIO_DEV_STATE_INIT;
|
||||
else if (value & FW_HELLO_CMD_ERR)
|
||||
else if (value & FW_HELLO_CMD_ERR_F)
|
||||
*state = CSIO_DEV_STATE_ERR;
|
||||
else
|
||||
*state = CSIO_DEV_STATE_UNINIT;
|
||||
@@ -205,8 +205,8 @@ csio_mb_params(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo,
|
||||
cmdp->op_to_vfn = htonl(FW_CMD_OP_V(FW_PARAMS_CMD) |
|
||||
FW_CMD_REQUEST_F |
|
||||
(wr ? FW_CMD_WRITE_F : FW_CMD_READ_F) |
|
||||
FW_PARAMS_CMD_PFN(pf) |
|
||||
FW_PARAMS_CMD_VFN(vf));
|
||||
FW_PARAMS_CMD_PFN_V(pf) |
|
||||
FW_PARAMS_CMD_VFN_V(vf));
|
||||
cmdp->retval_len16 = htonl(FW_CMD_LEN16_V(sizeof(*cmdp) / 16));
|
||||
|
||||
/* Write Params */
|
||||
@@ -274,11 +274,11 @@ csio_mb_ldst(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, int reg)
|
||||
htonl(FW_CMD_OP_V(FW_LDST_CMD) |
|
||||
FW_CMD_REQUEST_F |
|
||||
FW_CMD_READ_F |
|
||||
FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_PCIE));
|
||||
FW_LDST_CMD_ADDRSPACE_V(FW_LDST_ADDRSPC_FUNC_PCIE));
|
||||
ldst_cmd->cycles_to_len16 = htonl(FW_LEN16(struct fw_ldst_cmd));
|
||||
ldst_cmd->u.pcie.select_naccess = FW_LDST_CMD_NACCESS(1);
|
||||
ldst_cmd->u.pcie.select_naccess = FW_LDST_CMD_NACCESS_V(1);
|
||||
ldst_cmd->u.pcie.ctrl_to_fn =
|
||||
(FW_LDST_CMD_LC | FW_LDST_CMD_FN(hw->pfn));
|
||||
(FW_LDST_CMD_LC_F | FW_LDST_CMD_FN_V(hw->pfn));
|
||||
ldst_cmd->u.pcie.r = (uint8_t)reg;
|
||||
}
|
||||
|
||||
|
Verwijs in nieuw issue
Block a user