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:
639d65b
)
bnx2x: fix a power state test
author
Yuval Mintz
<
[email protected]
>
Sat, 1 Jun 2013 23:02:26 +0000
(23:02 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 3 Jun 2013 04:39:29 +0000
(21:39 -0700)
If PCIe supports PM capabilities, bnx2x will always claim eeprom is accessible
as PCI_D0 is zero.
Reported-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Yuval Mintz <
[email protected]
>
Signed-off-by: Ariel Elior <
[email protected]
>
Signed-off-by: Eilon Greenstein <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 72b1b59294b45d4c1fb6400942d2078a7f15ae73..7c6faebb1838bbcea2277d70a6a63202addaf9f8 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@
-1390,7
+1390,8
@@
static bool bnx2x_is_nvm_accessible(struct bnx2x *bp)
rc = pci_read_config_word(bp->pdev,
bp->pm_cap + PCI_PM_CTRL, &pm);
- if ((rc && !netif_running(dev)) || (!rc && ((pm & PCI_D0) != PCI_D0)))
+ if ((rc && !netif_running(dev)) ||
+ (!rc && ((pm & PCI_PM_CTRL_STATE_MASK) != PCI_D0)))
return false;
return true;