Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Add support IC Plus IP1000* PHYs. PR/kern 42314 ...



details:   https://anonhg.NetBSD.org/src/rev/d822bb583abd
branches:  trunk
changeset: 965950:d822bb583abd
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Oct 07 11:53:40 2019 +0000

description:
Add support IC Plus IP1000* PHYs. PR/kern 42314 first reported by
Tomokazu HARADA and patch provided by Andrius V.

diffstat:

 distrib/sets/lists/man/mi   |    5 +-
 share/man/man4/Makefile     |    4 +-
 share/man/man4/ipgphy.4     |   34 +++
 share/man/man4/mii.4        |    3 +-
 share/man/man4/vge.4        |    3 +-
 sys/arch/amd64/conf/ALL     |    5 +-
 sys/arch/amd64/conf/GENERIC |    5 +-
 sys/arch/i386/conf/ALL      |    5 +-
 sys/arch/i386/conf/GENERIC  |    5 +-
 sys/dev/DEVNAMES            |    3 +-
 sys/dev/mii/files.mii       |    6 +-
 sys/dev/mii/ipgphy.c        |  415 ++++++++++++++++++++++++++++++++++++++++++++
 sys/dev/mii/ipgphyreg.h     |   83 ++++++++
 sys/dev/pci/if_stge.c       |  129 +-------------
 sys/dev/pci/if_stgereg.h    |  131 +++++++++++++-
 15 files changed, 693 insertions(+), 143 deletions(-)

diffs (truncated from 1074 to 300 lines):

diff -r ca30b9fad2f6 -r d822bb583abd distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Mon Oct 07 09:37:16 2019 +0000
+++ b/distrib/sets/lists/man/mi Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1655 2019/09/21 14:04:12 jmcneill Exp $
+# $NetBSD: mi,v 1.1656 2019/10/07 11:53:40 msaitoh Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1336,6 +1336,7 @@
 ./usr/share/man/cat4/ip6.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/ipf.0                     man-ipf-catman          ipfilter,.cat
 ./usr/share/man/cat4/ipfilter.0                        man-ipf-catman          ipfilter,.cat
+./usr/share/man/cat4/ipgphy.0                  man-sys-catman          .cat
 ./usr/share/man/cat4/ipip.0                    man-obsolete            obsolete
 ./usr/share/man/cat4/ipkdb.0                   man-obsolete            obsolete
 ./usr/share/man/cat4/ipl.0                     man-ipf-catman          ipfilter,.cat
@@ -4477,6 +4478,7 @@
 ./usr/share/man/html4/ip6.html                 man-sys-htmlman         html
 ./usr/share/man/html4/ipf.html                 man-ipf-htmlman         ipfilter,html
 ./usr/share/man/html4/ipfilter.html            man-ipf-htmlman         ipfilter,html
+./usr/share/man/html4/ipgphy.html              man-sys-htmlman         html
 ./usr/share/man/html4/ipkdb.html               man-obsolete            obsolete
 ./usr/share/man/html4/ipl.html                 man-ipf-htmlman         ipfilter,html
 ./usr/share/man/html4/ipmi.html                        man-sys-htmlman         html
@@ -7454,6 +7456,7 @@
 ./usr/share/man/man4/ip6.4                     man-sys-man             .man
 ./usr/share/man/man4/ipf.4                     man-sys-man             ipfilter,.man
 ./usr/share/man/man4/ipfilter.4                        man-sys-man             ipfilter,.man
+./usr/share/man/man4/ipgphy.4                  man-sys-man             .man
 ./usr/share/man/man4/ipip.4                    man-obsolete            obsolete
 ./usr/share/man/man4/ipkdb.4                   man-obsolete            obsolete
 ./usr/share/man/man4/ipl.4                     man-sys-man             ipfilter,.man
diff -r ca30b9fad2f6 -r d822bb583abd share/man/man4/Makefile
--- a/share/man/man4/Makefile   Mon Oct 07 09:37:16 2019 +0000
+++ b/share/man/man4/Makefile   Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.683 2019/09/21 14:04:12 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.684 2019/10/07 11:53:40 msaitoh Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -32,7 +32,7 @@
        ibmcd.4 ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \
        ifmedia.4 igmafb.4 igphy.4 igsfb.4 iha.4 ihidev.4 ihphy.4 iic.4 ims.4 \
        inet.4 ikphy.4 inphy.4 intersil7170.4 intro.4 \
