]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5b1f8b963cf563945ec440e81426bfa2d0964fd6
tree504f2b0088dd4583b2b06743c96897c9fa554d21
parent79d6ec8a1e14e22748885f948d71a2f945f15e9e
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