]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2018 18:34:39 +0000 (11:34 -0700)
commit98d31d8d2f3a9e5a192628c23083c0d5ca3fe44a
treec30440909fcbfd1a3712ebcfb18946867cd50423
parent9ca9ef57d2cd54bb00c5ebb674455893f7cc1731
qed: Prevent a possible deadlock during driver load and unload

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>
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_mcp.h