summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorYuval Mintz <yuvalmin@broadcom.com>2013-06-01 23:02:26 +0000
committerDavid S. Miller <davem@davemloft.net>2013-06-02 21:39:29 -0700
commit829a5071ccf040b78bd93286a218580c66833b00 (patch)
tree02a0660743a74d24d052faddd2c500edeec522fb /drivers/net/ethernet/broadcom
parent639d65b85592cf31eca24f33ff00e309ebbf0d2b (diff)
downloadblackbird-op-linux-829a5071ccf040b78bd93286a218580c66833b00.tar.gz
blackbird-op-linux-829a5071ccf040b78bd93286a218580c66833b00.zip
bnx2x: fix a power state test
If PCIe supports PM capabilities, bnx2x will always claim eeprom is accessible as PCI_D0 is zero. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 72b1b59294b4..7c6faebb1838 100644
--- 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;
OpenPOWER on IntegriCloud