Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/if_em.c
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | static pci_vendor_info_t igb_vendor_info_array[] = | ||||
PVID(0x8086, E1000_DEV_ID_I350_SERDES, "Intel(R) I350 (SERDES)"), | PVID(0x8086, E1000_DEV_ID_I350_SERDES, "Intel(R) I350 (SERDES)"), | ||||
PVID(0x8086, E1000_DEV_ID_I350_SGMII, "Intel(R) I350 (SGMII)"), | PVID(0x8086, E1000_DEV_ID_I350_SGMII, "Intel(R) I350 (SGMII)"), | ||||
PVID(0x8086, E1000_DEV_ID_I350_VF, "Intel(R) I350 Virtual Function"), | PVID(0x8086, E1000_DEV_ID_I350_VF, "Intel(R) I350 Virtual Function"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_COPPER, "Intel(R) I210 (Copper)"), | PVID(0x8086, E1000_DEV_ID_I210_COPPER, "Intel(R) I210 (Copper)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, "Intel(R) I210 IT (Copper)"), | PVID(0x8086, E1000_DEV_ID_I210_COPPER_IT, "Intel(R) I210 IT (Copper)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_COPPER_OEM1, "Intel(R) I210 (OEM)"), | PVID(0x8086, E1000_DEV_ID_I210_COPPER_OEM1, "Intel(R) I210 (OEM)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, "Intel(R) I210 Flashless (Copper)"), | PVID(0x8086, E1000_DEV_ID_I210_COPPER_FLASHLESS, "Intel(R) I210 Flashless (Copper)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, "Intel(R) I210 Flashless (SERDES)"), | PVID(0x8086, E1000_DEV_ID_I210_SERDES_FLASHLESS, "Intel(R) I210 Flashless (SERDES)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_SGMII_FLASHLESS, "Intel(R) I210 Flashless (SGMII)"), | |||||
PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) I210 (Fiber)"), | PVID(0x8086, E1000_DEV_ID_I210_FIBER, "Intel(R) I210 (Fiber)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_SERDES, "Intel(R) I210 (SERDES)"), | PVID(0x8086, E1000_DEV_ID_I210_SERDES, "Intel(R) I210 (SERDES)"), | ||||
PVID(0x8086, E1000_DEV_ID_I210_SGMII, "Intel(R) I210 (SGMII)"), | PVID(0x8086, E1000_DEV_ID_I210_SGMII, "Intel(R) I210 (SGMII)"), | ||||
PVID(0x8086, E1000_DEV_ID_I211_COPPER, "Intel(R) I211 (Copper)"), | PVID(0x8086, E1000_DEV_ID_I211_COPPER, "Intel(R) I211 (Copper)"), | ||||
PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, "Intel(R) I354 (1.0 GbE Backplane)"), | PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_1GBPS, "Intel(R) I354 (1.0 GbE Backplane)"), | ||||
PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, "Intel(R) I354 (2.5 GbE Backplane)"), | PVID(0x8086, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS, "Intel(R) I354 (2.5 GbE Backplane)"), | ||||
PVID(0x8086, E1000_DEV_ID_I354_SGMII, "Intel(R) I354 (SGMII)"), | PVID(0x8086, E1000_DEV_ID_I354_SGMII, "Intel(R) I354 (SGMII)"), | ||||
/* required last entry */ | /* required last entry */ | ||||
▲ Show 20 Lines • Show All 838 Lines • ▼ Show 20 Lines | if (adapter->vf_ifp) { | ||||
bcopy(addr, hw->mac.addr, sizeof(addr)); | bcopy(addr, hw->mac.addr, sizeof(addr)); | ||||
} else { | } else { | ||||
device_printf(dev, "Invalid MAC address\n"); | device_printf(dev, "Invalid MAC address\n"); | ||||
error = EIO; | error = EIO; | ||||
goto err_late; | goto err_late; | ||||
} | } | ||||
} | } | ||||
/* Disable ULP support */ | |||||
e1000_disable_ulp_lpt_lp(hw, TRUE); | |||||
/* | /* | ||||
* Get Wake-on-Lan and Management info for later use | * Get Wake-on-Lan and Management info for later use | ||||
*/ | */ | ||||
em_get_wakeup(ctx); | em_get_wakeup(ctx); | ||||
/* Enable only WOL MAGIC by default */ | /* Enable only WOL MAGIC by default */ | ||||
scctx->isc_capenable &= ~IFCAP_WOL; | scctx->isc_capenable &= ~IFCAP_WOL; | ||||
if (adapter->wol != 0) | if (adapter->wol != 0) | ||||
▲ Show 20 Lines • Show All 2,694 Lines • ▼ Show 20 Lines | em_enable_wakeup(if_ctx_t ctx) | ||||
if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0) | if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0) | ||||
adapter->wol &= ~E1000_WUFC_MC; | adapter->wol &= ~E1000_WUFC_MC; | ||||
else { | else { | ||||
rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); | rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); | ||||
rctl |= E1000_RCTL_MPE; | rctl |= E1000_RCTL_MPE; | ||||
E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl); | E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl); | ||||
} | } | ||||
if (!(adapter->wol & (E1000_WUFC_EX | E1000_WUFC_MAG | E1000_WUFC_MC))) | if (!(adapter->wol & (E1000_WUFC_EX | E1000_WUFC_MAG | E1000_WUFC_MC))) { | ||||
if (adapter->hw.mac.type >= e1000_pch_lpt) { | |||||
e1000_enable_ulp_lpt_lp(&adapter->hw, TRUE); | |||||
} | |||||
goto pme; | goto pme; | ||||
} | |||||
/* Advertise the wakeup capability */ | /* Advertise the wakeup capability */ | ||||
ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); | ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); | ||||
ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); | ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); | ||||
E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); | E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); | ||||
/* Keep the laser running on Fiber adapters */ | /* Keep the laser running on Fiber adapters */ | ||||
if (adapter->hw.phy.media_type == e1000_media_type_fiber || | if (adapter->hw.phy.media_type == e1000_media_type_fiber || | ||||
▲ Show 20 Lines • Show All 867 Lines • Show Last 20 Lines |