Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194296
b: refs/heads/master
c: d3dbfee
h: refs/heads/master
v: v3
  • Loading branch information
Vladislav Zolotarov authored and David S. Miller committed Apr 19, 2010
1 parent b5db1a6 commit ad7f9f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8eb5a20ccc67d85d52ead88fb263eb28814ca2b4
refs/heads/master: d3dbfee0d5ee4690824cbc5685bc9fe47a12bb8b
12 changes: 9 additions & 3 deletions trunk/drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11935,6 +11935,14 @@ static int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state)
break;

case PCI_D3hot:
/* If there are other clients above don't
shut down the power */
if (atomic_read(&bp->pdev->enable_cnt) != 1)
return 0;
/* Don't shut down the power for emulation and FPGA */
if (CHIP_REV_IS_SLOW(bp))
return 0;

pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
pmcsr |= 3;

Expand Down Expand Up @@ -12551,9 +12559,7 @@ static int bnx2x_close(struct net_device *dev)

/* Unload the driver, release IRQs */
bnx2x_nic_unload(bp, UNLOAD_CLOSE);
if (atomic_read(&bp->pdev->enable_cnt) == 1)
if (!CHIP_REV_IS_SLOW(bp))
bnx2x_set_power_state(bp, PCI_D3hot);
bnx2x_set_power_state(bp, PCI_D3hot);

return 0;
}
Expand Down

0 comments on commit ad7f9f7

Please sign in to comment.