Commit Graph

730 Commits

Author SHA1 Message Date
jmcneill 14738837cf Use symbolic names for chip revision. NFC. 2018-06-19 10:36:41 +00:00
msaitoh c838c9bb48 Regen. 2018-06-19 05:14:36 +00:00
msaitoh 08d559b1e2 All of 88E151[0248]'s model number is 0x001d. 2018-06-19 05:14:16 +00:00
msaitoh 67058b4b65 - All of Marvell PHY's registers from addr 0x0 to 0xf conforms IEEE 802.3
specification, so those register definitions are not required. Use mii.h's
 definitions. Note that E1000_ER_PAR_DETECT_FAULT should be 0x0010 instead of
 0x0100(typo).
- Restore code for BMCR_ISO which was removed in makphy.c rev. 1.44
- Whitespace fix.
2018-06-18 09:12:17 +00:00
msaitoh 9731950d5a - Rename ENP (Extended Next Page) to XNP.
- Add ANLPAR_XNP bit.
- Add definitions for RF1 and RF2 (for 1000BASE-X) .
- Rename MII_ANNP (Autonegotiation next page transmit) register to MII_ANNPT.
- Add bit definitions for MII_ANNPT and MII_ANLPRNP.
- Remove GTSR_LP_ASM_DIR bit. This is not described in the 802.3 spec now and
  no any NetBSD drivers use the definition.
2018-06-18 09:11:03 +00:00
jdolecek 2d5df332d0 switch to using OpenBSD eehpy(4) code to drive maphy(4), synchronizing support
for several special PHY conditions, particularly:
- Properly re-initialise the PHY upon resume
- Store next page in the Link Partner Next Page register for compatibility
  with 802.3ab on 88E3016 PHYs.  Fixes some autonegotiation problems on msk(4)
- Make 88E3016 actually work
- Make sure page 0 is selected when we initialize the PHY.  Fixes problems
  with the eephy(4) that attaches to nfe(4) on machines like the Sun Ultra 40.
  (we had condition for this, now the page 0 is selected for any PHY type)
- Disable fiber/copper auto-selection on the 88E1111 if it is in RGMII mode, to
  work around the fact that the onboard PHYs attached to nfe(4) on the Sun
  X4100 M2 have fiber/copper auto-selection enabled even though the interfaces
  are clearly copper-only

make sure to also add appropriate licenses, since basically nothing
really significant remains out of previous code

use FreeBSD <dev/mii/e1000reg.h> for register definitions as a base instead
of OpenBSD <dev/mii/eephyreg.h>, since it has some extra definitions for some
3016 bits, but add the several extra bits from OpenBSD needed by the code;
removed no longed used <dev/mii/makphyreg.h>

tested with PHY 88E1111, there no particular change observed - the
link status works as it did before, just now it does media nego
even before the interface is up

should however fix 88E3016 support and hence PR kern/49270 and PR kern/53301
2018-06-16 17:44:53 +00:00
jdolecek 75f9f75f0c sort the models, and add several more variants; data found in OpenBSD eephy.c
this also makes makphy match model 88E3016, which adresses PR kern/53301
by Chris Humphries
2018-06-13 23:27:48 +00:00
jdolecek d871fe233a regen 2018-06-13 23:25:41 +00:00
jdolecek b7ee738b08 add E1000 with model id 0x0006, it exists according to OpenBSD
rename E1000 model 0x0000 to E1000_0 for consistency
2018-06-13 23:25:25 +00:00
msaitoh e49c405ce4 Regen. 2018-05-10 02:50:00 +00:00
msaitoh cb68f3415e Add Intel X540 internal PHY. 2018-05-10 02:49:41 +00:00
msaitoh b025b6a5ff KNF in comment. No functional change. 2018-03-05 08:56:49 +00:00
jmcneill 1cf77451c3 Avoid using proplib in rgephy_reset to make LOCKDEBUG happy. 2018-02-03 19:34:01 +00:00
jmcneill c971c5fba1 Add a no-rx-delay device property for RGE8211E that disables RX internal
delay using some undocumented registers. Required for stable gigabit links
on Pine64+.
2017-12-23 12:49:54 +00:00
msaitoh 4499b172f2 Define bit definitions of MDIO_PMAPMD_CTRL1 and MDIO_AN_CTRL1. 2017-11-07 05:33:12 +00:00
martin db5d35351f Do not deref a NULL pointer if no current media has been selected.
This error condition does not happen with properly working hardware, but it is
no good reason for a kernel panic either.
2017-08-12 11:21:15 +00:00
msaitoh 5a852cf570 - Add wm_write_smbus_addr() to set SMBus address by software.
- Modify wm_gmii_hv_{read,write}reg_locked() to make them access HV_SMB_ADDR
  correctly.
