projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3dba81
)
bnx2x: do not deal with power if no capability
author
Dmitry Kravkov
<dmitry@broadcom.com>
Sun, 17 Oct 2010 23:10:02 +0000
(23:10 +0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 18 Oct 2010 13:51:58 +0000
(06:51 -0700)
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>
drivers/net/bnx2x/bnx2x_cmn.c
patch
|
blob
|
history
diff --git
a/drivers/net/bnx2x/bnx2x_cmn.c
b/drivers/net/bnx2x/bnx2x_cmn.c
index b037dd2db8e5f81430f3cc6fc9488f4531d857d6..afff58c52d4f8cd449bb8a0f8ce3ea77357f27cf 100644
(file)
--- 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) {