aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2008-08-13 18:52:46 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-13 19:03:40 -0400
commit72ce58c328d7131d96280135f8be858603522911 (patch)
tree944632cc2d723a66e16e23ef3690dd8225dea671 /drivers/net
parent3101c2bc9043c1499158837648a29dd79ee2f5e7 (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bnx2x_main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index db6a3b9a367c..03218705f513 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)
6897static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp) 6897static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
6898{ 6898{
6899 u32 val, val2, val3, val4, id; 6899 u32 val, val2, val3, val4, id;
6900 u16 pmc;
6900 6901
6901 /* Get the chip revision id and number. */ 6902 /* Get the chip revision id and number. */
6902 /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ 6903 /* 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)
6954 BNX2X_ERR("This driver needs bc_ver %X but found %X," 6955 BNX2X_ERR("This driver needs bc_ver %X but found %X,"
6955 " please upgrade BC\n", BNX2X_BC_VER, val); 6956 " please upgrade BC\n", BNX2X_BC_VER, val);
6956 } 6957 }
6957 BNX2X_DEV_INFO("%sWoL Capable\n", 6958
6958 (bp->flags & NO_WOL_FLAG)? "Not " : ""); 6959 if (BP_E1HVN(bp) == 0) {
6960 pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_PMC, &pmc);
6961 bp->flags |= (pmc & PCI_PM_CAP_PME_D3cold) ? 0 : NO_WOL_FLAG;
6962 } else {
6963 /* no WOL capability for E1HVN != 0 */
6964 bp->flags |= NO_WOL_FLAG;
6965 }
6966 BNX2X_DEV_INFO("%sWoL capable\n",
6967 (bp->flags & NO_WOL_FLAG) ? "Not " : "");
6959 6968
6960 val = SHMEM_RD(bp, dev_info.shared_hw_config.part_num); 6969 val = SHMEM_RD(bp, dev_info.shared_hw_config.part_num);
6961 val2 = SHMEM_RD(bp, dev_info.shared_hw_config.part_num[4]); 6970 val2 = SHMEM_RD(bp, dev_info.shared_hw_config.part_num[4]);