diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2010-10-17 19:10:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-18 09:51:58 -0400 |
commit | adf5f6a18f2cbb215394599981fb48473b526faa (patch) | |
tree | 5f80a00fe5fdb35416b90f142dd0848963e41f51 /drivers/net/bnx2x/bnx2x_cmn.c | |
parent | e3dba8141b651dd8f560a2fd9513b1d26f447f9d (diff) |
bnx2x: do not deal with power if no capability
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_cmn.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_cmn.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index b037dd2db8e5..afff58c52d4f 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c | |||
@@ -1521,6 +1521,12 @@ int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state) | |||
1521 | { | 1521 | { |
1522 | u16 pmcsr; | 1522 | u16 pmcsr; |
1523 | 1523 | ||
1524 | /* If there is no power capability, silently succeed */ | ||
1525 | if (!bp->pm_cap) { | ||
1526 | DP(NETIF_MSG_HW, "No power capability. Breaking.\n"); | ||
1527 | return 0; | ||
1528 | } | ||
1529 | |||
1524 | pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr); | 1530 | pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr); |
1525 | 1531 | ||
1526 | switch (state) { | 1532 | switch (state) { |