-       ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipmi.4 ipw.4 \
+       ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipgphy.4 ipmi.4 ipw.4 \
        irmce.4 isp.4 ismt.4 isv.4 itesio.4 iteide.4 iwi.4 iwm.4 iwn.4 ixg.4 \
        ixpide.4 ixv.4 \
        jme.4 jmide.4 joy.4 \
diff -r ca30b9fad2f6 -r d822bb583abd share/man/man4/ipgphy.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/ipgphy.4   Mon Oct 07 11:53:40 2019 +0000
@@ -0,0 +1,34 @@
+.\"    $OpenBSD: ipgphy.4,v 1.5 2009/08/08 17:12:40 naddy Exp $
+.\"
+.\" Copyright (c) 2006 Brad Smith <brad%openbsd.org@localhost>
+.\"
+.\" 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
diff -r ca30b9fad2f6 -r d822bb583abd share/man/man4/mii.4
--- a/share/man/man4/mii.4      Mon Oct 07 09:37:16 2019 +0000
+++ b/share/man/man4/mii.4      Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: mii.4,v 1.27 2014/03/03 09:10:00 wiz Exp $
+.\"    $NetBSD: mii.4,v 1.28 2019/10/07 11:53:40 msaitoh Exp $
 .\"
 .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -49,6 +49,7 @@
 .Cd "ikphy*    at mii? phy ?           # Intel 82563 PHYs"
 .Cd "inphy*    at mii? phy ?           # Intel 82555 PHYs"
 .Cd "iophy*    at mii? phy ?           # Intel 82553 PHYs"
+.Cd "ipgphy*   at mii? phy ?           # IC PLUS IP1000A/IP1001 PHYs"
 .Cd "lxtphy*   at mii? phy ?           # Level One LXT-970 PHYs"
 .Cd "makphy*   at mii? phy ?           # Marvel 88E1000 Gig-E PHYs"
 .Cd "micphy*   at mii? phy ?           # Micrel KSZ9021 Gig-E PHYs"
diff -r ca30b9fad2f6 -r d822bb583abd share/man/man4/vge.4
--- a/share/man/man4/vge.4      Mon Oct 07 09:37:16 2019 +0000
+++ b/share/man/man4/vge.4      Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: vge.4,v 1.7 2014/03/18 18:20:39 riastradh Exp $
+.\" $NetBSD: vge.4,v 1.8 2019/10/07 11:53:40 msaitoh Exp $
 .\"
 .\" Copyright (c) 2004
 .\"    Bill Paul <wpaul%windriver.com@localhost>. All rights reserved.
@@ -180,6 +180,7 @@
 .Sh SEE ALSO
 .Xr arp 4 ,
 .Xr ciphy 4 ,
+.Xr ipgphy 4 ,
 .Xr mii 4 ,
 .Xr netintro 4 ,
 .Xr ukphy 4 ,
diff -r ca30b9fad2f6 -r d822bb583abd sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL   Mon Oct 07 09:37:16 2019 +0000
+++ b/sys/arch/amd64/conf/ALL   Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.123 2019/10/03 19:01:13 tnn Exp $
+# $NetBSD: ALL,v 1.124 2019/10/07 11:53:40 msaitoh Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.123 $"
+#ident         "ALL-$Revision: 1.124 $"
 
 maxusers       64              # estimated number of users
 
@@ -1105,6 +1105,7 @@
 ikphy* at mii? phy ?                   # Intel 82563 PHYs
 inphy* at mii? phy ?                   # Intel 82555 PHYs
 iophy* at mii? phy ?                   # Intel 82553 PHYs
+ipgphy* at mii? phy ?                  # IC PLUS IP1000A/IP1001 PHYs
 lxtphy* at mii? phy ?                  # Level One LXT-970 PHYs
 makphy* at mii? phy ?                  # Marvell Semiconductor 88E1000 PHYs
 nsphy* at mii? phy ?                   # NS83840 PHYs
diff -r ca30b9fad2f6 -r d822bb583abd sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Mon Oct 07 09:37:16 2019 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.536 2019/10/03 18:57:38 tnn Exp $
+# $NetBSD: GENERIC,v 1.537 2019/10/07 11:53:40 msaitoh Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.536 $"
+#ident         "GENERIC-$Revision: 1.537 $"
 
 maxusers       64              # estimated number of users
 
@@ -874,6 +874,7 @@
 ikphy* at mii? phy ?                   # Intel 82563 PHYs
 inphy* at mii? phy ?                   # Intel 82555 PHYs
 iophy* at mii? phy ?                   # Intel 82553 PHYs
