Mon Oct 7 11:53:41 2019 UTC ()
 Add support IC Plus IP1000* PHYs. PR/kern 42314 first reported by
Tomokazu HARADA and patch provided by Andrius V.


(msaitoh)
diff -r1.1655 -r1.1656 src/distrib/sets/lists/man/mi
diff -r1.683 -r1.684 src/share/man/man4/Makefile
diff -r0 -r1.1 src/share/man/man4/ipgphy.4
diff -r1.27 -r1.28 src/share/man/man4/mii.4
diff -r1.7 -r1.8 src/share/man/man4/vge.4
diff -r1.123 -r1.124 src/sys/arch/amd64/conf/ALL
diff -r1.536 -r1.537 src/sys/arch/amd64/conf/GENERIC
diff -r1.470 -r1.471 src/sys/arch/i386/conf/ALL
diff -r1.1210 -r1.1211 src/sys/arch/i386/conf/GENERIC
diff -r1.321 -r1.322 src/sys/dev/DEVNAMES
diff -r1.50 -r1.51 src/sys/dev/mii/files.mii
diff -r0 -r1.1 src/sys/dev/mii/ipgphy.c
diff -r0 -r1.1 src/sys/dev/mii/ipgphyreg.h
diff -r1.70 -r1.71 src/sys/dev/pci/if_stge.c
diff -r1.5 -r1.6 src/sys/dev/pci/if_stgereg.h

cvs diff -r1.1655 -r1.1656 src/distrib/sets/lists/man/mi (expand / switch to unified diff)

--- src/distrib/sets/lists/man/mi 2019/09/21 14:04:12 1.1655
+++ src/distrib/sets/lists/man/mi 2019/10/07 11:53:40 1.1656
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: mi,v 1.1655 2019/09/21 14:04:12 jmcneill Exp $ 1# $NetBSD: mi,v 1.1656 2019/10/07 11:53:40 msaitoh Exp $
2# 2#
3# Note: don't delete entries from here - mark them as "obsolete" instead. 3# Note: don't delete entries from here - mark them as "obsolete" instead.
4# 4#
5./etc/mtree/set.man man-sys-root 5./etc/mtree/set.man man-sys-root
6./usr/share/info/am-utils.info man-amd-info info 6./usr/share/info/am-utils.info man-amd-info info
7./usr/share/info/as.info man-computil-info binutils,info 7./usr/share/info/as.info man-computil-info binutils,info
8./usr/share/info/awk.info man-util-info info 8./usr/share/info/awk.info man-util-info info
9./usr/share/info/bfd.info man-computil-info binutils,info 9./usr/share/info/bfd.info man-computil-info binutils,info
10./usr/share/info/binutils.info man-computil-info binutils,info 10./usr/share/info/binutils.info man-computil-info binutils,info
11./usr/share/info/bzip2.info man-obsolete obsolete 11./usr/share/info/bzip2.info man-obsolete obsolete
12./usr/share/info/cpp.info man-util-info gcccmds,info 12./usr/share/info/cpp.info man-util-info gcccmds,info
13./usr/share/info/cvs.info man-cvs-info cvs,info 13./usr/share/info/cvs.info man-cvs-info cvs,info
14./usr/share/info/cvsclient.info man-cvs-info cvs,info 14./usr/share/info/cvsclient.info man-cvs-info cvs,info
@@ -1326,26 +1326,27 @@ @@ -1326,26 +1326,27 @@
1326./usr/share/man/cat4/inet6.0 man-sys-catman .cat 1326./usr/share/man/cat4/inet6.0 man-sys-catman .cat
1327./usr/share/man/cat4/inphy.0 man-sys-catman .cat 1327./usr/share/man/cat4/inphy.0 man-sys-catman .cat
1328./usr/share/man/cat4/intersil7170.0 man-sys-catman .cat 1328./usr/share/man/cat4/intersil7170.0 man-sys-catman .cat
1329./usr/share/man/cat4/intro.0 man-sys-catman .cat 1329./usr/share/man/cat4/intro.0 man-sys-catman .cat
1330./usr/share/man/cat4/ioasic.0 man-sys-catman .cat 1330./usr/share/man/cat4/ioasic.0 man-sys-catman .cat
1331./usr/share/man/cat4/ioat.0 man-sys-catman .cat 1331./usr/share/man/cat4/ioat.0 man-sys-catman .cat
1332./usr/share/man/cat4/iop.0 man-sys-catman .cat 1332./usr/share/man/cat4/iop.0 man-sys-catman .cat
1333./usr/share/man/cat4/iophy.0 man-sys-catman .cat 1333./usr/share/man/cat4/iophy.0 man-sys-catman .cat
1334./usr/share/man/cat4/iopsp.0 man-sys-catman .cat 1334./usr/share/man/cat4/iopsp.0 man-sys-catman .cat
1335./usr/share/man/cat4/ip.0 man-sys-catman .cat 1335./usr/share/man/cat4/ip.0 man-sys-catman .cat
1336./usr/share/man/cat4/ip6.0 man-sys-catman .cat 1336./usr/share/man/cat4/ip6.0 man-sys-catman .cat
1337./usr/share/man/cat4/ipf.0 man-ipf-catman ipfilter,.cat 1337./usr/share/man/cat4/ipf.0 man-ipf-catman ipfilter,.cat
1338./usr/share/man/cat4/ipfilter.0 man-ipf-catman ipfilter,.cat 1338./usr/share/man/cat4/ipfilter.0 man-ipf-catman ipfilter,.cat
 1339./usr/share/man/cat4/ipgphy.0 man-sys-catman .cat
1339./usr/share/man/cat4/ipip.0 man-obsolete obsolete 1340./usr/share/man/cat4/ipip.0 man-obsolete obsolete
1340./usr/share/man/cat4/ipkdb.0 man-obsolete obsolete 1341./usr/share/man/cat4/ipkdb.0 man-obsolete obsolete
1341./usr/share/man/cat4/ipl.0 man-ipf-catman ipfilter,.cat 1342./usr/share/man/cat4/ipl.0 man-ipf-catman ipfilter,.cat
1342./usr/share/man/cat4/ipmi.0 man-sys-catman .cat 1343./usr/share/man/cat4/ipmi.0 man-sys-catman .cat
1343./usr/share/man/cat4/ipnat.0 man-ipf-catman ipfilter,.cat 1344./usr/share/man/cat4/ipnat.0 man-ipf-catman ipfilter,.cat
1344./usr/share/man/cat4/ippp.0 man-obsolete obsolete 1345./usr/share/man/cat4/ippp.0 man-obsolete obsolete
1345./usr/share/man/cat4/ipsec.0 man-sys-catman .cat 1346./usr/share/man/cat4/ipsec.0 man-sys-catman .cat
1346./usr/share/man/cat4/ipsecif.0 man-sys-catman .cat 1347./usr/share/man/cat4/ipsecif.0 man-sys-catman .cat
1347./usr/share/man/cat4/ipw.0 man-sys-catman .cat 1348./usr/share/man/cat4/ipw.0 man-sys-catman .cat
1348./usr/share/man/cat4/irda.0 man-sys-catman .cat 1349./usr/share/man/cat4/irda.0 man-sys-catman .cat
1349./usr/share/man/cat4/irframe.0 man-sys-catman .cat 1350./usr/share/man/cat4/irframe.0 man-sys-catman .cat
1350./usr/share/man/cat4/irframetty.0 man-sys-catman .cat 1351./usr/share/man/cat4/irframetty.0 man-sys-catman .cat
1351./usr/share/man/cat4/irip.0 man-obsolete obsolete 1352./usr/share/man/cat4/irip.0 man-obsolete obsolete
@@ -4467,26 +4468,27 @@ @@ -4467,26 +4468,27 @@
4467./usr/share/man/html4/inet6.html man-sys-htmlman html 4468./usr/share/man/html4/inet6.html man-sys-htmlman html
4468./usr/share/man/html4/inphy.html man-sys-htmlman html 4469./usr/share/man/html4/inphy.html man-sys-htmlman html
4469./usr/share/man/html4/intersil7170.html man-sys-htmlman html 4470./usr/share/man/html4/intersil7170.html man-sys-htmlman html
4470./usr/share/man/html4/intro.html man-sys-htmlman html 4471./usr/share/man/html4/intro.html man-sys-htmlman html
4471./usr/share/man/html4/ioasic.html man-sys-htmlman html 4472./usr/share/man/html4/ioasic.html man-sys-htmlman html
4472./usr/share/man/html4/ioat.html man-sys-htmlman html 4473./usr/share/man/html4/ioat.html man-sys-htmlman html
4473./usr/share/man/html4/iop.html man-sys-htmlman html 4474./usr/share/man/html4/iop.html man-sys-htmlman html
4474./usr/share/man/html4/iophy.html man-sys-htmlman html 4475./usr/share/man/html4/iophy.html man-sys-htmlman html
4475./usr/share/man/html4/iopsp.html man-sys-htmlman html 4476./usr/share/man/html4/iopsp.html man-sys-htmlman html
4476./usr/share/man/html4/ip.html man-sys-htmlman html 4477./usr/share/man/html4/ip.html man-sys-htmlman html
4477./usr/share/man/html4/ip6.html man-sys-htmlman html 4478./usr/share/man/html4/ip6.html man-sys-htmlman html
4478./usr/share/man/html4/ipf.html man-ipf-htmlman ipfilter,html 4479./usr/share/man/html4/ipf.html man-ipf-htmlman ipfilter,html
4479./usr/share/man/html4/ipfilter.html man-ipf-htmlman ipfilter,html 4480./usr/share/man/html4/ipfilter.html man-ipf-htmlman ipfilter,html
 4481./usr/share/man/html4/ipgphy.html man-sys-htmlman html
4480./usr/share/man/html4/ipkdb.html man-obsolete obsolete 4482./usr/share/man/html4/ipkdb.html man-obsolete obsolete
4481./usr/share/man/html4/ipl.html man-ipf-htmlman ipfilter,html 4483./usr/share/man/html4/ipl.html man-ipf-htmlman ipfilter,html
4482./usr/share/man/html4/ipmi.html man-sys-htmlman html 4484./usr/share/man/html4/ipmi.html man-sys-htmlman html
4483./usr/share/man/html4/ipnat.html man-ipf-htmlman ipfilter,html 4485./usr/share/man/html4/ipnat.html man-ipf-htmlman ipfilter,html
4484./usr/share/man/html4/ippp.html man-obsolete obsolete 4486./usr/share/man/html4/ippp.html man-obsolete obsolete
4485./usr/share/man/html4/ipsec.html man-sys-htmlman html 4487./usr/share/man/html4/ipsec.html man-sys-htmlman html
4486./usr/share/man/html4/ipsecif.html man-sys-htmlman html 4488./usr/share/man/html4/ipsecif.html man-sys-htmlman html
4487./usr/share/man/html4/ipw.html man-sys-htmlman html 4489./usr/share/man/html4/ipw.html man-sys-htmlman html
4488./usr/share/man/html4/irda.html man-sys-htmlman html 4490./usr/share/man/html4/irda.html man-sys-htmlman html
4489./usr/share/man/html4/irframe.html man-sys-htmlman html 4491./usr/share/man/html4/irframe.html man-sys-htmlman html
4490./usr/share/man/html4/irframetty.html man-sys-htmlman html 4492./usr/share/man/html4/irframetty.html man-sys-htmlman html
4491./usr/share/man/html4/irip.html man-obsolete obsolete 4493./usr/share/man/html4/irip.html man-obsolete obsolete
4492./usr/share/man/html4/irmce.html man-sys-htmlman html 4494./usr/share/man/html4/irmce.html man-sys-htmlman html
@@ -7444,26 +7446,27 @@ @@ -7444,26 +7446,27 @@
7444./usr/share/man/man4/inet6.4 man-sys-man .man 7446./usr/share/man/man4/inet6.4 man-sys-man .man
7445./usr/share/man/man4/inphy.4 man-sys-man .man 7447./usr/share/man/man4/inphy.4 man-sys-man .man
7446./usr/share/man/man4/intersil7170.4 man-sys-man .man 7448./usr/share/man/man4/intersil7170.4 man-sys-man .man
7447./usr/share/man/man4/intro.4 man-sys-man .man 7449./usr/share/man/man4/intro.4 man-sys-man .man
7448./usr/share/man/man4/ioasic.4 man-sys-man .man 7450./usr/share/man/man4/ioasic.4 man-sys-man .man
7449./usr/share/man/man4/ioat.4 man-sys-man .man 7451./usr/share/man/man4/ioat.4 man-sys-man .man
7450./usr/share/man/man4/iop.4 man-sys-man .man 7452./usr/share/man/man4/iop.4 man-sys-man .man
7451./usr/share/man/man4/iophy.4 man-sys-man .man 7453./usr/share/man/man4/iophy.4 man-sys-man .man
7452./usr/share/man/man4/iopsp.4 man-sys-man .man 7454./usr/share/man/man4/iopsp.4 man-sys-man .man
7453./usr/share/man/man4/ip.4 man-sys-man .man 7455./usr/share/man/man4/ip.4 man-sys-man .man
7454./usr/share/man/man4/ip6.4 man-sys-man .man 7456./usr/share/man/man4/ip6.4 man-sys-man .man
7455./usr/share/man/man4/ipf.4 man-sys-man ipfilter,.man 7457./usr/share/man/man4/ipf.4 man-sys-man ipfilter,.man
7456./usr/share/man/man4/ipfilter.4 man-sys-man ipfilter,.man 7458./usr/share/man/man4/ipfilter.4 man-sys-man ipfilter,.man
 7459./usr/share/man/man4/ipgphy.4 man-sys-man .man
