The NetBSD Project

CVS log for src/sys/dev/mii/micphy.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / mii

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.15.8.1: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:22:02 2026 UTC (11 days, 10 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +17 -2 lines
Sync with HEAD

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Thu May 7 13:55:44 2026 UTC (6 months, 1 week ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-2-RELEASE
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +17 -2 lines
Pull up following revision(s) (requested by nia in ticket #1257):

	sys/arch/evbarm/conf/GENERIC64: revision 1.232
	sys/dev/mii/micphy.c: revision 1.16
	sys/dev/mii/micphy.c: revision 1.17

Add micphy for Micrel KSZ[89]xxx PHY support
micphy: Apply errata workaround for KSZ9031

This fixes ethernet on an olimex a64 board.
Thanks jmcneill for pointing out the problem.

PR port-arm/60193: olimex a64 - no carrier with emac0 ethernet
micphy: Fill out mii_mpd_model in the sc struct.

The rest of the code expects this to be filled in and the driver
seems stable with this change (at least on my machine).
"ship it!" jmcneill@

Revision 1.15.10.1: download - view: text, markup, annotated - select for diffs
Thu May 7 13:46:47 2026 UTC (6 months, 1 week ago) by martin
Branches: netbsd-11
CVS tags: netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +17 -2 lines
Pull up following revision(s) (requested by nia in ticket #260):

	sys/arch/evbarm/conf/GENERIC64: revision 1.232
	sys/dev/mii/micphy.c: revision 1.16
	sys/dev/mii/micphy.c: revision 1.17

Add micphy for Micrel KSZ[89]xxx PHY support
micphy: Apply errata workaround for KSZ9031

This fixes ethernet on an olimex a64 board.
Thanks jmcneill for pointing out the problem.

PR port-arm/60193: olimex a64 - no carrier with emac0 ethernet
micphy: Fill out mii_mpd_model in the sc struct.

The rest of the code expects this to be filled in and the driver
seems stable with this change (at least on my machine).
"ship it!" jmcneill@

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Apr 21 19:10:32 2026 UTC (6 months, 3 weeks ago) by nia
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +6 -3 lines
micphy: Fill out mii_mpd_model in the sc struct.

The rest of the code expects this to be filled in and the driver
seems stable with this change (at least on my machine).

"ship it!" jmcneill@

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Apr 21 15:57:51 2026 UTC (6 months, 3 weeks ago) by nia
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +14 -2 lines
micphy: Apply errata workaround for KSZ9031

This fixes ethernet on an olimex a64 board, and should be pulled up
to -11, -10, -9...

Thanks jmcneill for pointing out the problem.

PR port-arm/60193: olimex a64 - no carrier with emac0 ethernet

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Oct 31 22:45:13 2022 UTC (4 years ago) by jmcneill
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20250801, perseant-exfatfs-base-20240630, perseant-exfatfs-base, netbsd-11-base, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: perseant-exfatfs, netbsd-11, netbsd-10
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -4 lines
fix blank printf at attach

Revision 1.4.18.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:24 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.4.18.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.18.1: +205 -33 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Mar 28 18:37:18 2020 UTC (6 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +4 -5 lines
Don't set DVF_DETACH_SHUTDOWN.  The MII layer wants to manage the lifecycle
of the PHY devices, and if a NIC driver chooses not to detach its PHYs
at shutdown, that's the driver's business.

PR kern/55121.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Mar 15 23:04:50 2020 UTC (6 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +15 -2 lines
Define and implement a locking protocol for the ifmedia / mii layers:
- MP-safe drivers provide a mutex to ifmedia that is used to serialize
  access to media-related structures / hardware regsiters.  Converted
  drivers use the new ifmedia_init_with_lock() function for this.  The
  new name is provided to ease the transition.
- Un-converted drivers continue to call ifmedia_init(), which will supply
  a compatibility lock to be used instead.  Several media-related entry
  points must be aware of this compatibility lock, and are able to acquire
  it recursively a limited number of times, if needed.  This is a SPIN
  mutex with priority IPL_NET.
- This same lock is used to serialize access to PHY registers and other
  MII-related data structures.

The PHY drivers are modified to acquire and release the lock, as needed,
and assert the lock is held as a diagnostic aid.

The "usbnet" framework has had an overhaul of its internal locking
protocols to fit in with the media / mii changes, and the drivers adapted.

USB wifi drivers have been changed to provide their own adaptive mutex
to the ifmedia later via a new ieee80211_media_init_with_lock() function.
This is required because the USB drivers need an adaptive mutex.

Besised "usbnet", a few other drivers are converted: vmx, wm, ixgbe / ixv.

mcx also now calls ifmedia_init_with_lock() because it needs to also use
an adaptive mutex.  The mcx driver still needs to be fully converted to
NET_MPSAFE.

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:09 2020 UTC (6 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +4 -2 lines
Sync with head.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Feb 14 12:14:33 2020 UTC (6 years, 9 months ago) by nisimura
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -2 lines
add missing two aprint_normal* lines

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Dec 13 08:30:26 2019 UTC (6 years, 11 months ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +6 -6 lines
 KNF. No functional change.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Nov 27 10:19:20 2019 UTC (6 years, 11 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -10 lines
- Simplify sc->mii_anegticks setting. Same as FreeBSD.

   Don't set the default value not in the attach function. Instead, set the
  default value (MII_ANEGTICKS) first in the beginning of the
  mii_phy_add_media(). The function already has the code to change the value to
  MII_ANEGTICKS_GIGE if it's gigabit capable.

- Remove extra pmf_device_register() call. It's done in mii_phy_add_media().

Revision 1.8.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 25 16:53:29 2019 UTC (6 years, 11 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +188 -24 lines
Pull up following revision(s) (requested by msaitoh in ticket #479):

	sys/dev/mii/micphy.c: revision 1.9
	sys/dev/mii/miidevs: revision 1.161
	share/man/man4/micphy.4: revision 1.3

 Add Micrel (now Microchip) KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and
KSZ9477.

 Add support for KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477.
It also supports LAN7430's internal PHY. First wrote by nisimura@ and added
some device support by me. Not tested well.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Nov 6 16:02:53 2019 UTC (7 years ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +188 -24 lines
 Add support for KSZ80[0456]1, KSZ8721, KSZ9[01]31, KS8731 and KSZ9477.
It also supports LAN7430's internal PHY. First wrote by nisimura@ and added
some device support by me. Not tested well.

Revision 1.4.10.2: download - view: text, markup, annotated - select for diffs
Wed Sep 4 08:33:39 2019 UTC (7 years, 2 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.4.10.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.10.1: +3 -3 lines
The gcc on this branch is not smart enough and the build breaks due to
a bogus "may be used uninitialized" warning. Initialize to zero with
XXX gcc comment (suggested by msaitoh).

Revision 1.4.10.1: download - view: text, markup, annotated - select for diffs
Sun Sep 1 10:14:20 2019 UTC (7 years, 2 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +28 -3 lines
Pull up the following revisions, requested by msaitoh in ticket #1349:

	sys/dev/mii/micphy.c		1.6 via patch

Add KSZ8081 support from FreeBSD.

Revision 1.4.18.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:14 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +45 -25 lines
Sync with HEAD

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Mar 25 07:34:13 2019 UTC (7 years, 7 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +16 -17 lines
 KNF. No functional change.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Feb 24 17:22:21 2019 UTC (7 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -10 lines
use a macro to tidy up the phydesc array initialization, from FreeBSD

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Feb 14 04:13:40 2019 UTC (7 years, 9 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +28 -3 lines
Add KSZ8081 support from FreeBSD.

Revision 1.4.16.1: download - view: text, markup, annotated - select for diffs
Sat Jan 26 22:00:06 2019 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +9 -8 lines
Sync with HEAD

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jan 22 17:41:06 2019 UTC (7 years, 9 months ago) by skrll
Branches: MAIN
CVS tags: pgoyette-compat-20190127
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +9 -8 lines
Fix build after API change

Revision 1.1.10.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:06 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.1.10.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.10.2: +2 -3 lines
update from HEAD

Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:03 2016 UTC (10 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3: +3 -4 lines
Sync with HEAD

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:55:41 2016 UTC (10 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncqfixes-base, jdolecek-ncqfixes, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, pgoyette-compat, netbsd-8
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -4 lines
KNF. Remove extra spaces. No functional change.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Sep 26 08:05:00 2014 UTC (12 years, 1 month ago) by ryo
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
s/__diagused/__debugused/ for KDASSERT

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Sep 10 22:46:34 2014 UTC (12 years, 2 months ago) by ryo
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
add __diagused

Revision 1.1.10.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:41 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.1.10.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.10.1: +251 -0 lines
Rebase to HEAD as of a few days ago.

Revision 1.1.6.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:23 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.1.6.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.6.1: +251 -0 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:39 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.1: +251 -0 lines
sync with head

Revision 1.1.10.1
Wed Feb 26 04:13:44 2014 UTC (12 years, 8 months ago) by tls
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.1: +0 -251 lines
file micphy.c was added on branch tls-maxphys on 2014-08-20 00:03:41 +0000

Revision 1.1.6.1
Wed Feb 26 04:13:44 2014 UTC (12 years, 8 months ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.1: +0 -251 lines
file micphy.c was added on branch yamt-pagecache on 2014-05-22 11:40:23 +0000

Revision 1.1.4.1
Wed Feb 26 04:13:44 2014 UTC (12 years, 8 months ago) by rmind
Branches: rmind-smpnet
FILE REMOVED
Changes since revision 1.1: +0 -251 lines
file micphy.c was added on branch rmind-smpnet on 2014-05-18 17:45:39 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Feb 26 04:13:44 2014 UTC (12 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: yamt-pagecache, tls-maxphys, rmind-smpnet
Add Micrel PHY (KSZ9021RN)

The new driver micphy is almost same as ukphy except that
micphy has a fixup for cpsw; a PHY with cpsw has to adjust
RGMII signal timing.

Reviewed by christos@

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>