OSDN Git Service

bnxt_en: Handle ethernet link being disabled by firmware.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 27 Sep 2020 17:42:15 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Sep 2020 20:35:46 +0000 (13:35 -0700)
commit3128e811b134128aadcf8582dded81b70980f23a
tree74906e5cc309626a494226f2f5f84dd39ffddac7
parent532262ba3b84fe77d7d420a24fa66b167bb0d93e
bnxt_en: Handle ethernet link being disabled by firmware.

On some 200G dual port NICs, if one port is configured to 200G,
firmware will disable the ethernet link on the other port.  Firmware
will send notification to the driver for the disabled port when this
happens.  Define a new field in the link_info structure to keep track
of this state.  The new phy_state field replaces the unused loop_back
field.

Log a message when the phy_state changes state.  In the disabled state,
disallow any PHY configurations on the disabled port as the firmware
will fail all calls to configure the PHY in this state.

Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h