7457./usr/share/man/man4/ipip.4 man-obsolete obsolete 7460./usr/share/man/man4/ipip.4 man-obsolete obsolete
7458./usr/share/man/man4/ipkdb.4 man-obsolete obsolete 7461./usr/share/man/man4/ipkdb.4 man-obsolete obsolete
7459./usr/share/man/man4/ipl.4 man-sys-man ipfilter,.man 7462./usr/share/man/man4/ipl.4 man-sys-man ipfilter,.man
7460./usr/share/man/man4/ipmi.4 man-sys-man .man 7463./usr/share/man/man4/ipmi.4 man-sys-man .man
7461./usr/share/man/man4/ipnat.4 man-sys-man ipfilter,.man 7464./usr/share/man/man4/ipnat.4 man-sys-man ipfilter,.man
7462./usr/share/man/man4/ippp.4 man-obsolete obsolete 7465./usr/share/man/man4/ippp.4 man-obsolete obsolete
7463./usr/share/man/man4/ipsec.4 man-sys-man .man 7466./usr/share/man/man4/ipsec.4 man-sys-man .man
7464./usr/share/man/man4/ipsecif.4 man-sys-man .man 7467./usr/share/man/man4/ipsecif.4 man-sys-man .man
7465./usr/share/man/man4/ipw.4 man-sys-man .man 7468./usr/share/man/man4/ipw.4 man-sys-man .man
7466./usr/share/man/man4/irda.4 man-sys-man .man 7469./usr/share/man/man4/irda.4 man-sys-man .man
7467./usr/share/man/man4/irframe.4 man-sys-man .man 7470./usr/share/man/man4/irframe.4 man-sys-man .man
7468./usr/share/man/man4/irframetty.4 man-sys-man .man 7471./usr/share/man/man4/irframetty.4 man-sys-man .man
7469./usr/share/man/man4/irip.4 man-obsolete obsolete 7472./usr/share/man/man4/irip.4 man-obsolete obsolete

cvs diff -r1.683 -r1.684 src/share/man/man4/Makefile (expand / switch to unified diff)

--- src/share/man/man4/Makefile 2019/09/21 14:04:12 1.683
+++ src/share/man/man4/Makefile 2019/10/07 11:53:40 1.684
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.683 2019/09/21 14:04:12 jmcneill Exp $ 1# $NetBSD: Makefile,v 1.684 2019/10/07 11:53:40 msaitoh Exp $
2# @(#)Makefile 8.1 (Berkeley) 6/18/93 2# @(#)Makefile 8.1 (Berkeley) 6/18/93
3 3
4MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ 4MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
5 adbbt.4 adbkbd.4 adbms.4 \ 5 adbbt.4 adbkbd.4 adbms.4 \
6 adc.4 adm1026hm.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \ 6 adc.4 adm1026hm.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \
7 ahcisata.4 ahd.4 aibs.4 alc.4 ale.4 alipm.4 altmem.4 altq.4 \ 7 ahcisata.4 ahd.4 aibs.4 alc.4 ale.4 alipm.4 altmem.4 altq.4 \
8 am2315temp.4 amdpm.4 amdtemp.4 amhphy.4 amr.4 aps.4 asus.4 \ 8 am2315temp.4 amdpm.4 amdtemp.4 amhphy.4 amr.4 aps.4 asus.4 \
9 an.4 arcmsr.4 arcofi.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \ 9 an.4 arcmsr.4 arcofi.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \
10 ath.4 athn.4 atphy.4 atppc.4 attimer.4 atw.4 \ 10 ath.4 athn.4 atphy.4 atppc.4 attimer.4 atw.4 \
11 auacer.4 audio.4 audiocs.4 auich.4 \ 11 auacer.4 audio.4 audiocs.4 auich.4 \
12 auixp.4 autri.4 auvia.4 awi.4 azalia.4 \ 12 auixp.4 autri.4 auvia.4 awi.4 azalia.4 \
13 battery_pmu.4 bba.4 bce.4 bcsp.4 be.4 bge.4 bnx.4 bha.4 \ 13 battery_pmu.4 bba.4 bce.4 bcsp.4 be.4 bge.4 bnx.4 bha.4 \
14 bio.4 bktr.4 bluetooth.4 bmtphy.4 bpf.4 bpfjit.4 \ 14 bio.4 bktr.4 bluetooth.4 bmtphy.4 bpf.4 bpfjit.4 \
@@ -22,27 +22,27 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a @@ -22,27 +22,27 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a
22 ddb.4 ddc.4 de.4 dge.4 dk.4 dm.4 dmoverio.4 \ 22 ddb.4 ddc.4 de.4 dge.4 dk.4 dm.4 dmoverio.4 \
23 dmphy.4 dpt.4 dpti.4 drm.4 drum.4 drvctl.4 dtv.4 dtviic.4 dwctwo.4 \ 23 dmphy.4 dpt.4 dpti.4 drm.4 drum.4 drvctl.4 dtv.4 dtviic.4 dwctwo.4 \
24 eap.4 ebus.4 edc.4 elmc.4 emuxki.4 ena.4 envsys.4 ep.4 esh.4 \ 24 eap.4 ebus.4 edc.4 elmc.4 emuxki.4 ena.4 envsys.4 ep.4 esh.4 \
25 esa.4 esiop.4 esm.4 eso.4 et.4 etphy.4 exphy.4 \ 25 esa.4 esiop.4 esm.4 eso.4 et.4 etphy.4 exphy.4 \
26 fd.4 filemon.4 finsio.4 flash.4 fpa.4 fms.4 fss.4 \ 26 fd.4 filemon.4 finsio.4 flash.4 fpa.4 fms.4 fss.4 \
27 fujbp.4 full.4 fxp.4 \ 27 fujbp.4 full.4 fxp.4 \
28 gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \ 28 gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \
29 glxtphy.4 gpib.4 gpio.4 gpioirq.4 gpiolock.4 gpiopps.4 gpiopwm.4 \ 29 glxtphy.4 gpib.4 gpio.4 gpioirq.4 gpiolock.4 gpiopps.4 gpiopwm.4 \
30 gpiosim.4 gre.4 gphyter.4 gsip.4 \ 30 gpiosim.4 gre.4 gphyter.4 gsip.4 \
31 hdaudio.4 hifn.4 hme.4 hpacel.4 hpqlb.4 hptide.4 hythygtemp.4 \ 31 hdaudio.4 hifn.4 hme.4 hpacel.4 hpqlb.4 hptide.4 hythygtemp.4 \
32 ibmcd.4 ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \ 32 ibmcd.4 ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \
33 ifmedia.4 igmafb.4 igphy.4 igsfb.4 iha.4 ihidev.4 ihphy.4 iic.4 ims.4 \ 33 ifmedia.4 igmafb.4 igphy.4 igsfb.4 iha.4 ihidev.4 ihphy.4 iic.4 ims.4 \
34 inet.4 ikphy.4 inphy.4 intersil7170.4 intro.4 \ 34 inet.4 ikphy.4 inphy.4 intersil7170.4 intro.4 \
35 ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipmi.4 ipw.4 \ 35 ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipgphy.4 ipmi.4 ipw.4 \
36 irmce.4 isp.4 ismt.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 ixg.4 \ 36 irmce.4 isp.4 ismt.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 ixg.4 \
37 ixpide.4 ixv.4 \ 37 ixpide.4 ixv.4 \
38 jme.4 jmide.4 joy.4 \ 38 jme.4 jmide.4 joy.4 \
39 kcov.4 kloader.4 kse.4 ksyms.4 kttcp.4 \ 39 kcov.4 kloader.4 kse.4 ksyms.4 kttcp.4 \
40 l2tp.4 lc.4 ld.4 lii.4 lo.4 lua.4 lxtphy.4 \ 40 l2tp.4 lc.4 ld.4 lii.4 lo.4 lua.4 lxtphy.4 \
41 mainbus.4 makphy.4 malo.4 mbe.4 mca.4 mcclock.4 mcx.4 md.4 mfb.4 \ 41 mainbus.4 makphy.4 malo.4 mbe.4 mca.4 mcclock.4 mcx.4 md.4 mfb.4 \
42 mfi.4 mfii.4 mhzc.4 \ 42 mfi.4 mfii.4 mhzc.4 \
43 micphy.4 midi.4 mii.4 mk48txx.4 mlx.4 mly.4 mpls.4 mpii.4 mpt.4 \ 43 micphy.4 midi.4 mii.4 mk48txx.4 mlx.4 mly.4 mpls.4 mpii.4 mpt.4 \
44 mpu.4 mtd.4 mtio.4 msm6242b.4 multicast.4 mvsata.4 \ 44 mpu.4 mtd.4 mtio.4 msm6242b.4 multicast.4 mvsata.4 \
45 nadb.4 ne.4 neo.4 netintro.4 nfe.4 nfsmb.4 njata.4 njs.4 \ 45 nadb.4 ne.4 neo.4 netintro.4 nfe.4 nfsmb.4 njata.4 njs.4 \
46 nsclpcsio.4 nside.4 nsphy.4 nsphyter.4 ntwoc.4 null.4 nsmb.4 \ 46 nsclpcsio.4 nside.4 nsphy.4 nsphyter.4 ntwoc.4 null.4 nsmb.4 \
47 nvme.4 nvmm.4 \ 47 nvme.4 nvmm.4 \
48 oak.4 oosiop.4 opl.4 options.4 optiide.4 osiop.4 otus.4 \ 48 oak.4 oosiop.4 opl.4 options.4 optiide.4 osiop.4 otus.4 \

File Added: src/share/man/man4/ipgphy.4
.\"	$OpenBSD: ipgphy.4,v 1.5 2009/08/08 17:12:40 naddy Exp $
.\"
.\" Copyright (c) 2006 Brad Smith <brad@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: August 8 2009 $
.Dt IPGPHY 4
.Os
.Sh NAME
.Nm ipgphy
.Nd IC Plus IP1000A/IP1001 10/100/Gigabit Ethernet PHY
.Sh SYNOPSIS
.Cd "ipgphy* at mii?"
.Sh DESCRIPTION
The
.Nm
driver supports the IC Plus IP1000A/IP1001 10/100/Gigabit Ethernet PHY
interface.
.Sh SEE ALSO
.Xr ifmedia 4 ,
.Xr intro 4 ,
.Xr mii 4 ,
.Xr ifconfig 8

