bnxt_en: Don't use rtnl lock to protect link change logic in workqueue.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 14 Oct 2017 01:09:30 +0000 (21:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Nov 2018 15:42:46 +0000 (07:42 -0800)
commit3e6250bcd163d96062d156c1d6c2cbd83f2e66ad
tree333637c48d0bc35aa4a80a1e5e2810b4177f9c27
parent2f48581af308e6007e306b5b97744cbc7250e42a
bnxt_en: Don't use rtnl lock to protect link change logic in workqueue.

[ Upstream commit e2dc9b6e38fa3919e63d6d7905da70ca41cbf908 ]

As a further improvement to the PF/VF link change logic, use a private
mutex instead of the rtnl lock to protect link change logic.  With the
new mutex, we don't have to take the rtnl lock in the workqueue when
we have to handle link related functions.  If the VF and PF drivers
are running on the same host and both take the rtnl lock and one is
waiting for the other, it will cause timeout.  This patch fixes these
timeouts.

Fixes: 90c694bb7181 ("bnxt_en: Fix RTNL lock usage on bnxt_update_link().")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c