Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) netw...
details: https://anonhg.NetBSD.org/src/rev/3f6101a3583a
branches: trunk
changeset: 758673:3f6101a3583a
user: jnemeth <jnemeth%NetBSD.org@localhost>
date: Sat Nov 13 00:47:23 2010 +0000
description:
PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) network driver
The et(4) driver supports PCI Express Ethernet adapters based on
the Agere/LSI ET1310/ET1301 integrated MAC/PHY.
The et(4) driver was written by Sepherosa Ziehau for DragonFlyBSD,
ported to OpenBSD by Jonathan Gray and subsequently ported to NetBSD
by Kaspar Brand.
diffstat:
distrib/sets/lists/man/mi | 8 +-
doc/CHANGES | 6 +-
share/man/man4/Makefile | 4 +-
share/man/man4/et.4 | 79 +
share/man/man4/etphy.4 | 58 +
sys/dev/mii/etphy.c | 349 +++++++
sys/dev/mii/files.mii | 6 +-
sys/dev/pci/files.pci | 7 +-
sys/dev/pci/if_et.c | 2127 +++++++++++++++++++++++++++++++++++++++++++++
sys/dev/pci/if_etreg.h | 531 +++++++++++
10 files changed, 3169 insertions(+), 6 deletions(-)
diffs (truncated from 3273 to 300 lines):
diff -r 184bc97ebb57 -r 3f6101a3583a distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Fri Nov 12 17:50:12 2010 +0000
+++ b/distrib/sets/lists/man/mi Sat Nov 13 00:47:23 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1248 2010/11/07 01:12:22 jakllsch Exp $
+# $NetBSD: mi,v 1.1249 2010/11/13 00:47:23 jnemeth Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -926,7 +926,9 @@
./usr/share/man/cat4/eso.0 man-sys-catman .cat
./usr/share/man/cat4/esp.0 man-sys-catman .cat
./usr/share/man/cat4/ess.0 man-sys-catman .cat
+./usr/share/man/cat4/et.0 man-sys-catman .cat
./usr/share/man/cat4/etherip.0 man-sys-catman .cat
+./usr/share/man/cat4/etphy.0 man-sys-catman .cat
./usr/share/man/cat4/evbarm/epgpio.0 man-sys-catman .cat
./usr/share/man/cat4/evbarm/intro.0 man-sys-catman .cat
./usr/share/man/cat4/evbarm/iopaau.0 man-sys-catman .cat
@@ -3622,7 +3624,9 @@
./usr/share/man/html4/eso.html man-sys-htmlman html
./usr/share/man/html4/esp.html man-sys-htmlman html
./usr/share/man/html4/ess.html man-sys-htmlman html
+./usr/share/man/html4/et.html man-sys-htmlman html
./usr/share/man/html4/etherip.html man-sys-htmlman html
+./usr/share/man/html4/etphy.html man-sys-htmlman html
./usr/share/man/html4/evbarm/epgpio.html man-sys-htmlman html
./usr/share/man/html4/evbarm/intro.html man-sys-htmlman html
./usr/share/man/html4/evbarm/iopaau.html man-sys-htmlman html
@@ -6096,7 +6100,9 @@
./usr/share/man/man4/eso.4 man-sys-man .man
./usr/share/man/man4/esp.4 man-sys-man .man
./usr/share/man/man4/ess.4 man-sys-man .man
+./usr/share/man/man4/et.4 man-sys-man .man
./usr/share/man/man4/etherip.4 man-sys-man .man
+./usr/share/man/man4/etphy.4 man-sys-man .man
./usr/share/man/man4/evbarm/epgpio.4 man-sys-man .man
./usr/share/man/man4/evbarm/intro.4 man-sys-man .man
./usr/share/man/man4/evbarm/iopaau.4 man-sys-man .man
diff -r 184bc97ebb57 -r 3f6101a3583a doc/CHANGES
--- a/doc/CHANGES Fri Nov 12 17:50:12 2010 +0000
+++ b/doc/CHANGES Sat Nov 13 00:47:23 2010 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1457 $>
+# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1458 $>
#
#
# [Note: This file does not mention every change made to the NetBSD source tree.
@@ -780,3 +780,7 @@
controller. [skrll 20101110]
dreamcast: Switch to using Xorg servers and binaries.
[tsutsui 20101112]
+ et(4): Add a driver for Agere/LSI ET1310/ET1301 10/100/Gigabit
+ Ethernet device [jnemeth 20101112]
+ etphy(4): Add a driver for the Agere/LSI ET1011 TruePHY Gigabit
+ Ethernet PHY [jnemeth 20101112]
diff -r 184bc97ebb57 -r 3f6101a3583a share/man/man4/Makefile
--- a/share/man/man4/Makefile Fri Nov 12 17:50:12 2010 +0000
+++ b/share/man/man4/Makefile Sat Nov 13 00:47:23 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.532 2010/11/07 01:12:22 jakllsch Exp $
+# $NetBSD: Makefile,v 1.533 2010/11/13 00:47:24 jnemeth Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -23,7 +23,7 @@
ddb.4 ddc.4 de.4 dge.4 dk.4 dm.4 dmoverio.4 \
dmphy.4 dpt.4 dpti.4 drm.4 drum.4 \
eap.4 ebus.4 edc.4 elmc.4 emuxki.4 en.4 envsys.4 ep.4 esh.4 esis.4 \
- esa.4 esiop.4 esm.4 eso.4 etherip.4 exphy.4 \
+ esa.4 esiop.4 esm.4 eso.4 et.4 etherip.4 etphy.4 exphy.4 \
fast_ipsec.4 fd.4 finsio.4 fpa.4 fms.4 fss.4 fujitsu.4 fxp.4 \
gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \
glxtphy.4 gpib.4 gpio.4 gpiolock.4 gpiosim.4 gre.4 gphyter.4 gsip.4 \
diff -r 184bc97ebb57 -r 3f6101a3583a share/man/man4/et.4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/et.4 Sat Nov 13 00:47:23 2010 +0000
@@ -0,0 +1,79 @@
+.\" $NetBSD: et.4,v 1.1 2010/11/13 00:47:24 jnemeth Exp $
+.\" $OpenBSD: et.4,v 1.2 2007/10/30 13:22:21 jmc Exp $
+.\"
+.\" Copyright (c) 2007 Jonathan Gray <jsg%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 October 13, 2010
+.Dt ET 4
+.Os
+.Sh NAME
+.Nm et
+.Nd Agere/LSI ET1310/ET1301 10/100/Gigabit Ethernet device
+.Sh SYNOPSIS
+.Cd "et* at pci? dev ? function ?"
+.Cd "etphy* at mii? phy ?"
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCI Express Ethernet adapters based on the Agere/LSI
+ET1310/ET1301 integrated MAC/PHY.
+.Pp
+The following
+.Ar media
+types are supported:
+.Pp
+.Bl -tag -width autoselect -compact
+.It Cm autoselect
+Enable autoselection of the media type and options.
+.It Cm 10baseT
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseT
+Set 1000Mbps (Gigabit Ethernet) operation (ET1310 only).
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr etphy 4 ,
+.Xr ifmedia 4 ,
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr pci 4 ,
+.Xr ifconfig.if 5 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 4.3 .
+It was added to
+.Nx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Sepherosa Ziehau
+for
+DragonFlyBSD,
+ported to
+.Ox
+by
+.An Jonathan Gray
+.Aq jsg%openbsd.org@localhost ,
+and subsequently ported to
+.Nx
+by
+.An Kaspar Brand .
diff -r 184bc97ebb57 -r 3f6101a3583a share/man/man4/etphy.4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/etphy.4 Sat Nov 13 00:47:23 2010 +0000
@@ -0,0 +1,58 @@
+.\" $NetBSD: etphy.4,v 1.1 2010/11/13 00:47:24 jnemeth Exp $
+.\" $OpenBSD: etphy.4,v 1.2 2007/10/30 13:22:21 jmc Exp $
+.\"
+.\" Copyright (c) 2007 Jonathan Gray <jsg%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 October 13, 2010
+.Dt ETPHY 4
+.Os
+.Sh NAME
+.Nm etphy
+.Nd Agere/LSI ET1011 TruePHY Gigabit Ethernet PHY
+.Sh SYNOPSIS
+.Cd "etphy* at mii? phy ?"
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the Agere/LSI ET1011 TruePHY 10/100/1000 Ethernet PHYs
+including the integrated TruePHY in ET1310/ET1301 based adapters.
+.Sh SEE ALSO
+.Xr ifmedia 4 ,
+.Xr intro 4 ,
+.Xr mii 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 4.3 .
+It was added to
+.Nx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Sepherosa Ziehau
+for DragonFlyBSD,
+ported to
+.Ox
+by
+.An Jonathan Gray
+.Aq jsg%openbsd.org@localhost ,
+and subsequently ported to
+.Nx
+by
+.An Kaspar Brand .
diff -r 184bc97ebb57 -r 3f6101a3583a sys/dev/mii/etphy.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/mii/etphy.c Sat Nov 13 00:47:23 2010 +0000
@@ -0,0 +1,349 @@
+/* $NetBSD: etphy.c,v 1.1 2010/11/13 00:47:24 jnemeth Exp $ */
+/* $OpenBSD: etphy.c,v 1.4 2008/04/02 20:12:58 brad Exp $ */
+
+/*
+ * Copyright (c) 2007 The DragonFly Project. All rights reserved.
+ *
+ * This code is derived from software contributed to The DragonFly Project
+ * by Sepherosa Ziehau <sepherosa%gmail.com@localhost>
+ *
+ * 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, 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.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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.
+ *
+ * $DragonFly: src/sys/dev/netif/mii_layer/truephy.c,v 1.1 2007/10/12 14:12:42 sephe Exp $
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.1 2010/11/13 00:47:24 jnemeth Exp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/device.h>
+#include <sys/socket.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>
+
+#define ETPHY_INDEX 0x10 /* XXX reserved in DS */
+#define ETPHY_INDEX_MAGIC 0x402
+#define ETPHY_DATA 0x11 /* XXX reserved in DS */
+
+#define ETPHY_CTRL 0x12
+#define ETPHY_CTRL_DIAG 0x0004
+#define ETPHY_CTRL_RSV1 0x0002 /* XXX reserved */
+#define ETPHY_CTRL_RSV0 0x0001 /* XXX reserved */
+
+#define ETPHY_CONF 0x16
+#define ETPHY_CONF_TXFIFO_MASK 0x3000
+#define ETPHY_CONF_TXFIFO_8 0x0000
+#define ETPHY_CONF_TXFIFO_16 0x1000
+#define ETPHY_CONF_TXFIFO_24 0x2000
+#define ETPHY_CONF_TXFIFO_32 0x3000
+
+#define ETPHY_SR 0x1a
+#define ETPHY_SR_SPD_MASK 0x0300
+#define ETPHY_SR_SPD_1000T 0x0200
+#define ETPHY_SR_SPD_100TX 0x0100
+#define ETPHY_SR_SPD_10T 0x0000
+#define ETPHY_SR_FDX 0x0080
Home |
Main Index |
Thread Index |
Old Index