cvs diff -r1.27 -r1.28 src/share/man/man4/mii.4 (expand / switch to unified diff)

--- src/share/man/man4/mii.4 2014/03/03 09:10:00 1.27
+++ src/share/man/man4/mii.4 2019/10/07 11:53:40 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: mii.4,v 1.27 2014/03/03 09:10:00 wiz Exp $ 1.\" $NetBSD: mii.4,v 1.28 2019/10/07 11:53:40 msaitoh Exp $
2.\" 2.\"
3.\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 7.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
8.\" NASA Ames Research Center. 8.\" NASA Ames Research Center.
9.\" 9.\"
10.\" Redistribution and use in source and binary forms, with or without 10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions 11.\" modification, are permitted provided that the following conditions
12.\" are met: 12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright 13.\" 1. Redistributions of source code must retain the above copyright
14.\" notice, this list of conditions and the following disclaimer. 14.\" notice, this list of conditions and the following disclaimer.
@@ -39,26 +39,27 @@ @@ -39,26 +39,27 @@
39.Cd "amhphy* at mii? phy ? # AMD 79c901 PHY (10BASE-T part)" 39.Cd "amhphy* at mii? phy ? # AMD 79c901 PHY (10BASE-T part)"
40.Cd "bmtphy* at mii? phy ? # Broadcom BCM5201/5202 PHYs" 40.Cd "bmtphy* at mii? phy ? # Broadcom BCM5201/5202 PHYs"
41.Cd "brgphy* at mii? phy ? # Broadcom BCM5400/5401 Gig-E PHYs" 41.Cd "brgphy* at mii? phy ? # Broadcom BCM5400/5401 Gig-E PHYs"
42.Cd "ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs" 42.Cd "ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs"
43.Cd "dmphy* at mii? phy ? # Davicom DM9101 PHYs" 43.Cd "dmphy* at mii? phy ? # Davicom DM9101 PHYs"
44.Cd "exphy* at mii? phy ? # 3Com internal PHYs" 44.Cd "exphy* at mii? phy ? # 3Com internal PHYs"
45.Cd "gentbi* at mii? phy ? # Generic ten-bit 1000BASE-X PHYs" 45.Cd "gentbi* at mii? phy ? # Generic ten-bit 1000BASE-X PHYs"
46.Cd "glxtphy* at mii? phy ? # Level One LXT-1000 Gig-E PHYs" 46.Cd "glxtphy* at mii? phy ? # Level One LXT-1000 Gig-E PHYs"
47.Cd "gphyter* at mii? phy ? # NatSemi DP83861 Gig-E PHYs" 47.Cd "gphyter* at mii? phy ? # NatSemi DP83861 Gig-E PHYs"
48.Cd "icsphy* at mii? phy ? # Integrated Circuit Systems ICS1890 PHYs" 48.Cd "icsphy* at mii? phy ? # Integrated Circuit Systems ICS1890 PHYs"
49.Cd "ikphy* at mii? phy ? # Intel 82563 PHYs" 49.Cd "ikphy* at mii? phy ? # Intel 82563 PHYs"
50.Cd "inphy* at mii? phy ? # Intel 82555 PHYs" 50.Cd "inphy* at mii? phy ? # Intel 82555 PHYs"
51.Cd "iophy* at mii? phy ? # Intel 82553 PHYs" 51.Cd "iophy* at mii? phy ? # Intel 82553 PHYs"
 52.Cd "ipgphy* at mii? phy ? # IC PLUS IP1000A/IP1001 PHYs"
52.Cd "lxtphy* at mii? phy ? # Level One LXT-970 PHYs" 53.Cd "lxtphy* at mii? phy ? # Level One LXT-970 PHYs"
53.Cd "makphy* at mii? phy ? # Marvel 88E1000 Gig-E PHYs" 54.Cd "makphy* at mii? phy ? # Marvel 88E1000 Gig-E PHYs"
54.Cd "micphy* at mii? phy ? # Micrel KSZ9021 Gig-E PHYs" 55.Cd "micphy* at mii? phy ? # Micrel KSZ9021 Gig-E PHYs"
55.Cd "nsphy* at mii? phy ? # NatSemi DP83840 PHYs" 56.Cd "nsphy* at mii? phy ? # NatSemi DP83840 PHYs"
56.Cd "nsphyter* at mii? phy ? # NatSemi DP83843/DP83815 PHYs" 57.Cd "nsphyter* at mii? phy ? # NatSemi DP83843/DP83815 PHYs"
57.Cd "pnaphy* at mii? phy ? # Generic HomePNA PHYs" 58.Cd "pnaphy* at mii? phy ? # Generic HomePNA PHYs"
58.Cd "qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs" 59.Cd "qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs"
59.Cd "rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs" 60.Cd "rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs"
60.Cd "rlphy* at mii? phy ? # Realtek 8139/8201L PHYs" 61.Cd "rlphy* at mii? phy ? # Realtek 8139/8201L PHYs"
61.Cd "sqphy* at mii? phy ? # Seeq 80220/80221/80223/80225 PHYs" 62.Cd "sqphy* at mii? phy ? # Seeq 80220/80221/80223/80225 PHYs"
62.Cd "tlphy* at mii? phy ? # ThunderLAN internal PHYs" 63.Cd "tlphy* at mii? phy ? # ThunderLAN internal PHYs"
63.Cd "tqphy* at mii? phy ? # TSC Semiconductor 78Q2120 PHYs" 64.Cd "tqphy* at mii? phy ? # TSC Semiconductor 78Q2120 PHYs"
64.Cd "ukphy* at mii? phy ? # Generic/unknown PHYs" 65.Cd "ukphy* at mii? phy ? # Generic/unknown PHYs"

cvs diff -r1.7 -r1.8 src/share/man/man4/vge.4 (expand / switch to unified diff)

--- src/share/man/man4/vge.4 2014/03/18 18:20:39 1.7
+++ src/share/man/man4/vge.4 2019/10/07 11:53:40 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: vge.4,v 1.7 2014/03/18 18:20:39 riastradh Exp $ 1.\" $NetBSD: vge.4,v 1.8 2019/10/07 11:53:40 msaitoh Exp $
2.\" 2.\"
3.\" Copyright (c) 2004 3.\" Copyright (c) 2004
4.\" Bill Paul <wpaul@windriver.com>. All rights reserved. 4.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software 14.\" 3. All advertising materials mentioning features or use of this software
@@ -170,26 +170,27 @@ ZyXEL GN670-T 32-bit PCI Gigabit Etherne @@ -170,26 +170,27 @@ ZyXEL GN670-T 32-bit PCI Gigabit Etherne
170.It "vge%d: couldn't map memory" 170.It "vge%d: couldn't map memory"
171The driver failed to initialize PCI shared memory mapping. 171The driver failed to initialize PCI shared memory mapping.
172This might 172This might
173happen if the card is not in a bus-master slot. 173happen if the card is not in a bus-master slot.
174.It "vge%d: unable to map interrupt" 174.It "vge%d: unable to map interrupt"
175A fatal initialization error has occurred. 175A fatal initialization error has occurred.
176.It "vge%d: watchdog timeout" 176.It "vge%d: watchdog timeout"
177The device has stopped responding to the network, or there is a problem with 177The device has stopped responding to the network, or there is a problem with
178the network connection (cable). Driver resets the device. 178the network connection (cable). Driver resets the device.
179.El 179.El
180.Sh SEE ALSO 180.Sh SEE ALSO
181.Xr arp 4 , 181.Xr arp 4 ,
182.Xr ciphy 4 , 182.Xr ciphy 4 ,
 183.Xr ipgphy 4 ,
183.Xr mii 4 , 184.Xr mii 4 ,
184.Xr netintro 4 , 185.Xr netintro 4 ,
185.Xr ukphy 4 , 186.Xr ukphy 4 ,
186.Xr vlan 4 , 187.Xr vlan 4 ,
187.Xr ifconfig 8 188.Xr ifconfig 8
188.Sh HISTORY 189.Sh HISTORY
189The 190The
190.Nm 191.Nm
191device driver first appeared in 192device driver first appeared in
192.Fx 5.3 193.Fx 5.3
193and then in 194and then in
194.Nx 3.0 . 195.Nx 3.0 .
195.Sh AUTHORS 196.Sh AUTHORS

cvs diff -r1.123 -r1.124 src/sys/arch/amd64/conf/ALL (expand / switch to unified diff)

--- src/sys/arch/amd64/conf/ALL 2019/10/03 19:01:13 1.123
+++ src/sys/arch/amd64/conf/ALL 2019/10/07 11:53:40 1.124
@@ -1,33 +1,33 @@ @@ -1,33 +1,33 @@
1# $NetBSD: ALL,v 1.123 2019/10/03 19:01:13 tnn Exp $ 1# $NetBSD: ALL,v 1.124 2019/10/07 11:53:40 msaitoh Exp $
2# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp 2# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
3# 3#
4# ALL machine description file 4# ALL machine description file
5# 5#
6# This machine description includes all devices and options and it is 6# This machine description includes all devices and options and it is
7# used to compile-test the source and does not necessarily produce a 7# used to compile-test the source and does not necessarily produce a
8# bootable or useful kernel. 8# bootable or useful kernel.
9# 9#
10# For further information on hardware support for this architecture, see 10# For further information on hardware support for this architecture, see
11# the intro(4) man page. For further information about kernel options 11# the intro(4) man page. For further information about kernel options
12# for this architecture, see the options(4) man page. For an explanation 12# for this architecture, see the options(4) man page. For an explanation
13# of each device driver in this file see the section 4 man page for the 13# of each device driver in this file see the section 4 man page for the
14# device. 14# device.
15 15
16include "arch/amd64/conf/std.amd64" 16include "arch/amd64/conf/std.amd64"
17 17
18options INCLUDE_CONFIG_FILE # embed config file in kernel binary 18options INCLUDE_CONFIG_FILE # embed config file in kernel binary
19 19
20#ident "ALL-$Revision: 1.123 $" 20#ident "ALL-$Revision: 1.124 $"
21 21
22maxusers 64 # estimated number of users 22maxusers 64 # estimated number of users
23 23
24makeoptions USE_SSP=yes 24makeoptions USE_SSP=yes
25 25
26# CPU-related options. 26# CPU-related options.
27#options USER_LDT # user-settable LDT; used by WINE 27#options USER_LDT # user-settable LDT; used by WINE
28options X86EMU # 386 Real Mode emulator 28options X86EMU # 386 Real Mode emulator
29#options PAE # PAE mode (36 bits physical addressing) 29#options PAE # PAE mode (36 bits physical addressing)
30makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2 30makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2
31 # migitation 31 # migitation
32 32
33# CPU features 33# CPU features
@@ -1095,26 +1095,27 @@ brgphy* at mii? phy ? # Broadcom BCM54 @@ -1095,26 +1095,27 @@ brgphy* at mii? phy ? # Broadcom BCM54
1095ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs 1095ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs
1096dmphy* at mii? phy ? # Davicom DM9101 PHYs 1096dmphy* at mii? phy ? # Davicom DM9101 PHYs
1097etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs 1097etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs
1098exphy* at mii? phy ? # 3Com internal PHYs 1098exphy* at mii? phy ? # 3Com internal PHYs
1099gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs 1099gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs
1100glxtphy* at mii? phy ? # Level One LXT-1000 PHYs 1100glxtphy* at mii? phy ? # Level One LXT-1000 PHYs
1101gphyter* at mii? phy ? # NS83861 Gig-E PHY 1101gphyter* at mii? phy ? # NS83861 Gig-E PHY
1102icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x 1102icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x
1103igphy* at mii? phy ? # Intel IGP01E1000 1103igphy* at mii? phy ? # Intel IGP01E1000
1104ihphy* at mii? phy ? # Intel 82577 PHYs 1104ihphy* at mii? phy ? # Intel 82577 PHYs
1105ikphy* at mii? phy ? # Intel 82563 PHYs 1105ikphy* at mii? phy ? # Intel 82563 PHYs
1106inphy* at mii? phy ? # Intel 82555 PHYs 1106inphy* at mii? phy ? # Intel 82555 PHYs
1107iophy* at mii? phy ? # Intel 82553 PHYs 1107iophy* at mii? phy ? # Intel 82553 PHYs
 1108ipgphy* at mii? phy ? # IC PLUS IP1000A/IP1001 PHYs
