Commit Graph

18 Commits

Author SHA1 Message Date
msaitoh c0a7c67136 Add yet another PHY workaround. Disable generation of early preamble on 82577
PHY rev. 1 or 2 and 82578 PHY rev. 1.
2019-01-31 15:30:23 +00:00
msaitoh b6ac1fd131 Add some workarounds which use EMI register or EEE related:
- PCH only: Add workaround for link disconnects on a busy hub in half duplex.
 - PCH and PCH2 only: Set MSE higher to enable link to stay up when noise is
   high.
 - PCH2 only: Drop link after 5 times MSE threshold was reached.
 - PCH2 only: Set EEE LPI Update Timer to 200usec.
 - For PCH2 and newer: When connected at 10Mbps half-duplex, some parts are
   excessively aggressive resulting in many collisions. To avoid this, increase
   the IPG and reduce Rx latency in the PHY.
 - For I21[789] and if EEE is enabled: Disable LPLU if both link partners
   support 100BaseT EEE and 100Full is advertised on both ends of the link, and
   enable Auto Enable LPI since there will be no driver to enable LPI while in
   Sx.
2019-01-31 05:20:49 +00:00
msaitoh 909ebfa8a9 Add EEE(802.3az) support for I350, I210, I211, PCH2 and newer.
Not yet for I354(C2000). It'll be supported after implementing MI MII clause
45 register read/write API.
2019-01-07 01:43:22 +00:00
msaitoh 8e20597aca - Don't setup WoL on non-WoL capable port.
- Setup PHY wakeup feature on PCH and newer. Tested on Thinkpad X220.
2018-12-20 09:32:12 +00:00
msaitoh 460c3d0c38 Fix a wrong access to I217_PROXY_CTRL which was added in inbmphreg.h rev. 1.13
and if_wm.c rev. 1.603.
2018-12-13 05:22:44 +00:00
msaitoh 23901b54b6 Add some code for suspend/resume:
- Rename wm_smbustopci() to wm_init_phy_workarounds_pchlan(). It will also
  called when resume.
- Call wm_phy_resetisblocked() after PHY reset in
  wm_init_phy_workarounds_pchlan() to wait for the PHY to quiesce to an
  accessible state.
- Add new wm_resume_workarounds_pchlan() function and use it in wm_resume().
  This workaround is only for PCH2 and newer.
- Don't call wm_disable_aspm() neither in wm_attach() nor in wm_resume()
  but in wm_reset().
- Do some initialization in wm_resume() when IFF_UP is NOT set.
- Don't continue when it failed to acquire semaphore in wm_ulp_disable().
- Add comment.
2018-12-12 08:49:33 +00:00
msaitoh 3b60c1d490 - Add wm_k1_workaround_lv() from FreeBSD. It's PCH2 specifc:
Workaround to set the K1 beacon duration for 82579 parts in 10Mbps.
    Disable K1 for 1000 and 100 speeds.
- Make wm_link_stall_workaround_hv() and move an 82578 specific code into it.
  Don't apply the workaround if BMCR_LOOP bit is set. Same as FreeBSD.
- Add comment. Modify comment.
2018-11-22 15:09:45 +00:00
msaitoh a247df1640 Add workaround for DMA hang problem which result in TX device timeout on
PCH_LPT with I218. Same as FreeBSD and Linux. This woraround is only for
device ID 0x155a, 0x15a2, 0x1559 and 0x15a3. I observed this problem on my
Shuttle DS57U's I218 port six times in two months.
2018-11-02 03:22:19 +00:00
msaitoh 66ef30384e - Call wm_kmrn_lock_loss_workaround_ich8lan() before any PHY access in
wm_linkintr_gmii().
- Register access in wm_kmrn_lock_loss_workaround_ich8lan() now works
  correctly. Enable this function.
- Configure the LCD with the extended configuration region in NVM if it's
  required.
- Add debug printf.
2017-07-13 08:22:20 +00:00
msaitoh acd0729a35 Sync wm_smbustopci() with Linux and FreeBSD. This change effects PCH and
newer devices.
2016-11-16 08:56:17 +00:00
msaitoh a876d694e3 Fix wm_access_phy_wakeup_reg_bm(). This change has no effect because this
function is used for WUC register and our driver currenlty doesn't access
to it.
2016-11-08 10:37:39 +00:00
msaitoh 5f6b90ba37 - Use MII_ADDRMASK.
- Remove debug printf().
2016-10-28 05:50:18 +00:00
msaitoh 40e237eae6 - Drop the host wakeup bit after resetting PHY on PCH and newer devices.
- Increase delay while toggling LANPHYPC
2016-10-19 08:22:57 +00:00
msaitoh 532993fe64 Change page of the OEM_BITS register back to 0 again. The document
(Intel Ethernet Connection I219 Datasheet) says its in page 0.
FreeBSD/Linux code access page 768. WHY?

This change will fix a bug that the LPLU function isn't disabled.

 See: http://mail-index.netbsd.org/source-changes-d/2016/09/19/msg008720.html
2016-09-20 09:24:12 +00:00
msaitoh 375093407f HV_OEM_BITS is not page 0 but page 768. 2016-09-09 06:34:10 +00:00
msaitoh e43e4777a3 82579 support. 2011-05-20 06:06:59 +00:00
msaitoh 844288483e Add forgotten commit (IGP3_KMRN_DIAG_PCS_LOCK_LOSS). 2010-03-07 11:07:01 +00:00
msaitoh 86ff2cac75 Fixes the rx stall problem on 82578 by MANY workaround code.
We need more work for 82577.
2010-01-14 18:56:01 +00:00