- Enable wm_init_lcd_from_nvm() again. Tested by Thinkpad X220.
2017-07-18 08:22:55 +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 e3ec9da383 Update comment. SmartSpeed workaroud code was added in rev. 1.5. No functional
change.
2017-07-06 08:09:05 +00:00
msaitoh c45a60d028 Regen. 2017-07-03 08:29:22 +00:00
msaitoh 8207d057e6 Add X550 and X557. 2017-07-03 08:29:03 +00:00
msaitoh f11b0dcd7e - Update IEEE 802.3 Clause 45 definitions from IEEE 802.3 2009 to IEEE 802.3
2015.
- Modify register names.
- Modify comments.
2017-06-09 04:43:33 +00:00
msaitoh 5ea8386aad Fix typo. 2017-06-07 03:32:39 +00:00
msaitoh 6fa1e87bf8 - Add some bit definitions:
- Unidirectional enable
   - Unidirectional ability
   - Extended Next Page
   - Receive Next Page Location Able
   - Received Next Page Storage Location
   - Data Link Layer Classification capability
   - Enable Physical Layer Classification
   - Invalid Class in PD Class
   - PSE Status bit definitions
- Sort registers
- Modify comments.
2017-06-07 03:21:31 +00:00
msaitoh db571ad1db Fix typos. 2017-06-07 03:08:44 +00:00
msaitoh 0b02239177 Add missing RCS Id. 2017-06-06 04:56:12 +00:00
christos 1a4bdd5296 remove my copyright. 2017-06-03 14:46:29 +00:00
msaitoh 16e92e7fa4 regen. 2017-02-01 05:46:41 +00:00
msaitoh 75a8c0a528 Add some Intel devices. 2017-02-01 05:46:21 +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 c3c841d14e Set mii_mpd_{oui,rev}. 2016-11-08 08:48:35 +00:00
msaitoh bb76968e7c Set mii_mpd_{oui,model,rev}. 2016-11-08 07:22:26 +00:00
msaitoh 50637e2302 Fix previous (s/MII_MAXREGADDR/MII_ADDRMASK/). 2016-11-07 08:57:43 +00:00
msaitoh 31ec994666 Set mii_mpd_{oui,model,rev}. 2016-11-02 10:11:32 +00:00
msaitoh 8fd2b67f97 Set mii_mpd_{oui,model,rev}. 2016-11-02 07:01:54 +00:00
msaitoh 5f6b90ba37 - Use MII_ADDRMASK.
- Remove debug printf().
2016-10-28 05:50:18 +00:00
msaitoh cf241ff9b0 Define MII_ADDRBITS and MII_ADDRMASK. 2016-10-28 05:47:16 +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 8bc54e5be6 KNF. Remove extra spaces. No functional change. 2016-07-07 06:55:38 +00:00
msaitoh d44325eed8 igphy(4),ukphy(4): Set mii_mpd_* entries.
wm(4): check PHY type correctly.
2015-10-30 07:35:30 +00:00
msaitoh 38084de465 No binary change:
- s/IGPPHY/IGPHY/
 - Fix the definition of PLHR_VALID_CHANNEL_*
 - Fix the definition of MSE_CHANNEL_*
 - Add MII_IGPHY_POWER_MGMT
2015-10-26 02:31:31 +00:00
msaitoh 740005e703 - PSCR_TP_LOOPBACK is not bit 0 but bit 4. No binary change because
this macro is not used.
- Rename MII_IGPPHY_PORT_CONFIG's bit definitions from PSCR_ to PSCFR_
  to avoid confusion. PSCR_ is for MII_IGPHY_PORT_CTRL.
2015-10-23 08:40:34 +00:00
msaitoh dc6eeed0a2 Fix incorrect argument of mii_anar(). Fixes PR#50206.
XXX pullup -[567]
2015-09-08 10:16:53 +00:00
pooka 4a6dab945c add some _KERNEL_OPT as the finishing touch 2015-08-24 23:55:04 +00:00
jmcneill b372933f7b add some more RTL8211F bits 2015-08-21 16:29:48 +00:00
jmcneill b7cf07b90b Disable link down power save mode and energy efficient ethernet on RTL8211F. 2015-08-21 12:22:22 +00:00
knakahara 104d6d9fe1 regen 2015-08-14 01:26:38 +00:00