bnx2x: fix a power state test
PATCH 1/1 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 <[email protected]>
Signed-off-by Yuval Mintz <[email protected]>
Signed-off-by Ariel Elior <[email protected]>
Signed-off-by Eilon Greenstein <[email protected]>
---
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(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +2 -1
@@ -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;
Signature · 1 line
1.8.1.227.g44fe835
From: "Yuval Mintz" <[email protected]>
Date: Sun, 2 Jun 2013 12:02:26 +0300
Quoted 7 lines
If PCIe supports PM capabilities, bnx2x will always claim eeprom is accessible as
PCI_D0is 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]>
Applied, thanks.
Thanks, Yuvah.
regards,
dan carpenter