]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
qed: Prevent a possible deadlock during driver load and unload
authorTomer Tayar <Tomer.Tayar@cavium.com>
Sun, 19 Aug 2018 21:01:44 +0000 (00:01 +0300)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:25 +0000 (19:51 -0600)
commit550b4cfc7afd3ab9f100a6b2d7b0fb2ae4695dec
tree4ae10631c4ab2d744874aff6bdc3253c3b8860d0
parent61812851d0705a1ece4b8da74b2224b9b9966741
qed: Prevent a possible deadlock during driver load and unload

BugLink: https://bugs.launchpad.net/bugs/1836287
[ Upstream commit eaa50fc59e5841910987e90b0438b2643041f508 ]

The MFW manages an internal lock to prevent concurrent hardware
(de)initialization of different PFs.
This, together with the busy-waiting for the MFW's responses for commands,
might lead to a deadlock during concurrent load or unload of PFs.
This patch adds the option to sleep within the busy-waiting, and uses it
for the (un)load requests (which are not sent from an interrupt context) to
prevent the possible deadlock.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_mcp.h