diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2008-08-13 15:52:46 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-13 16:03:40 -0700 |
commit | 72ce58c328d7131d96280135f8be858603522911 (patch) | |
tree | 944632cc2d723a66e16e23ef3690dd8225dea671 | |
parent | 3101c2bc9043c1499158837648a29dd79ee2f5e7 (diff) | |
download | kernel_samsung_crespo-72ce58c328d7131d96280135f8be858603522911.zip kernel_samsung_crespo-72ce58c328d7131d96280135f8be858603522911.tar.gz kernel_samsung_crespo-72ce58c328d7131d96280135f8be858603522911.tar.bz2 |
bnx2x: WoL capability
WoL capability
All designs reported WoL capability regardless of HW limitations - check
if this device is actually capable of WoL
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bnx2x_main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index db6a3b9..0321870 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -6897,6 +6897,7 @@ static void __devinit bnx2x_undi_unload(struct bnx2x *bp) static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp) { u32 val, val2, val3, val4, id; + u16 pmc; /* Get the chip revision id and number. */ /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ @@ -6954,8 +6955,16 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp) BNX2X_ERR("This driver needs bc_ver %X but found %X," " please upgrade BC\n", BNX2X_BC_VER, val); } - BNX2X_DEV_INFO("%sWoL Capable\n", - (bp->flags & NO_WOL_FLAG)? "Not " : ""); + + if (BP_E1HVN(bp) == 0) { + pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_PMC, &pmc); + bp->flags |= (pmc & PCI_PM_CAP_PME_D3cold) ? 0 : NO_WOL_FLAG; + } else { + /* no WOL capability for E1HVN != 0 */ + bp->flags |= NO_WOL_FLAG; + } + BNX2X_DEV_INFO("%sWoL capable\n", + (bp->flags & NO_WOL_FLAG) ? "Not " : ""); val = SHMEM_RD(bp, dev_info.shared_hw_config.part_num); val2 = SHMEM_RD(bp, dev_info.shared_hw_config.part_num[4]); |