aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index d7c00748e27..c4bc006f510 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -11935,6 +11935,14 @@ static int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state)
11935 break; 11935 break;
11936 11936
11937 case PCI_D3hot: 11937 case PCI_D3hot:
11938 /* If there are other clients above don't
11939 shut down the power */
11940 if (atomic_read(&bp->pdev->enable_cnt) != 1)
11941 return 0;
11942 /* Don't shut down the power for emulation and FPGA */
11943 if (CHIP_REV_IS_SLOW(bp))
11944 return 0;
11945
11938 pmcsr &= ~PCI_PM_CTRL_STATE_MASK; 11946 pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
11939 pmcsr |= 3; 11947 pmcsr |= 3;
11940 11948
@@ -12551,9 +12559,7 @@ static int bnx2x_close(struct net_device *dev)
12551 12559
12552 /* Unload the driver, release IRQs */ 12560 /* Unload the driver, release IRQs */
12553 bnx2x_nic_unload(bp, UNLOAD_CLOSE); 12561 bnx2x_nic_unload(bp, UNLOAD_CLOSE);
12554 if (atomic_read(&bp->pdev->enable_cnt) == 1) 12562 bnx2x_set_power_state(bp, PCI_D3hot);
12555 if (!CHIP_REV_IS_SLOW(bp))
12556 bnx2x_set_power_state(bp, PCI_D3hot);
12557 12563
12558 return 0; 12564 return 0;
12559} 12565}