qed: Avoid sending mailbox commands when MFW is not responsive
authorTomer Tayar <Tomer.Tayar@cavium.com>
Sun, 19 Aug 2018 21:01:45 +0000 (00:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:57 +0000 (17:00 -0700)
commit308206bd277099607d490b4c5337c1eee7d7a1dd
tree91c0c6e49ff0c8c46081585e4fef08de81b1d85e
parent583f866501c1f4294670d29b242e57e8470e7bf9
qed: Avoid sending mailbox commands when MFW is not responsive

[ Upstream commit b310974e041913231b6e3d5d475d4df55c312301 ]

Keep sending mailbox commands to the MFW when it is not responsive ends up
with a redundant amount of timeout expiries.
This patch prints the MCP status on the first command which is not
responded, and blocks the following commands.
Since the (un)load request commands might be not responded due to other
PFs, the patch also adds the option to skip the blocking upon a failure.

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