1108lxtphy* at mii? phy ? # Level One LXT-970 PHYs 1109lxtphy* at mii? phy ? # Level One LXT-970 PHYs
1109makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs 1110makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs
1110nsphy* at mii? phy ? # NS83840 PHYs 1111nsphy* at mii? phy ? # NS83840 PHYs
1111nsphyter* at mii? phy ? # NS83843 PHYs 1112nsphyter* at mii? phy ? # NS83843 PHYs
1112pnaphy* at mii? phy ? # generic HomePNA PHYs 1113pnaphy* at mii? phy ? # generic HomePNA PHYs
1113qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs 1114qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs
1114rdcphy* at mii? phy ? # RDC R6040 internal PHY 1115rdcphy* at mii? phy ? # RDC R6040 internal PHY
1115rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs 1116rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs
1116rlphy* at mii? phy ? # Realtek 8139/8201L PHYs 1117rlphy* at mii? phy ? # Realtek 8139/8201L PHYs
1117sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs 1118sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
1118tlphy* at mii? phy ? # ThunderLAN PHYs 1119tlphy* at mii? phy ? # ThunderLAN PHYs
1119tqphy* at mii? phy ? # TDK Semiconductor PHYs 1120tqphy* at mii? phy ? # TDK Semiconductor PHYs
1120ukphy* at mii? phy ? # generic unknown PHYs 1121ukphy* at mii? phy ? # generic unknown PHYs

cvs diff -r1.536 -r1.537 src/sys/arch/amd64/conf/GENERIC (expand / switch to unified diff)

--- src/sys/arch/amd64/conf/GENERIC 2019/10/03 18:57:38 1.536
+++ src/sys/arch/amd64/conf/GENERIC 2019/10/07 11:53:40 1.537
@@ -1,38 +1,38 @@ @@ -1,38 +1,38 @@
1# $NetBSD: GENERIC,v 1.536 2019/10/03 18:57:38 tnn Exp $ 1# $NetBSD: GENERIC,v 1.537 2019/10/07 11:53:40 msaitoh Exp $
2# 2#
3# GENERIC machine description file 3# GENERIC machine description file
4# 4#
5# This machine description file is used to generate the default NetBSD 5# This machine description file is used to generate the default NetBSD
6# kernel. The generic kernel does not include all options, subsystems 6# kernel. The generic kernel does not include all options, subsystems
7# and device drivers, but should be useful for most applications. 7# and device drivers, but should be useful for most applications.
8# 8#
9# The machine description file can be customised for your specific 9# The machine description file can be customised for your specific
10# machine to reduce the kernel size and improve its performance. 10# machine to reduce the kernel size and improve its performance.
11# 11#
12# For further information on compiling NetBSD kernels, see the config(8) 12# For further information on compiling NetBSD kernels, see the config(8)
13# man page. 13# man page.
14# 14#
15# For further information on hardware support for this architecture, see 15# For further information on hardware support for this architecture, see
16# the intro(4) man page. For further information about kernel options 16# the intro(4) man page. For further information about kernel options
17# for this architecture, see the options(4) man page. For an explanation 17# for this architecture, see the options(4) man page. For an explanation
18# of each device driver in this file see the section 4 man page for the 18# of each device driver in this file see the section 4 man page for the
19# device. 19# device.
20 20
21include "arch/amd64/conf/std.amd64" 21include "arch/amd64/conf/std.amd64"
22 22
23options INCLUDE_CONFIG_FILE # embed config file in kernel binary 23options INCLUDE_CONFIG_FILE # embed config file in kernel binary
24 24
25#ident "GENERIC-$Revision: 1.536 $" 25#ident "GENERIC-$Revision: 1.537 $"
26 26
27maxusers 64 # estimated number of users 27maxusers 64 # estimated number of users
28 28
29# delay between "rebooting ..." message and hardware reset, in milliseconds 29# delay between "rebooting ..." message and hardware reset, in milliseconds
30#options CPURESET_DELAY=2000 30#options CPURESET_DELAY=2000
31 31
32# This option allows you to force a serial console at the specified 32# This option allows you to force a serial console at the specified
33# I/O address. see console(4) for details. 33# I/O address. see console(4) for details.
34#options CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600 34#options CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600
35# you don't want the option below ON iff you are using the 35# you don't want the option below ON iff you are using the
36# serial console option of the new boot strap code. 36# serial console option of the new boot strap code.
37#options CONS_OVERRIDE # Always use above! independent of boot info 37#options CONS_OVERRIDE # Always use above! independent of boot info
38 38
@@ -864,26 +864,27 @@ brgphy* at mii? phy ? # Broadcom BCM54 @@ -864,26 +864,27 @@ brgphy* at mii? phy ? # Broadcom BCM54
864ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs 864ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs
865dmphy* at mii? phy ? # Davicom DM9101 PHYs 865dmphy* at mii? phy ? # Davicom DM9101 PHYs
866etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs 866etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs
867exphy* at mii? phy ? # 3Com internal PHYs 867exphy* at mii? phy ? # 3Com internal PHYs
868gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs 868gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs
869glxtphy* at mii? phy ? # Level One LXT-1000 PHYs 869glxtphy* at mii? phy ? # Level One LXT-1000 PHYs
870gphyter* at mii? phy ? # NS83861 Gig-E PHY 870gphyter* at mii? phy ? # NS83861 Gig-E PHY
871icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x 871icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x
872igphy* at mii? phy ? # Intel IGP01E1000 872igphy* at mii? phy ? # Intel IGP01E1000
873ihphy* at mii? phy ? # Intel 82577 PHYs 873ihphy* at mii? phy ? # Intel 82577 PHYs
874ikphy* at mii? phy ? # Intel 82563 PHYs 874ikphy* at mii? phy ? # Intel 82563 PHYs
875inphy* at mii? phy ? # Intel 82555 PHYs 875inphy* at mii? phy ? # Intel 82555 PHYs
876iophy* at mii? phy ? # Intel 82553 PHYs 876iophy* at mii? phy ? # Intel 82553 PHYs
 877ipgphy* at mii? phy ? # IC PLUS IP1000A/IP1001 PHYs
877lxtphy* at mii? phy ? # Level One LXT-970 PHYs 878lxtphy* at mii? phy ? # Level One LXT-970 PHYs
878makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs 879makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs
879nsphy* at mii? phy ? # NS83840 PHYs 880nsphy* at mii? phy ? # NS83840 PHYs
880nsphyter* at mii? phy ? # NS83843 PHYs 881nsphyter* at mii? phy ? # NS83843 PHYs
881pnaphy* at mii? phy ? # generic HomePNA PHYs 882pnaphy* at mii? phy ? # generic HomePNA PHYs
882qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs 883qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs
883rgephy* at mii? phy ? # Realtek 8169S/8110 internal PHYs 884rgephy* at mii? phy ? # Realtek 8169S/8110 internal PHYs
884rlphy* at mii? phy ? # Realtek 8139/8201L PHYs 885rlphy* at mii? phy ? # Realtek 8139/8201L PHYs
885sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs 886sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
886tlphy* at mii? phy ? # ThunderLAN PHYs 887tlphy* at mii? phy ? # ThunderLAN PHYs
887tqphy* at mii? phy ? # TDK Semiconductor PHYs 888tqphy* at mii? phy ? # TDK Semiconductor PHYs
888ukphy* at mii? phy ? # generic unknown PHYs 889ukphy* at mii? phy ? # generic unknown PHYs
889urlphy* at mii? phy ? # Realtek RTL8150L internal PHYs 890urlphy* at mii? phy ? # Realtek RTL8150L internal PHYs

cvs diff -r1.470 -r1.471 src/sys/arch/i386/conf/ALL (expand / switch to unified diff)

--- src/sys/arch/i386/conf/ALL 2019/08/19 03:25:40 1.470
+++ src/sys/arch/i386/conf/ALL 2019/10/07 11:53:40 1.471
@@ -1,33 +1,33 @@ @@ -1,33 +1,33 @@
1# $NetBSD: ALL,v 1.470 2019/08/19 03:25:40 ozaki-r Exp $ 1# $NetBSD: ALL,v 1.471 2019/10/07 11:53:40 msaitoh Exp $
2# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp 2# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
3# 3#
4# ALL machine description file 4# ALL machine description file
5# 5#
6# This machine description includes all devices and options and it is 6# This machine description includes all devices and options and it is
7# used to compile-test the source and does not necessarily produce a 7# used to compile-test the source and does not necessarily produce a
8# bootable or useful kernel. 8# bootable or useful kernel.
9# 9#
10# For further information on hardware support for this architecture, see 10# For further information on hardware support for this architecture, see
11# the intro(4) man page. For further information about kernel options 11# the intro(4) man page. For further information about kernel options
12# for this architecture, see the options(4) man page. For an explanation 12# for this architecture, see the options(4) man page. For an explanation
13# of each device driver in this file see the section 4 man page for the 13# of each device driver in this file see the section 4 man page for the
14# device. 14# device.
15 15
16include "arch/i386/conf/std.i386" 16include "arch/i386/conf/std.i386"
17 17
18options INCLUDE_CONFIG_FILE # embed config file in kernel binary 18options INCLUDE_CONFIG_FILE # embed config file in kernel binary
19 19
20#ident "ALL-$Revision: 1.470 $" 20#ident "ALL-$Revision: 1.471 $"
21 21
22maxusers 64 # estimated number of users 22maxusers 64 # estimated number of users
23 23
24makeoptions USE_SSP=yes 24makeoptions USE_SSP=yes
25 25
26# CPU-related options. 26# CPU-related options.
27options USER_LDT # user-settable LDT; used by WINE 27options USER_LDT # user-settable LDT; used by WINE
28options X86EMU # 386 Real Mode emulator 28options X86EMU # 386 Real Mode emulator
29options PAE # PAE mode (36 bits physical addressing) 29options PAE # PAE mode (36 bits physical addressing)
30makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2 30makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2
31 # migitation 31 # migitation
32 32
33# CPU features 33# CPU features
@@ -1199,26 +1199,27 @@ brgphy* at mii? phy ? # Broadcom BCM54 @@ -1199,26 +1199,27 @@ brgphy* at mii? phy ? # Broadcom BCM54
1199ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs 1199ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs
1200dmphy* at mii? phy ? # Davicom DM9101 PHYs 1200dmphy* at mii? phy ? # Davicom DM9101 PHYs
1201etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs 1201etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs
1202exphy* at mii? phy ? # 3Com internal PHYs 1202exphy* at mii? phy ? # 3Com internal PHYs
1203gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs 1203gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs
1204glxtphy* at mii? phy ? # Level One LXT-1000 PHYs 1204glxtphy* at mii? phy ? # Level One LXT-1000 PHYs
1205gphyter* at mii? phy ? # NS83861 Gig-E PHY 1205gphyter* at mii? phy ? # NS83861 Gig-E PHY
1206icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x 1206icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x
1207igphy* at mii? phy ? # Intel IGP01E1000 1207igphy* at mii? phy ? # Intel IGP01E1000
1208ihphy* at mii? phy ? # Intel 82577 PHYs 1208ihphy* at mii? phy ? # Intel 82577 PHYs
1209ikphy* at mii? phy ? # Intel 82563 PHYs 1209ikphy* at mii? phy ? # Intel 82563 PHYs
1210inphy* at mii? phy ? # Intel 82555 PHYs 1210inphy* at mii? phy ? # Intel 82555 PHYs
1211iophy* at mii? phy ? # Intel 82553 PHYs 1211iophy* at mii? phy ? # Intel 82553 PHYs
 1212ipgphy* at mii? phy ? # IC PLUS IP1000A/IP1001 PHYs
