diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2010-10-17 23:10:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-18 06:51:58 -0700 |
commit | adf5f6a18f2cbb215394599981fb48473b526faa (patch) | |
tree | 5f80a00fe5fdb35416b90f142dd0848963e41f51 /drivers/net/bnx2x/bnx2x_cmn.c | |
parent | e3dba8141b651dd8f560a2fd9513b1d26f447f9d (diff) | |
download | linux-stable-adf5f6a18f2cbb215394599981fb48473b526faa.tar.gz linux-stable-adf5f6a18f2cbb215394599981fb48473b526faa.tar.bz2 linux-stable-adf5f6a18f2cbb215394599981fb48473b526faa.zip |
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) { u16 pmcsr; + /* If there is no power capability, silently succeed */ + if (!bp->pm_cap) { + DP(NETIF_MSG_HW, "No power capability. Breaking.\n"); + return 0; + } + pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr); switch (state) { |