View | Details | Raw Unified | Return to bug 238411
Collapse All | Expand All

(-)b/sys/dev/e1000/if_em.c (-5 / +23 lines)
Lines 2698-2709 em_reset(if_ctx_t ctx) Link Here
2698
2698
2699
	/* Issue a global reset */
2699
	/* Issue a global reset */
2700
	e1000_reset_hw(hw);
2700
	e1000_reset_hw(hw);
2701
	if (hw->mac.type >= igb_mac_min) {
2702
		E1000_WRITE_REG(hw, E1000_WUC, 0);
2703
	} else {
2704
		E1000_WRITE_REG(hw, E1000_WUFC, 0);
2705
		em_disable_aspm(adapter);
2701
		em_disable_aspm(adapter);
2706
	}
2702
2707
	if (adapter->flags & IGB_MEDIA_RESET) {
2703
	if (adapter->flags & IGB_MEDIA_RESET) {
2708
		e1000_setup_init_funcs(hw, TRUE);
2704
		e1000_setup_init_funcs(hw, TRUE);
2709
		e1000_get_bus_info(hw);
2705
		e1000_get_bus_info(hw);
Lines 3692-3697 em_get_wakeup(if_ctx_t ctx) Link Here
3692
	case e1000_pch2lan:
3688
	case e1000_pch2lan:
3693
	case e1000_pch_lpt:
3689
	case e1000_pch_lpt:
3694
	case e1000_pch_spt:
3690
	case e1000_pch_spt:
3691
	case e1000_pch_cnp:
3692
	case e1000_pch_tgp:
3693
	case e1000_pch_adp:
3694
	case e1000_pch_mtp:
3695
	case e1000_82575:	/* listing all igb devices */
3695
	case e1000_82575:	/* listing all igb devices */
3696
	case e1000_82576:
3696
	case e1000_82576:
3697
	case e1000_82580:
3697
	case e1000_82580:
Lines 3782-3794 em_enable_wakeup(if_ctx_t ctx) Link Here
3782
	 */
3782
	 */
3783
	if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) == 0)
3783
	if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) == 0)
3784
		adapter->wol &= ~E1000_WUFC_MAG;
3784
		adapter->wol &= ~E1000_WUFC_MAG;
3785
	else
3786
		adapter->wol |=  E1000_WUFC_MAG;
3785
3787
3786
	if ((if_getcapenable(ifp) & IFCAP_WOL_UCAST) == 0)
3788
	if ((if_getcapenable(ifp) & IFCAP_WOL_UCAST) == 0)
3787
		adapter->wol &= ~E1000_WUFC_EX;
3789
		adapter->wol &= ~E1000_WUFC_EX;
3790
	else
3791
		adapter->wol |=  E1000_WUFC_EX;
3788
3792
3789
	if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0)
3793
	if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0)
3790
		adapter->wol &= ~E1000_WUFC_MC;
3794
		adapter->wol &= ~E1000_WUFC_MC;
3791
	else {
3795
	else {
3796
		adapter->wol |=  E1000_WUFC_MC;
3792
		rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);
3797
		rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);
3793
		rctl |= E1000_RCTL_MPE;
3798
		rctl |= E1000_RCTL_MPE;
3794
		E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl);
3799
		E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl);
Lines 3935-3941 em_disable_aspm(struct adapter *adapter) Link Here
3935
{
3940
{
3936
	int base, reg;
3941
	int base, reg;
3937
	u16 link_cap,link_ctrl;
3942
	u16 link_cap,link_ctrl;
3943
	u32 wuc;
3938
	device_t dev = adapter->dev;
3944
	device_t dev = adapter->dev;
3945
	struct e1000_hw *hw = &adapter->hw;
3946
3947
	/*
3948
         * untouch PME_EN and APME bits
3949
	 * wake on lan isn't fully disabled but any events isn't connectted
3950
	 */
3951
	wuc = E1000_READ_REG(hw, E1000_WUC);
3952
	wuc &= (E1000_WUC_PME_EN | E1000_WUC_APME);
3953
	E1000_WRITE_REG(hw, E1000_WUC, wuc);
3954
3955
	/* disconnet all events from wakeup */
3956
	E1000_WRITE_REG(hw, E1000_WUFC, 0);
3939
3957
3940
	switch (adapter->hw.mac.type) {
3958
	switch (adapter->hw.mac.type) {
3941
	case e1000_82573:
3959
	case e1000_82573:

Return to bug 238411