1212lxtphy* at mii? phy ? # Level One LXT-970 PHYs 1213lxtphy* at mii? phy ? # Level One LXT-970 PHYs
1213makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs 1214makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs
1214nsphy* at mii? phy ? # NS83840 PHYs 1215nsphy* at mii? phy ? # NS83840 PHYs
1215nsphyter* at mii? phy ? # NS83843 PHYs 1216nsphyter* at mii? phy ? # NS83843 PHYs
1216pnaphy* at mii? phy ? # generic HomePNA PHYs 1217pnaphy* at mii? phy ? # generic HomePNA PHYs
1217qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs 1218qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs
1218rdcphy* at mii? phy ? # RDC R6040 internal PHY 1219rdcphy* at mii? phy ? # RDC R6040 internal PHY
1219rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs 1220rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs
1220rlphy* at mii? phy ? # Realtek 8139/8201L PHYs 1221rlphy* at mii? phy ? # Realtek 8139/8201L PHYs
1221sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs 1222sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
1222tlphy* at mii? phy ? # ThunderLAN PHYs 1223tlphy* at mii? phy ? # ThunderLAN PHYs
1223tqphy* at mii? phy ? # TDK Semiconductor PHYs 1224tqphy* at mii? phy ? # TDK Semiconductor PHYs
1224ukphy* at mii? phy ? # generic unknown PHYs 1225ukphy* at mii? phy ? # generic unknown PHYs

cvs diff -r1.1210 -r1.1211 src/sys/arch/i386/conf/GENERIC (expand / switch to unified diff)

--- src/sys/arch/i386/conf/GENERIC 2019/08/09 08:01:06 1.1210
+++ src/sys/arch/i386/conf/GENERIC 2019/10/07 11:53:40 1.1211
@@ -1,38 +1,38 @@ @@ -1,38 +1,38 @@
1# $NetBSD: GENERIC,v 1.1210 2019/08/09 08:01:06 rin Exp $ 1# $NetBSD: GENERIC,v 1.1211 2019/10/07 11:53:40 msaitoh Exp $
2# 2#
3# GENERIC machine description file 3# GENERIC machine description file
4# 4#
5# This machine description file is used to generate the default NetBSD 5# This machine description file is used to generate the default NetBSD
6# kernel. The generic kernel does not include all options, subsystems 6# kernel. The generic kernel does not include all options, subsystems
7# and device drivers, but should be useful for most applications. 7# and device drivers, but should be useful for most applications.
8# 8#
9# The machine description file can be customised for your specific 9# The machine description file can be customised for your specific
10# machine to reduce the kernel size and improve its performance. 10# machine to reduce the kernel size and improve its performance.
11# 11#
12# For further information on compiling NetBSD kernels, see the config(8) 12# For further information on compiling NetBSD kernels, see the config(8)
13# man page. 13# man page.
14# 14#
15# For further information on hardware support for this architecture, see 15# For further information on hardware support for this architecture, see
16# the intro(4) man page. For further information about kernel options 16# the intro(4) man page. For further information about kernel options
17# for this architecture, see the options(4) man page. For an explanation 17# for this architecture, see the options(4) man page. For an explanation
18# of each device driver in this file see the section 4 man page for the 18# of each device driver in this file see the section 4 man page for the
19# device. 19# device.
20 20
21include "arch/i386/conf/std.i386" 21include "arch/i386/conf/std.i386"
22 22
23options INCLUDE_CONFIG_FILE # embed config file in kernel binary 23options INCLUDE_CONFIG_FILE # embed config file in kernel binary
24 24
25#ident "GENERIC-$Revision: 1.1210 $" 25#ident "GENERIC-$Revision: 1.1211 $"
26 26
27maxusers 64 # estimated number of users 27maxusers 64 # estimated number of users
28 28
29# CPU-related options. 29# CPU-related options.
30options USER_LDT # user-settable LDT; used by WINE 30options USER_LDT # user-settable LDT; used by WINE
31#options PAE # PAE mode (36 bits physical addressing) 31#options PAE # PAE mode (36 bits physical addressing)
32makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2 32makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2
33 # migitation 33 # migitation
34options SPECTRE_V2_GCC_MITIGATION 34options SPECTRE_V2_GCC_MITIGATION
35 35
36# CPU features 36# CPU features
37acpicpu* at cpu? # ACPI CPU (including frequency scaling) 37acpicpu* at cpu? # ACPI CPU (including frequency scaling)
38coretemp* at cpu? # Intel on-die thermal sensor 38coretemp* at cpu? # Intel on-die thermal sensor
@@ -1110,26 +1110,27 @@ brgphy* at mii? phy ? # Broadcom BCM54 @@ -1110,26 +1110,27 @@ brgphy* at mii? phy ? # Broadcom BCM54
1110ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs 1110ciphy* at mii? phy ? # Cicada CS8201 Gig-E PHYs
1111dmphy* at mii? phy ? # Davicom DM9101 PHYs 1111dmphy* at mii? phy ? # Davicom DM9101 PHYs
1112etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs 1112etphy* at mii? phy ? # Agere/LSI ET1011 TruePHY Gig-E PHYs
1113exphy* at mii? phy ? # 3Com internal PHYs 1113exphy* at mii? phy ? # 3Com internal PHYs
1114gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs 1114gentbi* at mii? phy ? # Generic Ten-Bit 1000BASE-[CLS]X PHYs
1115glxtphy* at mii? phy ? # Level One LXT-1000 PHYs 1115glxtphy* at mii? phy ? # Level One LXT-1000 PHYs
1116gphyter* at mii? phy ? # NS83861 Gig-E PHY 1116gphyter* at mii? phy ? # NS83861 Gig-E PHY
1117icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x 1117icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x
1118igphy* at mii? phy ? # Intel IGP01E1000 1118igphy* at mii? phy ? # Intel IGP01E1000
1119ihphy* at mii? phy ? # Intel 82577 PHYs 1119ihphy* at mii? phy ? # Intel 82577 PHYs
1120ikphy* at mii? phy ? # Intel 82563 PHYs 1120ikphy* at mii? phy ? # Intel 82563 PHYs
1121inphy* at mii? phy ? # Intel 82555 PHYs 1121inphy* at mii? phy ? # Intel 82555 PHYs
1122iophy* at mii? phy ? # Intel 82553 PHYs 1122iophy* at mii? phy ? # Intel 82553 PHYs
 1123ipgphy* at mii? phy ? # IC PLUS IP1000A/IP1001 PHYs
1123lxtphy* at mii? phy ? # Level One LXT-970 PHYs 1124lxtphy* at mii? phy ? # Level One LXT-970 PHYs
1124makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs 1125makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs
1125nsphy* at mii? phy ? # NS83840 PHYs 1126nsphy* at mii? phy ? # NS83840 PHYs
1126nsphyter* at mii? phy ? # NS83843 PHYs 1127nsphyter* at mii? phy ? # NS83843 PHYs
1127pnaphy* at mii? phy ? # generic HomePNA PHYs 1128pnaphy* at mii? phy ? # generic HomePNA PHYs
1128qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs 1129qsphy* at mii? phy ? # Quality Semiconductor QS6612 PHYs
1129rdcphy* at mii? phy ? # RDC R6040 10/100 PHY 1130rdcphy* at mii? phy ? # RDC R6040 10/100 PHY
1130rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs 1131rgephy* at mii? phy ? # Realtek 8169S/8110S internal PHYs
1131rlphy* at mii? phy ? # Realtek 8139/8201L PHYs 1132rlphy* at mii? phy ? # Realtek 8139/8201L PHYs
1132sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs 1133sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
1133tlphy* at mii? phy ? # ThunderLAN PHYs 1134tlphy* at mii? phy ? # ThunderLAN PHYs
1134tqphy* at mii? phy ? # TDK Semiconductor PHYs 1135tqphy* at mii? phy ? # TDK Semiconductor PHYs
1135ukphy* at mii? phy ? # generic unknown PHYs 1136ukphy* at mii? phy ? # generic unknown PHYs

cvs diff -r1.321 -r1.322 src/sys/dev/DEVNAMES (expand / switch to unified diff)

--- src/sys/dev/DEVNAMES 2019/05/08 13:40:17 1.321
+++ src/sys/dev/DEVNAMES 2019/10/07 11:53:40 1.322
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: DEVNAMES,v 1.321 2019/05/08 13:40:17 isaki Exp $ 1# $NetBSD: DEVNAMES,v 1.322 2019/10/07 11:53:40 msaitoh Exp $
2# 2#
3# This file contains all used device names and defined attributes in 3# This file contains all used device names and defined attributes in
4# alphabetical order. New devices added to the system somewhere should first 4# alphabetical order. New devices added to the system somewhere should first
5# be checked for uniqueness here and thereafter added to this file. 5# be checked for uniqueness here and thereafter added to this file.
6# 6#
7# NOTE: Before adding devices to this list, ensure the appropriate 7# NOTE: Before adding devices to this list, ensure the appropriate
8# man pages exist. 8# man pages exist.
9# 9#
10a12c alpha 10a12c alpha
11a12dc alpha 11a12dc alpha
12a2kbbc amiga 12a2kbbc amiga
13a2kbbc amigappc 13a2kbbc amigappc
14a34kbbc amiga 14a34kbbc amiga
@@ -649,26 +649,27 @@ ioat MI @@ -649,26 +649,27 @@ ioat MI
649iobl amiga 649iobl amiga
650iomd acorn32 650iomd acorn32
651iomdiic acorn32 651iomdiic acorn32
652iomdkbc acorn32 652iomdkbc acorn32
653iommu sparc 653iommu sparc
654iommu sun3 654iommu sun3
655iop MI 655iop MI
656iophy MI 656iophy MI
657iopl MI 657iopl MI
658iopsp MI 658iopsp MI
659ipaqbus hpcarm 659ipaqbus hpcarm
660ipaqlcd hpcarm 660ipaqlcd hpcarm
661ipaqpcic hpcarm 661ipaqpcic hpcarm
 662ipgphy MI
662ipmi amd64 663ipmi amd64
663ipmi i386 664ipmi i386
664ipmi xen 665ipmi xen
665ipw MI 666ipw MI
666irdasir MI Attribute 667irdasir MI Attribute
667irframe MI 668irframe MI
668irframedrv MI Attribute 669irframedrv MI Attribute
669irif hpcmips 670irif hpcmips
670isa MI 671isa MI
671isabeep alpha 672isabeep alpha
672isabeep prep 673isabeep prep
673isabr arc 674isabr arc
674isabus MI Attribute 675isabus MI Attribute

cvs diff -r1.50 -r1.51 src/sys/dev/mii/files.mii (expand / switch to unified diff)

--- src/sys/dev/mii/files.mii 2014/11/15 19:18:18 1.50
+++ src/sys/dev/mii/files.mii 2019/10/07 11:53:40 1.51
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: files.mii,v 1.50 2014/11/15 19:18:18 christos Exp $ 1# $NetBSD: files.mii,v 1.51 2019/10/07 11:53:40 msaitoh Exp $
2 2
3defflag opt_mii.h MIIVERBOSE 3defflag opt_mii.h MIIVERBOSE
4 4
5define mii {[phy = -1]} 5define mii {[phy = -1]}
6file dev/mii/mii.c mii 6file dev/mii/mii.c mii
7 7
8define mii_bitbang 8define mii_bitbang
9file dev/mii/mii_bitbang.c mii_bitbang 9file dev/mii/mii_bitbang.c mii_bitbang
10 10
11define mii_phy 11define mii_phy
12file dev/mii/mii_physubr.c mii_phy 12file dev/mii/mii_physubr.c mii_phy
13 13
14file dev/mii/mii_ethersubr.c mii & ether 14file dev/mii/mii_ethersubr.c mii & ether
@@ -89,26 +89,30 @@ file dev/mii/e1000phy.c e1000phy @@ -89,26 +89,30 @@ file dev/mii/e1000phy.c e1000phy
89 89
90device icsphy: mii_phy 90device icsphy: mii_phy
91attach icsphy at mii 91attach icsphy at mii
92file dev/mii/icsphy.c icsphy 92file dev/mii/icsphy.c icsphy
93 93
94device igphy: mii_phy 94device igphy: mii_phy
95attach igphy at mii 95attach igphy at mii
96file dev/mii/igphy.c igphy 96file dev/mii/igphy.c igphy
97 97
98device ikphy: mii_phy 98device ikphy: mii_phy
99attach ikphy at mii 99attach ikphy at mii
100file dev/mii/ikphy.c ikphy 100file dev/mii/ikphy.c ikphy
101 101
 102device ipgphy: mii_phy
 103attach ipgphy at mii
 104file dev/mii/ipgphy.c ipgphy
 105
