]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/net/ethernet/broadcom/bnxt/bnxt.c
bnxt_en: use link_lock instead of hwrm_cmd_lock to protect link_info
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 29 Aug 2021 07:35:03 +0000 (03:35 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Aug 2021 08:35:04 +0000 (09:35 +0100)
commit3c10ed497fa87780a9ee8c31092373e5f1e20f64
tree504f2b0088dd4583b2b06743c96897c9fa554d21
parent2138081708405fb9c16a76a9b6ef46c35d3f17a9
bnxt_en: use link_lock instead of hwrm_cmd_lock to protect link_info

We currently use the hwrm_cmd_lock to serialize the update of the
firmware's link status response data and the copying of link status data
to the VF.  This won't work when we update the firmware message APIs, so
we use the link_lock mutex instead.  All link_info data should be
updated under the link_lock mutex.  Also add link_lock to functions that
touch link_info in __bnxt_open_nic() and bnxt_probe_phy(). The locking
is probably not strictly necessary during probe, but it's more consistent.

Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Reviewed-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_sriov.c