From: Sarveshwar Bandi Date: Fri, 23 Aug 2013 09:29:33 +0000 (+0530) Subject: be2net: Check for POST state in suspend-resume sequence X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd5746bf6b48bb837e9f5af14b9b241fc4fdc1ef;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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)