102device sqphy: mii_phy 106device sqphy: mii_phy
103attach sqphy at mii 107attach sqphy at mii
104file dev/mii/sqphy.c sqphy 108file dev/mii/sqphy.c sqphy
105 109
106device tqphy: mii_phy 110device tqphy: mii_phy
107attach tqphy at mii 111attach tqphy at mii
108file dev/mii/tqphy.c tqphy 112file dev/mii/tqphy.c tqphy
109 113
110device dmphy: mii_phy 114device dmphy: mii_phy
111attach dmphy at mii 115attach dmphy at mii
112file dev/mii/dmphy.c dmphy 116file dev/mii/dmphy.c dmphy
113 117
114device pnaphy: mii_phy 118device pnaphy: mii_phy

File Added: src/sys/dev/mii/ipgphy.c
/*	$OpenBSD: ipgphy.c,v 1.19 2015/07/19 06:28:12 yuo Exp $	*/

/*-
 * Copyright (c) 2006, Pyun YongHyeon <yongari@FreeBSD.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice unmodified, this list of conditions, and the following
 *    disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

/*
 * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY.
 */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipgphy.c,v 1.1 2019/10/07 11:53:40 msaitoh Exp $");

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/socket.h>
#include <sys/errno.h>

#include <net/if.h>
#include <net/if_media.h>

#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
#include <dev/mii/miidevs.h>

#include <dev/mii/ipgphyreg.h>

#include <dev/pci/if_stgereg.h>

static int ipgphy_match(device_t, cfdata_t, void *);
static void ipgphy_attach(device_t, device_t, void *);

CFATTACH_DECL_NEW(ipgphy, sizeof(struct mii_softc),
    ipgphy_match, ipgphy_attach, mii_phy_detach, mii_phy_activate);

static int	ipgphy_service(struct mii_softc *, struct mii_data *, int);
static void	ipgphy_status(struct mii_softc *);
static int	ipgphy_mii_phy_auto(struct mii_softc *);
static void	ipgphy_load_dspcode(struct mii_softc *);
static void	ipgphy_reset(struct mii_softc *);

static const struct mii_phy_funcs ipgphy_funcs = {
	ipgphy_service, ipgphy_status, ipgphy_reset,
};

static const struct mii_phydesc ipgphys[] = {
	MII_PHY_DESC(xxICPLUS, IP1000A),
	MII_PHY_DESC(xxICPLUS, IP1001),
	MII_PHY_END,
};

static int
ipgphy_match(device_t parent, cfdata_t match, void *aux)
{
	struct mii_attach_args *ma = aux;

	if (mii_phy_match(ma, ipgphys) != NULL) {
		return 10;
	}
	return 0;
}

static void
ipgphy_attach(device_t parent, device_t self, void *aux)
{
	struct mii_softc *sc = device_private(self);
	struct mii_attach_args *ma = aux;
	struct mii_data *mii = ma->mii_data;
	const struct mii_phydesc *mpd;

	mpd = mii_phy_match(ma, ipgphys);
	aprint_naive(": Media interface\n");
	aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));

	sc->mii_dev = self;
	sc->mii_inst = mii->mii_instance;
	sc->mii_phy = ma->mii_phyno;
	sc->mii_mpd_oui = MII_OUI(ma->mii_id1, ma->mii_id2);
	sc->mii_mpd_model = MII_MODEL(ma->mii_id2);
	sc->mii_mpd_rev = MII_REV(ma->mii_id2);
	sc->mii_funcs = &ipgphy_funcs;
	sc->mii_pdata = mii;
	sc->mii_flags = ma->mii_flags;

	sc->mii_flags |= MIIF_NOISOLATE;
	sc->mii_anegticks = MII_ANEGTICKS_GIGE;

	PHY_RESET(sc);

	PHY_READ(sc, MII_BMSR, &sc->mii_capabilities);
	sc->mii_capabilities &= ma->mii_capmask;
	//sc->mii_capabilities &= ~BMSR_ANEG;
	if (sc->mii_capabilities & BMSR_EXTSTAT)
		PHY_READ(sc, MII_EXTSR, &sc->mii_extcapabilities);
 
	mii_phy_add_media(sc);
	aprint_normal("\n");
}

static int
ipgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
{
	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
	uint16_t gig, reg, speed;

	switch (cmd) {
	case MII_POLLSTAT:
		/*
		 * If we're not polling our PHY instance, just return.
		 */
		if (IFM_INST(ife->ifm_media) != sc->mii_inst)
			return 0;
		break;

	case MII_MEDIACHG:
		/*
		 * If the media indicates a different PHY instance,
		 * isolate ourselves.
		 */
		if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
			PHY_READ(sc, MII_BMCR, &reg);
			PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
			return 0;
		}

		/*
		 * If the interface is not up, don't do anything.
		 */
		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
			break;

		PHY_RESET(sc);

		switch (IFM_SUBTYPE(ife->ifm_media)) {
		case IFM_AUTO:
			(void)ipgphy_mii_phy_auto(sc);
			goto done;
			break;

		case IFM_1000_T:
			/*
			 * XXX
			 * Manual 1000baseT setting doesn't seem to work.
			 */
			speed = BMCR_S1000;
			break;

		case IFM_100_TX:
			speed = BMCR_S100;
			break;

		case IFM_10_T:
			speed = BMCR_S10;
			break;

		default:
			return EINVAL;
		}

		if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) {
			speed |= BMCR_FDX;
			gig = GTCR_ADV_1000TFDX;
		} else
			gig = GTCR_ADV_1000THDX;

		PHY_WRITE(sc, MII_100T2CR, 0);
		PHY_WRITE(sc, MII_BMCR, speed);

		if (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)
			break;

		PHY_WRITE(sc, MII_100T2CR, gig);
		PHY_WRITE(sc, MII_BMCR, speed);

		if (mii->mii_media.ifm_media & IFM_ETH_MASTER)
			gig |= GTCR_MAN_MS | GTCR_ADV_MS;

		PHY_WRITE(sc, MII_100T2CR, gig);

done:
		break;

	case MII_TICK:
		/*
		 * If we're not currently selected, just return.
		 */
		if (IFM_INST(ife->ifm_media) != sc->mii_inst)
			return 0;

		/*
		 * Is the interface even up?
		 */
		if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
			return 0;

		/*
		 * Only used for autonegotiation.
		 */
		if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
			sc->mii_ticks = 0;
			break;
		}

		/*
		 * Check to see if we have link.  If we do, we don't
		 * need to restart the autonegotiation process.  Read
		 * the BMSR twice in case it's latched.
		 */
		PHY_READ(sc, MII_BMSR, &reg);
		PHY_READ(sc, MII_BMSR, &reg);
		if (reg & BMSR_LINK) {
			/*
			 * Reset autonegotiation timer to 0 in case the link
			 * goes down in the next tick.
			 */
			sc->mii_ticks = 0;
			/* See above. */
			break;
		}

		/* Announce link loss right after it happens */
		if (sc->mii_ticks++ == 0)
			break;

		/*
		 * Only retry autonegotiation every mii_anegticks seconds.
		 */
		if (sc->mii_ticks <= sc->mii_anegticks)
			break;

		sc->mii_ticks = 0;
		ipgphy_mii_phy_auto(sc);
		break;
	}

	/* Update the media status. */
	ipgphy_status(sc);

	/* Callback if something changed. */
	mii_phy_update(sc, cmd);
	return 0;
}

static void
ipgphy_status(struct mii_softc *sc)
{
	struct mii_data *mii = sc->mii_pdata;
	struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
	uint16_t bmsr, bmcr, stat, gtsr;

	mii->mii_media_status = IFM_AVALID;
	mii->mii_media_active = IFM_ETHER;

	PHY_READ(sc, MII_BMSR, &bmsr);
	PHY_READ(sc, MII_BMSR, &bmsr);
	if (bmsr & BMSR_LINK) 
		mii->mii_media_status |= IFM_ACTIVE;

	PHY_READ(sc, MII_BMCR, &bmcr);
	if (bmcr & BMCR_LOOP)
		mii->mii_media_active |= IFM_LOOP;

	if (bmcr & BMCR_AUTOEN) {
		if ((bmsr & BMSR_ACOMP) == 0) {
			/* Erg, still trying, I guess... */
			mii->mii_media_active |= IFM_NONE;
			return;
		}

		if (sc->mii_mpd_model == MII_MODEL_xxICPLUS_IP1001) {
			PHY_READ(sc, IPGPHY_LSR, &stat);
			switch (stat & IPGPHY_LSR_SPEED_MASK) {
			case IPGPHY_LSR_SPEED_10:
				mii->mii_media_active |= IFM_10_T;
				break;
			case IPGPHY_LSR_SPEED_100:
				mii->mii_media_active |= IFM_100_TX;
				break;
			case IPGPHY_LSR_SPEED_1000:
				mii->mii_media_active |= IFM_1000_T;
				break;
			default:
				mii->mii_media_active |= IFM_NONE;
				return;
			}

			if (stat & IPGPHY_LSR_FULL_DUPLEX)
				mii->mii_media_active |= IFM_FDX;
			else
				mii->mii_media_active |= IFM_HDX;
		} else {
			PHY_READ(sc, STGE_PhyCtrl, &stat);
			switch (PC_LinkSpeed(stat)) {
			case PC_LinkSpeed_Down:
				mii->mii_media_active |= IFM_NONE;
				return;
			case PC_LinkSpeed_10:
				mii->mii_media_active |= IFM_10_T;
				break;
			case PC_LinkSpeed_100:
				mii->mii_media_active |= IFM_100_TX;
				break;
			case PC_LinkSpeed_1000:
				mii->mii_media_active |= IFM_1000_T;
				break;
			default:
				mii->mii_media_active |= IFM_NONE;
				return;
			}

			if (stat & PC_PhyDuplexStatus)
				mii->mii_media_active |= IFM_FDX;
			else
				mii->mii_media_active |= IFM_HDX;
		}

		if (mii->mii_media_active & IFM_FDX)
			mii->mii_media_active |= mii_phy_flowstatus(sc);

		if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
			PHY_READ(sc, MII_100T2SR, &gtsr);
			if (gtsr & GTSR_MS_RES)
				mii->mii_media_active |= IFM_ETH_MASTER;
		}
	} else
		mii->mii_media_active = ife->ifm_media;
}

static int
ipgphy_mii_phy_auto(struct mii_softc *sc)
{
	uint16_t reg = 0;

	if (sc->mii_mpd_model == MII_MODEL_xxICPLUS_IP1001) {
		PHY_READ(sc, MII_ANAR, &reg);
		reg &= ~(ANAR_PAUSE_SYM | ANAR_PAUSE_ASYM);
		reg |= ANAR_NP;
	}

	reg |= ANAR_10 | ANAR_10_FD | ANAR_TX | ANAR_TX_FD;

	if (sc->mii_flags & MIIF_DOPAUSE)
		reg |= ANAR_PAUSE_SYM | ANAR_PAUSE_ASYM;

	PHY_WRITE(sc, MII_ANAR, reg | ANAR_CSMA);

	reg = GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX;
	if (sc->mii_mpd_model != MII_MODEL_xxICPLUS_IP1001)
		reg |= GTCR_ADV_MS;
	PHY_WRITE(sc, MII_100T2CR, reg);

	PHY_WRITE(sc, MII_BMCR, BMCR_FDX | BMCR_AUTOEN | BMCR_STARTNEG);

	return EJUSTRETURN;
}

static void
ipgphy_load_dspcode(struct mii_softc *sc)
{
	PHY_WRITE(sc, 31, 0x0001);
	PHY_WRITE(sc, 27, 0x01e0);
	PHY_WRITE(sc, 31, 0x0002);
	PHY_WRITE(sc, 27, 0xeb8e);
	PHY_WRITE(sc, 31, 0x0000);
	PHY_WRITE(sc, 30, 0x005e);
	PHY_WRITE(sc, 9, 0x0700);

	DELAY(50);
}

static void
ipgphy_reset(struct mii_softc *sc)
{
	struct ifnet *ifp = sc->mii_pdata->mii_ifp;
	uint16_t reg;

	mii_phy_reset(sc);

	/* clear autoneg/full-duplex as we don't want it after reset */
	PHY_READ(sc, MII_BMCR, &reg);
	reg &= ~(BMCR_AUTOEN | BMCR_FDX);
	PHY_WRITE(sc, MII_BMCR, reg);

	if (sc->mii_mpd_model == MII_MODEL_xxICPLUS_IP1000A &&
	    strcmp(ifp->if_xname, "stge") == 0) {
		struct stge_softc *stge_sc = ifp->if_softc;
		if (stge_sc->sc_rev >= 0x40 && stge_sc->sc_rev <= 0x4e)
			ipgphy_load_dspcode(sc);
	}
}

File Added: src/sys/dev/mii/ipgphyreg.h
/*	$OpenBSD: ipgphyreg.h,v 1.3 2015/07/19 06:28:12 yuo Exp $	*/

/*-
 * Copyright (c) 2006, Pyun YongHyeon
 * All rights reserved.
 *              
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:             
 * 1. Redistributions of source code must retain the above copyright
 *    notice unmodified, this list of conditions, and the following
 *    disclaimer.  
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

#ifndef _DEV_MII_IPGPHYREG_H_
#define _DEV_MII_IPGPHYREG_H_

/*
 * Registers for the IC Plus IPGA internal PHY.
 */

/* PHY specific control & status register. IP1001 only. */
#define IPGPHY_SCSR			0x10
#define IPGPHY_SCSR_RXPHASE_SEL	0x0001
#define IPGPHY_SCSR_TXPHASE_SEL	0x0002
#define IPGPHY_SCSR_REPEATOR_MODE	0x0004
#define IPGPHY_SCSR_RESERVED1_DEF	0x0008
#define IPGPHY_SCSR_RXCLK_DRV_MASK	0x0060
#define IPGPHY_SCSR_RXCLK_DRV_DEF	0x0040
#define IPGPHY_SCSR_RXD_DRV_MASK	0x0180
#define IPGPHY_SCSR_RXD_DRV_DEF	0x0100
#define IPGPHY_SCSR_JABBER_ENB	0x0200
#define IPGPHY_SCSR_HEART_BEAT_ENB	0x0400
#define IPGPHY_SCSR_DOWNSHIFT_ENB	0x0800
#define IPGPHY_SCSR_RESERVED2_DEF	0x1000
#define IPGPHY_SCSR_LED_DRV_4MA	0x0000
#define IPGPHY_SCSR_LED_DRV_8MA	0x2000
#define IPGPHY_SCSR_LED_MODE_MASK	0xC000
#define IPGPHY_SCSR_LED_MODE_DEF	0x0000

/* PHY link status register. IP1001 only. */
#define IPGPHY_LSR			0x11
#define IPGPHY_LSR_JABBER_DET	0x0200
#define IPGPHY_LSR_APS_SLEEP		0x0400
#define IPGPHY_LSR_MDIX		0x0800
#define IPGPHY_LSR_FULL_DUPLEX	0x1000
#define IPGPHY_LSR_SPEED_10		0x0000
#define IPGPHY_LSR_SPEED_100		0x2000
#define IPGPHY_LSR_SPEED_1000	0x4000
#define IPGPHY_LSR_SPEED_MASK	0x6000
#define IPGPHY_LSR_LINKUP		0x8000

/* PHY specific control register 2. IP1001 only. */
#define IPGPHY_SCR
#define IPGPHY_SCR_SEW_RATE_MASK	0x0003
#define IPGPHY_SCR_SEW_RATE_DEF	0x0003
#define IPGPHY_SCR_AUTO_XOVER	0x0004
#define IPGPHY_SCR_SPEED_10_100_ENB	0x0040
#define IPGPHY_SCR_FIFO_LATENCY_2	0x0000
#define IPGPHY_SCR_FIFO_LATENCY_3	0x0080
#define IPGPHY_SCR_FIFO_LATENCY_4	0x0100
#define IPGPHY_SCR_FIFO_LATENCY_5	0x0180
#define IPGPHY_SCR_MDIX_ENB		0x0200
#define IPGPHY_SCR_RESERVED_DEF	0x0400
#define IPGPHY_SCR_APS_ON		0x0800

#endif /* _DEV_MII_IPGPHYREG_H_ */

cvs diff -r1.70 -r1.71 src/sys/dev/pci/if_stge.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_stge.c 2019/07/09 08:46:59 1.70
+++ src/sys/dev/pci/if_stge.c 2019/10/07 11:53:40 1.71
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_stge.c,v 1.70 2019/07/09 08:46:59 msaitoh Exp $ */ 1/* $NetBSD: if_stge.c,v 1.71 2019/10/07 11:53:40 msaitoh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Device driver for the Sundance Tech. TC9021 10/100/1000 33 * Device driver for the Sundance Tech. TC9021 10/100/1000
34 * Ethernet controller. 34 * Ethernet controller.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.70 2019/07/09 08:46:59 msaitoh Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.71 2019/10/07 11:53:40 msaitoh Exp $");
39 39
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43#include <sys/callout.h> 43#include <sys/callout.h>
44#include <sys/mbuf.h> 44#include <sys/mbuf.h>
45#include <sys/malloc.h> 45#include <sys/malloc.h>
46#include <sys/kernel.h> 46#include <sys/kernel.h>
47#include <sys/socket.h> 47#include <sys/socket.h>
48#include <sys/ioctl.h> 48#include <sys/ioctl.h>
49#include <sys/errno.h> 49#include <sys/errno.h>
50#include <sys/device.h> 50#include <sys/device.h>
51#include <sys/queue.h> 51#include <sys/queue.h>
@@ -66,155 +66,30 @@ __KERNEL_RCSID(0, "$NetBSD: if_stge.c,v  @@ -66,155 +66,30 @@ __KERNEL_RCSID(0, "$NetBSD: if_stge.c,v
66 66
67#include <dev/pci/pcireg.h> 67#include <dev/pci/pcireg.h>
68#include <dev/pci/pcivar.h> 68#include <dev/pci/pcivar.h>
69#include <dev/pci/pcidevs.h> 69#include <dev/pci/pcidevs.h>
70 70
71#include <dev/pci/if_stgereg.h> 71#include <dev/pci/if_stgereg.h>
72 72
73#include <prop/proplib.h> 73#include <prop/proplib.h>
74 74
75/* #define STGE_CU_BUG 1 */ 75/* #define STGE_CU_BUG 1 */
76#define STGE_VLAN_UNTAG 1 76#define STGE_VLAN_UNTAG 1
77/* #define STGE_VLAN_CFI 1 */ 77/* #define STGE_VLAN_CFI 1 */
78 78
79/* 
80 * Transmit descriptor list size. 
81 */ 
82#define STGE_NTXDESC 256 
83#define STGE_NTXDESC_MASK (STGE_NTXDESC - 1) 
84#define STGE_NEXTTX(x) (((x) + 1) & STGE_NTXDESC_MASK) 
85 
86/* 
87 * Receive descriptor list size. 
88 */ 
89#define STGE_NRXDESC 256 
90#define STGE_NRXDESC_MASK (STGE_NRXDESC - 1) 
91#define STGE_NEXTRX(x) (((x) + 1) & STGE_NRXDESC_MASK) 
92 
93/* 
94 * Only interrupt every N frames. Must be a power-of-two. 
95 */ 
96#define STGE_TXINTR_SPACING 16 
97#define STGE_TXINTR_SPACING_MASK (STGE_TXINTR_SPACING - 1) 
98 
99/* 
100 * Control structures are DMA'd to the TC9021 chip. We allocate them in 
101 * a single clump that maps to a single DMA segment to make several things 
102 * easier. 
103 */ 
104struct stge_control_data { 
105 /* 
106 * The transmit descriptors. 
107 */ 
108 struct stge_tfd scd_txdescs[STGE_NTXDESC]; 
109 
110 /* 
111 * The receive descriptors. 
112 */ 
113 struct stge_rfd scd_rxdescs[STGE_NRXDESC]; 
114}; 
115 
116#define STGE_CDOFF(x) offsetof(struct stge_control_data, x) 79#define STGE_CDOFF(x) offsetof(struct stge_control_data, x)
117#define STGE_CDTXOFF(x) STGE_CDOFF(scd_txdescs[(x)]) 80#define STGE_CDTXOFF(x) STGE_CDOFF(scd_txdescs[(x)])
118#define STGE_CDRXOFF(x) STGE_CDOFF(scd_rxdescs[(x)]) 81#define STGE_CDRXOFF(x) STGE_CDOFF(scd_rxdescs[(x)])
119 82
120/* 
121 * Software state for transmit and receive jobs. 
122 */ 
123struct stge_descsoft { 
124 struct mbuf *ds_mbuf; /* head of our mbuf chain */ 
125 bus_dmamap_t ds_dmamap; /* our DMA map */ 
126}; 
127 
128/* 
129 * Software state per device. 
130 */ 
131struct stge_softc { 
132 device_t sc_dev; /* generic device information */ 
133 bus_space_tag_t sc_st; /* bus space tag */ 
134 bus_space_handle_t sc_sh; /* bus space handle */ 
135 bus_dma_tag_t sc_dmat; /* bus DMA tag */ 
136 struct ethercom sc_ethercom; /* ethernet common data */ 
137 int sc_rev; /* silicon revision */ 
138 
139 void *sc_ih; /* interrupt cookie */ 
140 
141 struct mii_data sc_mii; /* MII/media information */ 
142 
143 callout_t sc_tick_ch; /* tick callout */ 
144 
145 bus_dmamap_t sc_cddmamap; /* control data DMA map */ 
146#define sc_cddma sc_cddmamap->dm_segs[0].ds_addr 
147 
148 /* 
149 * Software state for transmit and receive descriptors. 
150 */ 
151 struct stge_descsoft sc_txsoft[STGE_NTXDESC]; 
152 struct stge_descsoft sc_rxsoft[STGE_NRXDESC]; 
153 
154 /* 
155 * Control data structures. 
156 */ 
157 struct stge_control_data *sc_control_data; 
158#define sc_txdescs sc_control_data->scd_txdescs 
159#define sc_rxdescs sc_control_data->scd_rxdescs 
160 
161#ifdef STGE_EVENT_COUNTERS 
162 /* 
163 * Event counters. 
164 */ 
165 struct evcnt sc_ev_txstall; /* Tx stalled */ 
166 struct evcnt sc_ev_txdmaintr; /* Tx DMA interrupts */ 
167 struct evcnt sc_ev_txindintr; /* Tx Indicate interrupts */ 
168 struct evcnt sc_ev_rxintr; /* Rx interrupts */ 
169 
170 struct evcnt sc_ev_txseg1; /* Tx packets w/ 1 segment */ 
171 struct evcnt sc_ev_txseg2; /* Tx packets w/ 2 segments */ 
172 struct evcnt sc_ev_txseg3; /* Tx packets w/ 3 segments */ 
173 struct evcnt sc_ev_txseg4; /* Tx packets w/ 4 segments */ 
174 struct evcnt sc_ev_txseg5; /* Tx packets w/ 5 segments */ 
175 struct evcnt sc_ev_txsegmore; /* Tx packets w/ more than 5 segments */ 
176 struct evcnt sc_ev_txcopy; /* Tx packets that we had to copy */ 
177 
178 struct evcnt sc_ev_rxipsum; /* IP checksums checked in-bound */ 
179 struct evcnt sc_ev_rxtcpsum; /* TCP checksums checked in-bound */ 
180 struct evcnt sc_ev_rxudpsum; /* UDP checksums checked in-bound */ 
181 
182 struct evcnt sc_ev_txipsum; /* IP checksums comp. out-bound */ 
183 struct evcnt sc_ev_txtcpsum; /* TCP checksums comp. out-bound */ 
184 struct evcnt sc_ev_txudpsum; /* UDP checksums comp. out-bound */ 
185#endif /* STGE_EVENT_COUNTERS */ 
186 
187 int sc_txpending; /* number of Tx requests pending */ 
188 int sc_txdirty; /* first dirty Tx descriptor */ 
189 int sc_txlast; /* last used Tx descriptor */ 
190 
191 int sc_rxptr; /* next ready Rx descriptor/descsoft */ 
192 int sc_rxdiscard; 
193 int sc_rxlen; 
194 struct mbuf *sc_rxhead; 
195 struct mbuf *sc_rxtail; 
196 struct mbuf **sc_rxtailp; 
197 
198 int sc_txthresh; /* Tx threshold */ 
199 uint32_t sc_usefiber:1; /* if we're fiber */ 
200 uint32_t sc_stge1023:1; /* are we a 1023 */ 
201 uint32_t sc_DMACtrl; /* prototype DMACtrl register */ 
202 uint32_t sc_MACCtrl; /* prototype MacCtrl register */ 
203 uint16_t sc_IntEnable; /* prototype IntEnable register */ 
204 uint16_t sc_ReceiveMode; /* prototype ReceiveMode register */ 
205 uint8_t sc_PhyCtrl; /* prototype PhyCtrl register */ 
206}; 
207 
208#define STGE_RXCHAIN_RESET(sc) \ 83#define STGE_RXCHAIN_RESET(sc) \
209do { \ 84do { \
210 (sc)->sc_rxtailp = &(sc)->sc_rxhead; \ 85 (sc)->sc_rxtailp = &(sc)->sc_rxhead; \
211 *(sc)->sc_rxtailp = NULL; \ 86 *(sc)->sc_rxtailp = NULL; \
212 (sc)->sc_rxlen = 0; \ 87 (sc)->sc_rxlen = 0; \
213} while (/*CONSTCOND*/0) 88} while (/*CONSTCOND*/0)
214 89
215#define STGE_RXCHAIN_LINK(sc, m) \ 90#define STGE_RXCHAIN_LINK(sc, m) \
216do { \ 91do { \
217 *(sc)->sc_rxtailp = (sc)->sc_rxtail = (m); \ 92 *(sc)->sc_rxtailp = (sc)->sc_rxtail = (m); \
218 (sc)->sc_rxtailp = &(m)->m_next; \ 93 (sc)->sc_rxtailp = &(m)->m_next; \
219} while (/*CONSTCOND*/0) 94} while (/*CONSTCOND*/0)
220 95

