[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1370163746-30745-1-git-send-email-yuvalmin@broadcom.com>
Date: Sun, 2 Jun 2013 12:02:26 +0300
From: "Yuval Mintz" <yuvalmin@...adcom.com>
To: davem@...emloft.net, netdev@...r.kernel.org,
dan.carpenter@...cle.com
cc: kernel-janitors@...r.kernel.org,
"Yuval Mintz" <yuvalmin@...adcom.com>,
"Ariel Elior" <ariele@...adcom.com>,
"Eilon Greenstein" <eilong@...adcom.com>
Subject: [PATCH net-next] 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@...cle.com>
Signed-off-by: Yuval Mintz <yuvalmin@...adcom.com>
Signed-off-by: Ariel Elior <ariele@...adcom.com>
Signed-off-by: Eilon Greenstein <eilong@...adcom.com>
---
Hi Dave,
Please consider applying this to `net-next'.
Thanks,
Yuval
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 263950c..04a2ad5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -1391,7 +1391,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;
--
1.8.1.227.g44fe835
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists