summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSarveshwar Bandi <sarveshwar.bandi@emulex.com>2013-08-23 11:29:33 +0200
committerDavid S. Miller <davem@davemloft.net>2013-08-26 22:55:26 +0200
commitdd5746bf6b48bb837e9f5af14b9b241fc4fdc1ef (patch)
tree193d1d5c61788e49270eed1ad5c78701f97b191e /drivers
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-dd5746bf6b48bb837e9f5af14b9b241fc4fdc1ef.tar.xz
linux-dd5746bf6b48bb837e9f5af14b9b241fc4fdc1ef.zip
be2net: Check for POST state in suspend-resume sequence
In suspend-resume sequence, the OS could attempt to initialize the controller before it is ready, check for POST state before going ahead. Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 4559c35eea13..3d91a5ec61a4 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4373,6 +4373,10 @@ static int be_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
+ status = be_fw_wait_ready(adapter);
+ if (status)
+ return status;
+
/* tell fw we're ready to fire cmds */
status = be_cmd_fw_init(adapter);
if (status)