cvs diff -r1.5 -r1.6 src/sys/dev/pci/if_stgereg.h (expand / switch to unified diff)

--- src/sys/dev/pci/if_stgereg.h 2008/04/28 20:23:55 1.5
+++ src/sys/dev/pci/if_stgereg.h 2019/10/07 11:53:40 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_stgereg.h,v 1.5 2008/04/28 20:23:55 martin Exp $ */ 1/* $NetBSD: if_stgereg.h,v 1.6 2019/10/07 11:53:40 msaitoh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -22,26 +22,30 @@ @@ -22,26 +22,30 @@
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#ifndef _DEV_PCI_IF_STGEREG_H_ 32#ifndef _DEV_PCI_IF_STGEREG_H_
33#define _DEV_PCI_IF_STGEREG_H_ 33#define _DEV_PCI_IF_STGEREG_H_
34 34
 35
 36#include <net/if_ether.h>
 37#include <sys/bus.h>
 38
35/* 39/*
36 * Register description for the Sundance Tech. TC9021 10/100/1000 40 * Register description for the Sundance Tech. TC9021 10/100/1000
37 * Ethernet controller. 41 * Ethernet controller.
38 * 42 *
39 * Note that while DMA addresses are all in 64-bit fields, only 43 * Note that while DMA addresses are all in 64-bit fields, only
40 * the lower 40 bits of a DMA address are valid. 44 * the lower 40 bits of a DMA address are valid.
41 */ 45 */
42 46
43/* 47/*
44 * TC9021 buffer fragment descriptor. 48 * TC9021 buffer fragment descriptor.
45 */ 49 */
46struct stge_frag { 50struct stge_frag {
47 uint64_t frag_word0; /* address, length */ 51 uint64_t frag_word0; /* address, length */
@@ -439,14 +443,139 @@ struct stge_rfd { @@ -439,14 +443,139 @@ struct stge_rfd {
439 443
440#define STGE_EtherStatsPkts64Octets 0x13c 444#define STGE_EtherStatsPkts64Octets 0x13c
441 445
442#define STGE_EtherStatsPkts65to127Octets 0x140 446#define STGE_EtherStatsPkts65to127Octets 0x140
443 447
444#define STGE_EtherStatsPkts128to255Octets 0x144 448#define STGE_EtherStatsPkts128to255Octets 0x144
445 449
446#define STGE_EtherStatsPkts256to511Octets 0x148 450#define STGE_EtherStatsPkts256to511Octets 0x148
447 451
448#define STGE_EtherStatsPkts512to1023Octets 0x14c 452#define STGE_EtherStatsPkts512to1023Octets 0x14c
449 453
450#define STGE_EtherStatsPkts1024to1518Octets 0x150 454#define STGE_EtherStatsPkts1024to1518Octets 0x150
451 455
 456/*
 457 * Transmit descriptor list size.
 458 */
 459#define STGE_NTXDESC 256
 460#define STGE_NTXDESC_MASK (STGE_NTXDESC - 1)
 461#define STGE_NEXTTX(x) (((x) + 1) & STGE_NTXDESC_MASK)
 462
 463/*
 464 * Receive descriptor list size.
 465 */
 466#define STGE_NRXDESC 256
 467#define STGE_NRXDESC_MASK (STGE_NRXDESC - 1)
 468#define STGE_NEXTRX(x) (((x) + 1) & STGE_NRXDESC_MASK)
 469
 470/*
 471 * Only interrupt every N frames. Must be a power-of-two.
 472 */
 473#define STGE_TXINTR_SPACING 16
 474#define STGE_TXINTR_SPACING_MASK (STGE_TXINTR_SPACING - 1)
 475
 476/*
 477 * Control structures are DMA'd to the TC9021 chip. We allocate them in
 478 * a single clump that maps to a single DMA segment to make several things
 479 * easier.
 480 */
 481struct stge_control_data {
 482 /*
 483 * The transmit descriptors.
 484 */
 485 struct stge_tfd scd_txdescs[STGE_NTXDESC];
 486
 487 /*
 488 * The receive descriptors.
 489 */
 490 struct stge_rfd scd_rxdescs[STGE_NRXDESC];
 491};
 492
 493/*
 494 * Software state for transmit and receive jobs.
 495 */
 496struct stge_descsoft {
 497 struct mbuf *ds_mbuf; /* head of our mbuf chain */
 498 bus_dmamap_t ds_dmamap; /* our DMA map */
 499};
 500
 501/*
 502 * Software state per device.
 503 */
 504struct stge_softc {
 505 device_t sc_dev; /* generic device information */
 506 bus_space_tag_t sc_st; /* bus space tag */
 507 bus_space_handle_t sc_sh; /* bus space handle */
 508 bus_dma_tag_t sc_dmat; /* bus DMA tag */
 509 struct ethercom sc_ethercom; /* ethernet common data */
 510 int sc_rev; /* silicon revision */
 511
 512 void *sc_ih; /* interrupt cookie */
 513
 514 struct mii_data sc_mii; /* MII/media information */
 515
 516 callout_t sc_tick_ch; /* tick callout */
 517
 518 bus_dmamap_t sc_cddmamap; /* control data DMA map */
 519#define sc_cddma sc_cddmamap->dm_segs[0].ds_addr
 520
 521 /*
 522 * Software state for transmit and receive descriptors.
 523 */
 524 struct stge_descsoft sc_txsoft[STGE_NTXDESC];
 525 struct stge_descsoft sc_rxsoft[STGE_NRXDESC];
 526
 527 /*
 528 * Control data structures.
 529 */
 530 struct stge_control_data *sc_control_data;
 531#define sc_txdescs sc_control_data->scd_txdescs
 532#define sc_rxdescs sc_control_data->scd_rxdescs
 533
 534#ifdef STGE_EVENT_COUNTERS
 535 /*
 536 * Event counters.
 537 */
 538 struct evcnt sc_ev_txstall; /* Tx stalled */
 539 struct evcnt sc_ev_txdmaintr; /* Tx DMA interrupts */
 540 struct evcnt sc_ev_txindintr; /* Tx Indicate interrupts */
 541 struct evcnt sc_ev_rxintr; /* Rx interrupts */
 542
 543 struct evcnt sc_ev_txseg1; /* Tx packets w/ 1 segment */
 544 struct evcnt sc_ev_txseg2; /* Tx packets w/ 2 segments */
 545 struct evcnt sc_ev_txseg3; /* Tx packets w/ 3 segments */
 546 struct evcnt sc_ev_txseg4; /* Tx packets w/ 4 segments */
 547 struct evcnt sc_ev_txseg5; /* Tx packets w/ 5 segments */
 548 struct evcnt sc_ev_txsegmore; /* Tx packets w/ more than 5 segments */
 549 struct evcnt sc_ev_txcopy; /* Tx packets that we had to copy */
 550
 551 struct evcnt sc_ev_rxipsum; /* IP checksums checked in-bound */
 552 struct evcnt sc_ev_rxtcpsum; /* TCP checksums checked in-bound */
 553 struct evcnt sc_ev_rxudpsum; /* UDP checksums checked in-bound */
 554
 555 struct evcnt sc_ev_txipsum; /* IP checksums comp. out-bound */
 556 struct evcnt sc_ev_txtcpsum; /* TCP checksums comp. out-bound */
 557 struct evcnt sc_ev_txudpsum; /* UDP checksums comp. out-bound */
 558#endif /* STGE_EVENT_COUNTERS */
 559
 560 int sc_txpending; /* number of Tx requests pending */
 561 int sc_txdirty; /* first dirty Tx descriptor */
 562 int sc_txlast; /* last used Tx descriptor */
 563
 564 int sc_rxptr; /* next ready Rx descriptor/descsoft */
 565 int sc_rxdiscard;
 566 int sc_rxlen;
 567 struct mbuf *sc_rxhead;
 568 struct mbuf *sc_rxtail;
 569 struct mbuf **sc_rxtailp;
 570
 571 int sc_txthresh; /* Tx threshold */
 572 uint32_t sc_usefiber:1; /* if we're fiber */
 573 uint32_t sc_stge1023:1; /* are we a 1023 */
 574 uint32_t sc_DMACtrl; /* prototype DMACtrl register */
 575 uint32_t sc_MACCtrl; /* prototype MacCtrl register */
 576 uint16_t sc_IntEnable; /* prototype IntEnable register */
 577 uint16_t sc_ReceiveMode; /* prototype ReceiveMode register */
 578 uint8_t sc_PhyCtrl; /* prototype PhyCtrl register */
 579};
 580
452#endif /* _DEV_PCI_IF_STGEREG_H_ */ 581#endif /* _DEV_PCI_IF_STGEREG_H_ */