FreeBSD Bugzilla – Attachment 178851 Details for
Bug 208343
[em] wake on lan not working with Intel I219 V2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
IFLIB update for igb, 2nd
iflib_if_em.c.diff (text/plain), 3.34 KB, created by
Kaho Toshikazu
on 2017-01-13 09:11:52 UTC
(
hide
)
Description:
IFLIB update for igb, 2nd
Filename:
MIME Type:
Creator:
Kaho Toshikazu
Created:
2017-01-13 09:11:52 UTC
Size:
3.34 KB
patch
obsolete
>Index: sys/dev/e1000/if_em.c >=================================================================== >--- sys/dev/e1000/if_em.c (revision 312000) >+++ sys/dev/e1000/if_em.c (working copy) >@@ -1734,7 +1734,7 @@ > > e1000_reset_hw(&adapter->hw); > if (adapter->hw.mac.type >= e1000_82544) >- E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); >+ E1000_WRITE_REG(&adapter->hw, E1000_WUFC, 0); > > e1000_led_off(&adapter->hw); > e1000_cleanup_led(&adapter->hw); >@@ -2309,7 +2309,7 @@ > > /* Issue a global reset */ > e1000_reset_hw(hw); >- E1000_WRITE_REG(hw, E1000_WUC, 0); >+ E1000_WRITE_REG(hw, E1000_WUFC, 0); > em_disable_aspm(adapter); > /* and a re-init */ > if (e1000_init_hw(hw) < 0) { >@@ -2510,9 +2510,12 @@ > > /* Enable only WOL MAGIC by default */ > if (adapter->wol) { >- if_setcapabilitiesbit(ifp, IFCAP_WOL, 0); >- if_setcapenablebit(ifp, IFCAP_WOL_MAGIC, 0); >- } >+ if_setcapenablebit(ifp, IFCAP_WOL_MAGIC, >+ IFCAP_WOL_MCAST| IFCAP_WOL_UCAST); >+ } else { >+ if_setcapenablebit(ifp, 0, IFCAP_WOL_MAGIC | >+ IFCAP_WOL_MCAST| IFCAP_WOL_UCAST); >+ } > > /* > * Specify the media types supported by this adapter and register >@@ -3310,6 +3313,15 @@ > case e1000_pch2lan: > case e1000_pch_lpt: > case e1000_pch_spt: >+ case e1000_82575: /* listing all igb devices */ >+ case e1000_82576: >+ case e1000_82580: >+ case e1000_i350: >+ case e1000_i354: >+ case e1000_i210: >+ case e1000_i211: >+ case e1000_vfadapt: >+ case e1000_vfadapt_i350: > apme_mask = E1000_WUC_APME; > adapter->has_amt = TRUE; > eeprom_data = E1000_READ_REG(&adapter->hw, E1000_WUC); >@@ -3389,7 +3401,7 @@ > ctrl |= (E1000_CTRL_SWDPIN2 | E1000_CTRL_SWDPIN3); > E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); > wuc = E1000_READ_REG(&adapter->hw, E1000_WUC); >- wuc |= E1000_WUC_PME_EN ; >+ wuc |= (E1000_WUC_PME_EN | E1000_WUC_APME); > E1000_WRITE_REG(&adapter->hw, E1000_WUC, wuc); > > if ((adapter->hw.mac.type == e1000_ich8lan) || >@@ -3413,6 +3425,9 @@ > if ((if_getcapenable(ifp) & IFCAP_WOL_MAGIC) == 0) > adapter->wol &= ~E1000_WUFC_MAG; > >+ if ((if_getcapenable(ifp) & IFCAP_WOL_UCAST) == 0) >+ adapter->wol &= ~E1000_WUFC_EX; >+ > if ((if_getcapenable(ifp) & IFCAP_WOL_MCAST) == 0) > adapter->wol &= ~E1000_WUFC_MC; > else { >@@ -3421,10 +3436,7 @@ > E1000_WRITE_REG(&adapter->hw, E1000_RCTL, rctl); > } > >- if ((adapter->hw.mac.type == e1000_pchlan) || >- (adapter->hw.mac.type == e1000_pch2lan) || >- (adapter->hw.mac.type == e1000_pch_lpt) || >- (adapter->hw.mac.type == e1000_pch_spt)) { >+ if ( adapter->hw.mac.type >= e1000_pchlan) { > if (em_enable_phy_wakeup(adapter)) > return; > } else { >@@ -3489,7 +3501,7 @@ > > /* enable PHY wakeup in MAC register */ > E1000_WRITE_REG(hw, E1000_WUC, >- E1000_WUC_PHY_WAKE | E1000_WUC_PME_EN); >+ E1000_WUC_PHY_WAKE | E1000_WUC_PME_EN | E1000_WUC_APME); > E1000_WRITE_REG(hw, E1000_WUFC, adapter->wol); > > /* configure and enable PHY wakeup in PHY registers */ >Index: sys/net/iflib.c >=================================================================== >--- sys/net/iflib.c (revision 312000) >+++ sys/net/iflib.c (working copy) >@@ -3382,7 +3382,7 @@ > setmask |= (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); > if ((mask & IFCAP_WOL) && > (if_getcapabilities(ifp) & IFCAP_WOL) != 0) >- setmask |= (mask & (IFCAP_WOL_MCAST|IFCAP_WOL_MAGIC)); >+ setmask |= (mask & IFCAP_WOL); > if_vlancap(ifp); > /* > * want to ensure that traffic has stopped before we change any of the flags
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208343
:
168707
|
177062
|
177103
|
178797
| 178851 |
181517
|
185903