+ipgphy* at mii? phy ?                  # IC PLUS IP1000A/IP1001 PHYs
 lxtphy* at mii? phy ?                  # Level One LXT-970 PHYs
 makphy* at mii? phy ?                  # Marvell Semiconductor 88E1000 PHYs
 nsphy* at mii? phy ?                   # NS83840 PHYs
diff -r ca30b9fad2f6 -r d822bb583abd sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL    Mon Oct 07 09:37:16 2019 +0000
+++ b/sys/arch/i386/conf/ALL    Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.470 2019/08/19 03:25:40 ozaki-r Exp $
+# $NetBSD: ALL,v 1.471 2019/10/07 11:53:40 msaitoh Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.470 $"
+#ident         "ALL-$Revision: 1.471 $"
 
 maxusers       64              # estimated number of users
 
@@ -1209,6 +1209,7 @@
 ikphy* at mii? phy ?                   # Intel 82563 PHYs
 inphy* at mii? phy ?                   # Intel 82555 PHYs
 iophy* at mii? phy ?                   # Intel 82553 PHYs
+ipgphy* at mii? phy ?                  # IC PLUS IP1000A/IP1001 PHYs
 lxtphy* at mii? phy ?                  # Level One LXT-970 PHYs
 makphy* at mii? phy ?                  # Marvell Semiconductor 88E1000 PHYs
 nsphy* at mii? phy ?                   # NS83840 PHYs
diff -r ca30b9fad2f6 -r d822bb583abd sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Mon Oct 07 09:37:16 2019 +0000
+++ b/sys/arch/i386/conf/GENERIC        Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1210 2019/08/09 08:01:06 rin Exp $
+# $NetBSD: GENERIC,v 1.1211 2019/10/07 11:53:40 msaitoh Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.1210 $"
+#ident         "GENERIC-$Revision: 1.1211 $"
 
 maxusers       64              # estimated number of users
 
@@ -1120,6 +1120,7 @@
 ikphy* at mii? phy ?                   # Intel 82563 PHYs
 inphy* at mii? phy ?                   # Intel 82555 PHYs
 iophy* at mii? phy ?                   # Intel 82553 PHYs
+ipgphy* at mii? phy ?                  # IC PLUS IP1000A/IP1001 PHYs
 lxtphy* at mii? phy ?                  # Level One LXT-970 PHYs
 makphy* at mii? phy ?                  # Marvell Semiconductor 88E1000 PHYs
 nsphy* at mii? phy ?                   # NS83840 PHYs
diff -r ca30b9fad2f6 -r d822bb583abd sys/dev/DEVNAMES
--- a/sys/dev/DEVNAMES  Mon Oct 07 09:37:16 2019 +0000
+++ b/sys/dev/DEVNAMES  Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: DEVNAMES,v 1.321 2019/05/08 13:40:17 isaki Exp $
+#      $NetBSD: DEVNAMES,v 1.322 2019/10/07 11:53:40 msaitoh Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -659,6 +659,7 @@
 ipaqbus                        hpcarm
 ipaqlcd                        hpcarm
 ipaqpcic               hpcarm
+ipgphy                 MI
 ipmi                   amd64
 ipmi                   i386
 ipmi                   xen
diff -r ca30b9fad2f6 -r d822bb583abd sys/dev/mii/files.mii
--- a/sys/dev/mii/files.mii     Mon Oct 07 09:37:16 2019 +0000
+++ b/sys/dev/mii/files.mii     Mon Oct 07 11:53:40 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.mii,v 1.50 2014/11/15 19:18:18 christos Exp $
+#      $NetBSD: files.mii,v 1.51 2019/10/07 11:53:40 msaitoh Exp $
 
 defflag        opt_mii.h       MIIVERBOSE
 
@@ -99,6 +99,10 @@
 attach ikphy at mii
 file   dev/mii/ikphy.c                         ikphy
 
+device ipgphy: mii_phy
+attach ipgphy at mii
+file   dev/mii/ipgphy.c                        ipgphy
+
 device sqphy: mii_phy
 attach sqphy at mii
 file   dev/mii/sqphy.c                         sqphy
diff -r ca30b9fad2f6 -r d822bb583abd sys/dev/mii/ipgphy.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/mii/ipgphy.c      Mon Oct 07 11:53:40 2019 +0000
@@ -0,0 +1,415 @@
+/*     $OpenBSD: ipgphy.c,v 1.19 2015/07/19 06:28:12 yuo Exp $ */
+
+/*-
+ * Copyright (c) 2006, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
+ * 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.



Home | Main Index | Thread Index | Old Index