Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bnxt/bnxt_hwrm.c
Context not available. | |||||
} | } | ||||
int | int | ||||
bnxt_hwrm_func_cfg(struct bnxt_softc *softc) | bnxt_cfg_async_cr(struct bnxt_softc *softc) | ||||
{ | { | ||||
shurd: Possibly this function should be renamed or split?
The implication of bnxt_hwrm_func_cfg() is… | |||||
Not Done Inline ActionsOK. Will modify it as bnxt_cfg_async_cr(). siva.kallam_broadcom.com: OK. Will modify it as bnxt_cfg_async_cr(). | |||||
struct hwrm_func_cfg_input req = {0}; | int rc = 0; | ||||
if (BNXT_PF(softc)) { | |||||
struct hwrm_func_cfg_input req = {0}; | |||||
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG); | bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG); | ||||
req.fid = 0xffff; | req.fid = 0xffff; | ||||
req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); | req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); | ||||
req.async_event_cr = softc->def_cp_ring.ring.phys_id; | |||||
req.async_event_cr = softc->def_cp_ring.ring.phys_id; | rc = hwrm_send_message(softc, &req, sizeof(req)); | ||||
} | |||||
else { | |||||
struct hwrm_func_vf_cfg_input req = {0}; | |||||
return hwrm_send_message(softc, &req, sizeof(req)); | bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_VF_CFG); | ||||
req.enables = htole32(HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); | |||||
req.async_event_cr = softc->def_cp_ring.ring.phys_id; | |||||
rc = hwrm_send_message(softc, &req, sizeof(req)); | |||||
} | |||||
return rc; | |||||
} | } | ||||
int | int | ||||
Context not available. | |||||
return hwrm_send_message(softc, &req, sizeof(req)); | return hwrm_send_message(softc, &req, sizeof(req)); | ||||
} | } | ||||
Context not available. |
Possibly this function should be renamed or split?
The implication of bnxt_hwrm_func_cfg() is that it calls HWRM_FUNC_CFG. Maybe bnxt_cfg_async_cr()? Or split into bnxt_hwrm_func_cfg() and bnxt_hwrm_func_vf_cfg() and have the caller choose the correct function?