]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: improve VF error messages when PF is unavailable
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 9 Jan 2022 23:54:43 +0000 (18:54 -0500)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Jan 2022 00:27:23 +0000 (16:27 -0800)
commitc787b779cec201af7aa322dc5ea71251a473e109
treee49be2312fc685d2ad33136e6893b7dd143390ac
parentc245fa5c1722d4bb2f1bf7c34a4008da74969298
bnxt_en: improve VF error messages when PF is unavailable

The current driver design relies on the PF netdev being open in order
to intercept the following HWRM commands from a VF:
    - HWRM_FUNC_VF_CFG
    - HWRM_CFA_L2_FILTER_ALLOC
    - HWRM_PORT_PHY_QCFG (only if FW_CAP_LINK_ADMIN is not supported)

If the PF is closed, then VFs are subjected to rather inscrutable error
messages in response to any configuration requests involving the above
command types. Recent firmware distinguishes this problem case from
other errors by returning HWRM_ERR_CODE_PF_UNAVAILABLE. In most cases,
the appropriate course of action is still to fail, but this can now be
accomplished with the aid of more user informative log messages. For L2
filter allocations that are already asynchronous, an automatic retry
seems more appropriate.

v2: Delete extra newline.

Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c