This commit adds driver support for the SysKonnect SK-984x series

gigabit ethernet adapters. This includes two single port cards
(single mode and multimode fiber) and two dual port cards (also single
mode and multimode fiber). SysKonnect is currently the only
vendor with a dual port gigabit ethernet NIC.

The ports on dual port adapters are treated as separate network
interfaces. Thus, if you have an SK-9844 dual port SX card, you
should have both sk0 and sk1 interfaces attached. Dual port cards
are implemented using two XMAC II chips connected to a single
SysKonnect GEnesis controller. Hence, dual port cards are really
one PCI device, as opposed to two separate PCI devices connected
through a PCI to PCI bridge. Note that SysKonnect's drivers use
the two ports for failover purposes rather that as two separate
interfaces, plus they don't support jumbo frames. This applies to
their Linux driver too. :)

Support is provided for hardware multicast filtering, BPF and
jumbo frames. The SysKonnect cards support TCP checksum offload
however this feature is not currently enabled (hopefully it will
be once we get checksum offload support).

There are still a few things that need to be implemeted, like
the ability to communicate with the on-board LM80 voltage/temperature
monitor, but I wanted to get the driver under CVS control and into
-current so people could bang on it.

A big thanks for SysKonnect for making all their programming info
for these cards (and for their FDDI and token ring cards) available
without NDA (see www.syskonnect.com).
This commit is contained in:
Bill Paul 1999-07-09 04:30:09 +00:00
parent d6c4f01106
commit 3ebb090530
19 changed files with 7335 additions and 11 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.94 1999/07/03 05:41:21 mharo Exp $
* $Id: devices.c,v 1.95 1999/07/06 20:40:22 phk Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -100,6 +100,7 @@ static struct _devname {
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
{ DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" },
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
{ DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" },

View File

@ -109,7 +109,6 @@ lnc0 280 10 n/a dyn Lance/PCnet cards
mx0 dyn dyn n/a dyn Macronix 98713/15/25 PCI based cards
pn0 dyn dyn n/a dyn Lite-On PNIC PCI based cards
rl0 dyn dyn n/a dyn RealTek 8129/8139 fast ethernet
ti0 dyn dyn n/a dyn Alteon Networks gigabit ethernet
tl0 dyn dyn n/a dyn TI TNET100 'ThunderLAN' cards.
wb0 dyn dyn n/a dyn Winbond W89C840F PCI based cards.
vr0 dyn dyn n/a dyn VIA VT3043/VT86C100A PCI based cards.
@ -473,6 +472,12 @@ NICs including the following:
Hawking Technologies PN102TX
D-Link DFE530TX
SysKonnect SK-984x PCI gigabit ethernet cards including the following:
SK-9841 1000baseLX single mode fiber, single port
SK-9842 1000baseSX multimode fiber, single port
SK-9843 1000baseLX single mode fiber, dual port
SK-9844 1000baseSX multimode fiber, dual port
Texas Instruments ThunderLAN PCI NICs, including the following:
Compaq Netelligent 10, 10/100, 10/100 Proliant, 10/100 Dual-Port
Compaq Netelligent 10/100 TX Embedded UTP, 10 T PCI UTP/Coax, 10/100 TX UTP

View File

@ -74,6 +74,9 @@ on the ADMtek Inc. AL981 Comet chipset. [MERGED]
Support has been added for the Rise mP6 processor. [MERGED]
Driver support has been added for SysKonnect SK-984x PCI gigabit
ethernet adapters.
1.2. SECURITY FIXES
-------------------
A new jail(2) system call and admin command (jail(8)) have been added for
@ -269,6 +272,12 @@ NICs including the following:
Hawking Technologies PN102TX
D-Link DFE530TX
SysKonnect SK-984x PCI gigabit ethernet cards including the following:
SK-9841 1000baseLX single mode fiber, single port
SK-9842 1000baseSX multimode fiber, single port
SK-9843 1000baseLX single mode fiber, dual port
SK-9844 1000baseSX multimode fiber, dual port
Texas Instruments ThunderLAN PCI NICs, including the following:
Compaq Netelligent 10, 10/100, 10/100 Proliant, 10/100 Dual-Port
Compaq Netelligent 10/100 TX Embedded UTP, 10 T PCI UTP/Coax, 10/100 TX UTP

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.108 1999/05/21 04:37:40 wpaul Exp $
# $Id: Makefile,v 1.109 1999/05/22 07:54:38 bde Exp $
MAN4= adv.4 adw.4 aha.4 ahb.4 ahc.4 aic.4 al.4 alpm.4 apm.4 ar.4 asc.4 \
atkbd.4 atkbdc.4 ax.4 bktr.4 bt.4 cs.4 cx.4 cy.4 de.4 \
@ -6,7 +6,7 @@ MAN4= adv.4 adw.4 aha.4 ahb.4 ahc.4 aic.4 al.4 alpm.4 apm.4 ar.4 asc.4 \
io.4 joy.4 keyboard.4 labpc.4 le.4 lnc.4 matcd.4 mcd.4 \
mem.4 meteor.4 mouse.4 mse.4 mtio.4 mx.4 ncr.4 npx.4 \
ohci.4 pcf.4 pcm.4 pcvt.4 perfmon.4 pn.4 pnp.4 ppc.4 psm.4 \
rdp.4 rl.4 sb.4 scd.4 screen.4 si.4 sio.4 \
rdp.4 rl.4 sb.4 scd.4 screen.4 si.4 sio.4 sk.4 \
spkr.4 splash.4 sr.4 syscons.4 sysmouse.4 ti.4 tl.4 tw.4 tx.4 uhci.4 \
ukbd.4 umass.4 ums.4 usb.4 vga.4 vr.4 vx.4 \
wb.4 wd.4 wfd.4 wi.4 wl.4 wt.4 xl.4 ze.4 zp.4
@ -74,6 +74,7 @@ MLINKS+= scd.4 ../scd.4
MLINKS+= screen.4 ../screen.4
MLINKS+= si.4 ../si.4
MLINKS+= sio.4 ../sio.4
MLINKS+= sk.4 ../sk.4
MLINKS+= spkr.4 ../spkr.4 spkr.4 speaker.4 spkr.4 ../speaker.4
MLINKS+= splash.4 ../splash.4 splash.4 screensaver.4 splash.4 ../screensaver.4
MLINKS+= sr.4 ../sr.4

View File

@ -0,0 +1,159 @@
.\" Copyright (c) 1997, 1998, 1999
.\" Bill Paul <wpaul@ctr.columbia.edu>. 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, 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. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Bill Paul.
.\" 4. Neither the name of the author nor the names of any co-contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
.\" 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.
.\"
.\" $Id$
.\"
.Dd July 3, 1999
.Dt SK 4 i386
.Os FreeBSD
.Sh NAME
.Nm sk
.Nd
SysKonnect SK-984x PCI gigabit ethernet adapter driver
.Sh SYNOPSIS
.Cd "device sk0"
.Sh DESCRIPTION
The
.Nm
driver provides support for the SysKonnect SK-984x series PCI
gigabit ethernet adapters, including the following:
.Bl -bullet -offset indent
.It
SK-9841 SK-NET GE-LX single port, single mode fiber adapter
.It
SK-9842 SK-NET GE-SX single port, multimode fiber adapter
.It
SK-9843 SK-NET GE-LX dual port, single mode fiber adapter
.It
SK-9844 SK-NET GE-SX duak port, multimode fiber adapter
.El
.Pp
The SysKonnect adapters consist of two main components: the XaQti Corp.
XMAC II gigabit MAC and the SysKonnect GEnesis controller ASIC. The
XMAC provides the gigabit MAC and PHY suspport while the GEnesis
provides an interface to the PCI bus, DMA support, packet buffering
and arbitration. The GEnesis can control up to two XMACs simultaneously,
allowing dual-port NIC configurations.
.Pp
The
.Nm
driver configures dual port SysKonnect adapters such that each XMAC
is treated as a separate logical network interface. Both ports can
operate indepenently of each other and can be connected to separate
networks. The SysKonnect driver software currently only uses the
second port on dual port adapters for failover purposes: if the link
on the primary port fails, the SysKonnect driver will automatically
switch traffic onto the second port.
.Pp
The XaQti XMAC II supports full and half duplex operation with
autonegotiation. The XMAC also supports unlimited frame sizes.
Support for jumbo frames is provided via the interface MTU setting.
Selecting an MTU larger than 1500 bytes with the
.Xr ifconfig 8
utility configures the adapter to receive and transmit jumbo frames.
Using jumbo frames can greatly improve performance for certain tasks,
such as file transfers and data streaming.
.Pp
The
.Nm
driver supports the following media types:
.Pp
.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
.It autoselect
Enable autoselection of the media type and options.
The user can manually override
the autoselected mode by adding media options to the
.Pa /etc/rc.conf
file.
.It 1000baseSX
Set 1000Mbps (gigabit ethernet) operation. Both
.Ar full-duplex
and
.Ar half-duplex
modes are supported.
.El
.Pp
The
.Nm
driver supports the following media options:
.Pp
.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
.It full-duplex
Force full duplex operation
.It half-duplex
Force half duplex operation.
.El
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh DIAGNOSTICS
.Bl -diag
.It "sk%d: couldn't map memory"
A fatal initialization error has occurred.
.It "sk%d: couldn't map ports"
A fatal initialization error has occurred.
.It "sk%d: couldn't map interrupt"
A fatal initialization error has occurred.
.It "sk%d: no memory for softc struct!"
The driver failed to allocate memory for per-device instance information
during initialization.
.It "sk%d: failed to enable memory mapping!"
The driver failed to initialize PCI shared memory mapping. This might
happen if the card is not in a bus-master slot.
.It "sk%d: no memory for jumbo buffers!"
The driver failed to allocate memory for jumbo frames during
initialization.
.It "sk%d: watchdog timeout"
The device has stopped responding to the network, or there is a problem with
the network connection (cable).
.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr netintro 4 ,
.Xr ifconfig 8 ,
.Xr vlan 4
.Rs
.%T XaQti XMAC II datasheet
.%O http://www.xaqti.com
.Re
.Rs
.%T SysKonnect GEnesis programming manual
.%O http://www.syskonnect.com
.Re
.Sh HISTORY
The
.Nm
device driver first appeared in
.Fx 3.0 .
.Sh AUTHOR
The
.Nm
driver was written by
.An Bill Paul Aq wpaul@ctr.columbia.edu .

159
share/man/man4/sk.4 Normal file
View File

@ -0,0 +1,159 @@
.\" Copyright (c) 1997, 1998, 1999
.\" Bill Paul <wpaul@ctr.columbia.edu>. 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, 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. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Bill Paul.
.\" 4. Neither the name of the author nor the names of any co-contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
.\" 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.
.\"
.\" $Id$
.\"
.Dd July 3, 1999
.Dt SK 4 i386
.Os FreeBSD
.Sh NAME
.Nm sk
.Nd
SysKonnect SK-984x PCI gigabit ethernet adapter driver
.Sh SYNOPSIS
.Cd "device sk0"
.Sh DESCRIPTION
The
.Nm
driver provides support for the SysKonnect SK-984x series PCI
gigabit ethernet adapters, including the following:
.Bl -bullet -offset indent
.It
SK-9841 SK-NET GE-LX single port, single mode fiber adapter
.It
SK-9842 SK-NET GE-SX single port, multimode fiber adapter
.It
SK-9843 SK-NET GE-LX dual port, single mode fiber adapter
.It
SK-9844 SK-NET GE-SX duak port, multimode fiber adapter
.El
.Pp
The SysKonnect adapters consist of two main components: the XaQti Corp.
XMAC II gigabit MAC and the SysKonnect GEnesis controller ASIC. The
XMAC provides the gigabit MAC and PHY suspport while the GEnesis
provides an interface to the PCI bus, DMA support, packet buffering
and arbitration. The GEnesis can control up to two XMACs simultaneously,
allowing dual-port NIC configurations.
.Pp
The
.Nm
driver configures dual port SysKonnect adapters such that each XMAC
is treated as a separate logical network interface. Both ports can
operate indepenently of each other and can be connected to separate
networks. The SysKonnect driver software currently only uses the
second port on dual port adapters for failover purposes: if the link
on the primary port fails, the SysKonnect driver will automatically
switch traffic onto the second port.
.Pp
The XaQti XMAC II supports full and half duplex operation with
autonegotiation. The XMAC also supports unlimited frame sizes.
Support for jumbo frames is provided via the interface MTU setting.
Selecting an MTU larger than 1500 bytes with the
.Xr ifconfig 8
utility configures the adapter to receive and transmit jumbo frames.
Using jumbo frames can greatly improve performance for certain tasks,
such as file transfers and data streaming.
.Pp
The
.Nm
driver supports the following media types:
.Pp
.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
.It autoselect
Enable autoselection of the media type and options.
The user can manually override
the autoselected mode by adding media options to the
.Pa /etc/rc.conf
file.
.It 1000baseSX
Set 1000Mbps (gigabit ethernet) operation. Both
.Ar full-duplex
and
.Ar half-duplex
modes are supported.
.El
.Pp
The
.Nm
driver supports the following media options:
.Pp
.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
.It full-duplex
Force full duplex operation
.It half-duplex
Force half duplex operation.
.El
.Pp
For more information on configuring this device, see
.Xr ifconfig 8 .
.Sh DIAGNOSTICS
.Bl -diag
.It "sk%d: couldn't map memory"
A fatal initialization error has occurred.
.It "sk%d: couldn't map ports"
A fatal initialization error has occurred.
.It "sk%d: couldn't map interrupt"
A fatal initialization error has occurred.
.It "sk%d: no memory for softc struct!"
The driver failed to allocate memory for per-device instance information
during initialization.
.It "sk%d: failed to enable memory mapping!"
The driver failed to initialize PCI shared memory mapping. This might
happen if the card is not in a bus-master slot.
.It "sk%d: no memory for jumbo buffers!"
The driver failed to allocate memory for jumbo frames during
initialization.
.It "sk%d: watchdog timeout"
The device has stopped responding to the network, or there is a problem with
the network connection (cable).
.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr netintro 4 ,
.Xr ifconfig 8 ,
.Xr vlan 4
.Rs
.%T XaQti XMAC II datasheet
.%O http://www.xaqti.com
.Re
.Rs
.%T SysKonnect GEnesis programming manual
.%O http://www.syskonnect.com
.Re
.Sh HISTORY
The
.Nm
device driver first appeared in
.Fx 3.0 .
.Sh AUTHOR
The
.Nm
driver was written by
.An Bill Paul Aq wpaul@ctr.columbia.edu .

View File

@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
# $Id: LINT,v 1.615 1999/07/03 21:31:00 jdp Exp $
# $Id: LINT,v 1.616 1999/07/06 19:22:40 des Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@ -1552,6 +1552,13 @@ options EISA_SLOTS=12
# the MPX 5030/5038, which is either a RealTek in disguise or a RealTek
# workalike.
#
# The 'sk' device provides support for the SysKonnect SK-984x series
# PCI gigabit ethernet NICs. This includes the SK-9841 and SK-9842
# single port cards (single mode and multimode fiber) and the
# SK-9843 and SK-9844 dual port cards (also single mode and multimode).
# The driver will autodetect the number of ports on the card and
# attach each one as a separate network interface.
#
# The 'ti' device provides support for PCI gigabit ethernet NICs based
# on the Alteon Networks Tigon 1 and Tigon 2 chipsets. This includes the
# Alteon AceNIC, the 3Com 3c985, the Netgear GA620 and various others.
@ -1695,6 +1702,7 @@ device fxp0
device mx0
device pn0
device rl0
device sk0
device ti0
device tl0
device tx0

View File

@ -605,6 +605,7 @@ pci/if_mx.c optional mx
pci/if_pn.c optional pn
pci/if_fpa.c optional fpa pci
pci/if_rl.c optional rl
pci/if_sk.c optional sk
pci/if_sr_p.c optional sr pci
pci/if_ti.c optional ti
pci/if_tl.c optional tl

1916
sys/dev/sk/if_sk.c Normal file

File diff suppressed because it is too large Load Diff

1172
sys/dev/sk/if_skreg.h Normal file

File diff suppressed because it is too large Load Diff

393
sys/dev/sk/xmaciireg.h Normal file
View File

@ -0,0 +1,393 @@
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. 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, 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. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Bill Paul.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
* 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.
*
* $Id: xmaciireg.h,v 1.10 1999/07/09 03:35:12 wpaul Exp $
*/
/*
* Registers and data structures for the XaQti Corporation XMAC II
* Gigabit Ethernet MAC. Datasheet is available from http://www.xaqti.com.
* The XMAC can be programmed for 16-bit or 32-bit register access modes.
* The SysKonnect gigabit ethernet adapters use 16-bit mode, so that's
* how the registers are laid out here.
*/
#define XM_DEVICEID 0x00E0AE20
#define XM_XAQTI_OUI 0x00E0AE
#define XM_XMAC_REV(x) (((x) & 0x000000E0) >> 5)
#define XM_XMAC_REV_B2 0x0
#define XM_XMAC_REV_C1 0x1
#define XM_MMUCMD 0x0000
#define XM_POFF 0x0008
#define XM_BURST 0x000C
#define XM_VLAN_TAGLEV1 0x0010
#define XM_VLAN_TAGLEV2 0x0014
#define XM_TXCMD 0x0020
#define XM_TX_RETRYLIMIT 0x0024
#define XM_TX_SLOTTIME 0x0028
#define XM_TX_IPG 0x003C
#define XM_RXCMD 0x0030
#define XM_PHY_ADDR 0x0034
#define XM_PHY_DATA 0x0038
#define XM_GPIO 0x0040
#define XM_IMR 0x0044
#define XM_ISR 0x0048
#define XM_HWCFG 0x004C
#define XM_TX_LOWAT 0x0060
#define XM_TX_HIWAT 0x0062
#define XM_TX_REQTHRESH_LO 0x0064
#define XM_TX_REQTHRESH_HI 0x0066
#define XM_TX_REQTHRESH XM_TX_REQTHRESH_LO
#define XM_PAUSEDST0 0x0068
#define XM_PAUSEDST1 0x006A
#define XM_PAUSEDST2 0x006C
#define XM_CTLPARM_LO 0x0070
#define XM_CTLPARM_HI 0x0072
#define XM_CTLPARM XM_CTLPARM_LO
#define XM_OPCODE_PAUSE_TIMER 0x0074
#define XM_TXSTAT_LIFO 0x0078
/*
* Perfect filter registers. The XMAC has a table of 16 perfect
* filter entries, spaced 8 bytes apart. This is in addition to
* the station address registers, which appear below.
*/
#define XM_RXFILT_BASE 0x0080
#define XM_RXFILT_END 0x0107
#define XM_RXFILT_MAX 16
#define XM_RXFILT_ENTRY(ent) (XM_RXFILT_BASE + ((ent * 8)))
/* Primary station address. */
#define XM_PAR0 0x0108
#define XM_PAR1 0x010A
#define XM_PAR2 0x010C
/* 64-bit multicast hash table registers */
#define XM_MAR0 0x0110
#define XM_MAR1 0x0112
#define XM_MAR2 0x0114
#define XM_MAR3 0x0116
#define XM_RX_LOWAT 0x0118
#define XM_RX_HIWAT 0x011A
#define XM_RX_REQTHRESH_LO 0x011C
#define XM_RX_REQTHRESH_HI 0x011E
#define XM_RX_REQTHRESH XM_RX_REQTHRESH_LO
#define XM_DEVID_LO 0x0120
#define XM_DEVID_HI 0x0122
#define XM_DEVID XM_DEVID_LO
#define XM_MODE_LO 0x0124
#define XM_MODE_HI 0x0126
#define XM_MODE XM_MODE_LO
#define XM_LASTSRC0 0x0128
#define XM_LASTSRC1 0x012A
#define XM_LASTSRC2 0x012C
#define XM_TSTAMP_READ 0x0130
#define XM_TSTAMP_LOAD 0x0134
#define XM_STATS_CMD 0x0200
#define XM_RXCNT_EVENT_LO 0x0204
#define XM_RXCNT_EVENT_HI 0x0206
#define XM_RXCNT_EVENT XM_RXCNT_EVENT_LO
#define XM_TXCNT_EVENT_LO 0x0208
#define XM_TXCNT_EVENT_HI 0x020A
#define XM_TXCNT_EVENT XM_TXCNT_EVENT_LO
#define XM_RXCNT_EVMASK_LO 0x020C
#define XM_RXCNT_EVMASK_HI 0x020E
#define XM_RXCNT_EVMASK XM_RXCNT_EVMASK_LO
#define XM_TXCNT_EVMASK_LO 0x0210
#define XM_TXCNT_EVMASK_HI 0x0212
#define XM_TXCNT_EVMASK XM_TXCNT_EVMASK_LO
/* Statistics command register */
#define XM_STATCMD_CLR_TX 0x0001
#define XM_STATCMD_CLR_RX 0x0002
#define XM_STATCMD_COPY_TX 0x0004
#define XM_STATCMD_COPY_RX 0x0008
#define XM_STATCMD_SNAP_TX 0x0010
#define XM_STATCMD_SNAP_RX 0x0020
/* TX statistics registers */
#define XM_TXSTATS_PKTSOK 0x280
#define XM_TXSTATS_BYTESOK_HI 0x284
#define XM_TXSTATS_BYTESOK_LO 0x288
#define XM_TXSTATS_BCASTSOK 0x28C
#define XM_TXSTATS_MCASTSOK 0x290
#define XM_TXSTATS_UCASTSOK 0x294
#define XM_TXSTATS_GIANTS 0x298
#define XM_TXSTATS_BURSTCNT 0x29C
#define XM_TXSTATS_PAUSEPKTS 0x2A0
#define XM_TXSTATS_MACCTLPKTS 0x2A4
#define XM_TXSTATS_SINGLECOLS 0x2A8
#define XM_TXSTATS_MULTICOLS 0x2AC
#define XM_TXSTATS_EXCESSCOLS 0x2B0
#define XM_TXSTATS_LATECOLS 0x2B4
#define XM_TXSTATS_DEFER 0x2B8
#define XM_TXSTATS_EXCESSDEFER 0x2BC
#define XM_TXSTATS_UNDERRUN 0x2C0
#define XM_TXSTATS_CARRIERSENSE 0x2C4
#define XM_TXSTATS_UTILIZATION 0x2C8
#define XM_TXSTATS_64 0x2D0
#define XM_TXSTATS_65_127 0x2D4
#define XM_TXSTATS_128_255 0x2D8
#define XM_TXSTATS_256_511 0x2DC
#define XM_TXSTATS_512_1023 0x2E0
#define XM_TXSTATS_1024_MAX 0x2E4
/* RX statistics registers */
#define XM_RXSTATS_PKTSOK 0x300
#define XM_RXSTATS_BYTESOK_HI 0x304
#define XM_RXSTATS_BYTESOK_LO 0x308
#define XM_RXSTATS_BCASTSOK 0x30C
#define XM_RXSTATS_MCASTSOK 0x310
#define XM_RXSTATS_UCASTSOK 0x314
#define XM_RXSTATS_PAUSEPKTS 0x318
#define XM_RXSTATS_MACCTLPKTS 0x31C
#define XM_RXSTATS_BADPAUSEPKTS 0x320
#define XM_RXSTATS_BADMACCTLPKTS 0x324
#define XM_RXSTATS_BURSTCNT 0x328
#define XM_RXSTATS_MISSEDPKTS 0x32C
#define XM_RXSTATS_FRAMEERRS 0x330
#define XM_RXSTATS_OVERRUN 0x334
#define XM_RXSTATS_JABBER 0x338
#define XM_RXSTATS_CARRLOSS 0x33C
#define XM_RXSTATS_INRNGLENERR 0x340
#define XM_RXSTATS_SYMERR 0x344
#define XM_RXSTATS_SHORTEVENT 0x348
#define XM_RXSTATS_RUNTS 0x34C
#define XM_RXSTATS_GIANTS 0x350
#define XM_RXSTATS_CRCERRS 0x354
#define XM_RXSTATS_CEXTERRS 0x35C
#define XM_RXSTATS_UTILIZATION 0x360
#define XM_RXSTATS_64 0x368
#define XM_RXSTATS_65_127 0x36C
#define XM_RXSTATS_128_255 0x370
#define XM_RXSTATS_256_511 0x374
#define XM_RXSTATS_512_1023 0x378
#define XM_RXSTATS_1024_MAX 0x37C
#define XM_MMUCMD_TX_ENB 0x0001
#define XM_MMUCMD_RX_ENB 0x0002
#define XM_MMUCMD_GMIILOOP 0x0004
#define XM_MMUCMD_RATECTL 0x0008
#define XM_MMUCMD_GMIIFDX 0x0010
#define XM_MMUCMD_NO_MGMT_PRMB 0x0020
#define XM_MMUCMD_SIMCOL 0x0040
#define XM_MMUCMD_FORCETX 0x0080
#define XM_MMUCMD_LOOPENB 0x0200
#define XM_MMUCMD_IGNPAUSE 0x0400
#define XM_MMUCMD_PHYBUSY 0x0800
#define XM_MMUCMD_PHYDATARDY 0x1000
#define XM_TXCMD_AUTOPAD 0x0001
#define XM_TXCMD_NOCRC 0x0002
#define XM_TXCMD_NOPREAMBLE 0x0004
#define XM_TXCMD_NOGIGAMODE 0x0008
#define XM_TXCMD_SAMPLELINE 0x0010
#define XM_TXCMD_ENCBYPASS 0x0020
#define XM_TXCMD_XMITBK2BK 0x0040
#define XM_TXCMD_FAIRSHARE 0x0080
#define XM_RXCMD_DISABLE_CEXT 0x0001
#define XM_RXCMD_STRIPPAD 0x0002
#define XM_RXCMD_SAMPLELINE 0x0004
#define XM_RXCMD_SELFRX 0x0008
#define XM_RXCMD_STRIPFCS 0x0010
#define XM_RXCMD_TRANSPARENT 0x0020
#define XM_RXCMD_IPGCAPTURE 0x0040
#define XM_RXCMD_BIGPKTOK 0x0080
#define XM_RXCMD_LENERROK 0x0100
#define XM_IMR_RX_EOF 0x0001
#define XM_IMR_TX_EOF 0x0002
#define XM_IMR_TX_UNDERRUN 0x0004
#define XM_IMR_RX_OVERRUN 0x0008
#define XM_IMR_TX_STATS_OFLOW 0x0010
#define XM_IMR_RX_STATS_OFLOW 0x0020
#define XM_IMR_TSTAMP_OFLOW 0x0040
#define XM_IMR_AUTONEG_DONE 0x0080
#define XM_IMR_NEXTPAGE_RDY 0x0100
#define XM_IMR_PAGE_RECEIVED 0x0200
#define XM_IMR_LP_REQCFG 0x0400
#define XM_IMR_GP0_SET 0x0800
#define XM_IMR_FORCEINTR 0x1000
#define XM_IMR_TX_ABORT 0x2000
#define XM_IMR_LINKEVENT 0x4000
#define XM_INTRS \
(~(XM_IMR_LINKEVENT|XM_IMR_AUTONEG_DONE|XM_IMR_TX_UNDERRUN))
#define XM_ISR_RX_EOF 0x0001
#define XM_ISR_TX_EOF 0x0002
#define XM_ISR_TX_UNDERRUN 0x0004
#define XM_ISR_RX_OVERRUN 0x0008
#define XM_ISR_TX_STATS_OFLOW 0x0010
#define XM_ISR_RX_STATS_OFLOW 0x0020
#define XM_ISR_TSTAMP_OFLOW 0x0040
#define XM_ISR_AUTONEG_DONE 0x0080
#define XM_ISR_NEXTPAGE_RDY 0x0100
#define XM_ISR_PAGE_RECEIVED 0x0200
#define XM_ISR_LP_REQCFG 0x0400
#define XM_ISR_GP0_SET 0x0800
#define XM_ISR_FORCEINTR 0x1000
#define XM_ISR_TX_ABORT 0x2000
#define XM_ISR_LINKEVENT 0x4000
#define XM_MODE_FLUSH_RXFIFO 0x00000001
#define XM_MODE_FLUSH_TXFIFO 0x00000002
#define XM_MODE_BIGENDIAN 0x00000004
#define XM_MODE_RX_PROMISC 0x00000008
#define XM_MODE_RX_NOBROAD 0x00000010
#define XM_MODE_RX_NOMULTI 0x00000020
#define XM_MODE_RX_NOUNI 0x00000040
#define XM_MODE_RX_BADFRAMES 0x00000080
#define XM_MODE_RX_CRCERRS 0x00000100
#define XM_MODE_RX_GIANTS 0x00000200
#define XM_MODE_RX_INRANGELEN 0x00000400
#define XM_MODE_RX_RUNTS 0x00000800
#define XM_MODE_RX_MACCTL 0x00001000
#define XM_MODE_RX_USE_PERFECT 0x00002000
#define XM_MODE_RX_USE_STATION 0x00004000
#define XM_MODE_RX_USE_HASH 0x00008000
#define XM_MODE_RX_ADDRPAIR 0x00010000
#define XM_MODE_PAUSEONHI 0x00020000
#define XM_MODE_PAUSEONLO 0x00040000
#define XM_MODE_TIMESTAMP 0x00080000
#define XM_MODE_SENDPAUSE 0x00100000
#define XM_MODE_SENDCONTINUOUS 0x00200000
#define XM_MODE_LE_STATUSWORD 0x00400000
#define XM_MODE_AUTOFIFOPAUSE 0x00800000
#define XM_MODE_EXPAUSEGEN 0x02000000
#define XM_MODE_RX_INVERSE 0x04000000
#define XM_RXSTAT_MACCTL 0x00000001
#define XM_RXSTAT_ERRFRAME 0x00000002
#define XM_RXSTAT_CRCERR 0x00000004
#define XM_RXSTAT_GIANT 0x00000008
#define XM_RXSTAT_RUNT 0x00000010
#define XM_RXSTAT_FRAMEERR 0x00000020
#define XM_RXSTAT_INRANGEERR 0x00000040
#define XM_RXSTAT_CARRIERERR 0x00000080
#define XM_RXSTAT_COLLERR 0x00000100
#define XM_RXSTAT_802_3 0x00000200
#define XM_RXSTAT_CARREXTERR 0x00000400
#define XM_RXSTAT_BURSTMODE 0x00000800
#define XM_RXSTAT_UNICAST 0x00002000
#define XM_RXSTAT_MULTICAST 0x00004000
#define XM_RXSTAT_BROADCAST 0x00008000
#define XM_RXSTAT_VLAN_LEV1 0x00010000
#define XM_RXSTAT_VLAN_LEV2 0x00020000
#define XM_RXSTAT_LEN 0xFFFC0000
/*
* XMAC PHY registers, indirectly accessed through
* XM_PHY_ADDR and XM_PHY_REG.
*/
#define XM_PHY_BMCR 0x0000 /* control */
#define XM_PHY_BMSR 0x0001 /* status */
#define XM_PHY_VENID 0x0002 /* vendor id */
#define XM_PHY_DEVID 0x0003 /* device id */
#define XM_PHY_ANAR 0x0004 /* autoneg advertisenemt */
#define XM_PHY_LPAR 0x0005 /* link partner ability */
#define XM_PHY_ANEXP 0x0006 /* autoneg expansion */
#define XM_PHY_NEXTP 0x0007 /* nextpage */
#define XM_PHY_LPNEXTP 0x0008 /* link partner's nextpage */
#define XM_PHY_EXTSTS 0x000F /* extented status */
#define XM_PHY_RESAB 0x0010 /* resolved ability */
#define XM_BMCR_DUPLEX 0x0100
#define XM_BMCR_RENEGOTIATE 0x0200
#define XM_BMCR_AUTONEGENBL 0x1000
#define XM_BMCR_LOOPBACK 0x4000
#define XM_BMCR_RESET 0x8000
#define XM_BMSR_EXTCAP 0x0001
#define XM_BMSR_LINKSTAT 0x0004
#define XM_BMSR_AUTONEGABLE 0x0008
#define XM_BMSR_REMFAULT 0x0010
#define XM_BMSR_AUTONEGDONE 0x0020
#define XM_BMSR_EXTSTAT 0x0100
#define XM_VENID_XAQTI 0xD14C
#define XM_DEVID_XMAC 0x0002
#define XM_ANAR_FULLDUPLEX 0x0020
#define XM_ANAR_HALFDUPLEX 0x0040
#define XM_ANAR_PAUSEBITS 0x0180
#define XM_ANAR_REMFAULTBITS 0x1800
#define XM_ANAR_ACK 0x4000
#define XM_ANAR_NEXTPAGE 0x8000
#define XM_LPAR_FULLDUPLEX 0x0020
#define XM_LPAR_HALFDUPLEX 0x0040
#define XM_LPAR_PAUSEBITS 0x0180
#define XM_LPAR_REMFAULTBITS 0x1800
#define XM_LPAR_ACK 0x4000
#define XM_LPAR_NEXTPAGE 0x8000
#define XM_PAUSE_NOPAUSE 0x0000
#define XM_PAUSE_SYMPAUSE 0x0080
#define XM_PAUSE_ASYMPAUSE 0x0100
#define XM_PAUSE_BOTH 0x0180
#define XM_REMFAULT_LINKOK 0x0000
#define XM_REMFAULT_LINKFAIL 0x0800
#define XM_REMFAULT_OFFLINE 0x1000
#define XM_REMFAULT_ANEGERR 0x1800
#define XM_ANEXP_GOTPAGE 0x0002
#define XM_ANEXP_NEXTPAGE_SELF 0x0004
#define XM_ANEXP_NEXTPAGE_LP 0x0008
#define XM_NEXTP_MESSAGE 0x07FF
#define XM_NEXTP_TOGGLE 0x0800
#define XM_NEXTP_ACK2 0x1000
#define XM_NEXTP_MPAGE 0x2000
#define XM_NEXTP_ACK1 0x4000
#define XM_NEXTP_NPAGE 0x8000
#define XM_LPNEXTP_MESSAGE 0x07FF
#define XM_LPNEXTP_TOGGLE 0x0800
#define XM_LPNEXTP_ACK2 0x1000
#define XM_LPNEXTP_MPAGE 0x2000
#define XM_LPNEXTP_ACK1 0x4000
#define XM_LPNEXTP_NPAGE 0x8000
#define XM_EXTSTS_HALFDUPLEX 0x4000
#define XM_EXTSTS_FULLDUPLEX 0x8000
#define XM_RESAB_PAUSEMISMATCH 0x0008
#define XM_RESAB_ABLMISMATCH 0x0010
#define XM_RESAB_FDMODESEL 0x0020
#define XM_RESAB_HDMODESEL 0x0040
#define XM_RESAB_PAUSEBITS 0x0180

View File

@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
# $Id: LINT,v 1.615 1999/07/03 21:31:00 jdp Exp $
# $Id: LINT,v 1.616 1999/07/06 19:22:40 des Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@ -1552,6 +1552,13 @@ options EISA_SLOTS=12
# the MPX 5030/5038, which is either a RealTek in disguise or a RealTek
# workalike.
#
# The 'sk' device provides support for the SysKonnect SK-984x series
# PCI gigabit ethernet NICs. This includes the SK-9841 and SK-9842
# single port cards (single mode and multimode fiber) and the
# SK-9843 and SK-9844 dual port cards (also single mode and multimode).
# The driver will autodetect the number of ports on the card and
# attach each one as a separate network interface.
#
# The 'ti' device provides support for PCI gigabit ethernet NICs based
# on the Alteon Networks Tigon 1 and Tigon 2 chipsets. This includes the
# Alteon AceNIC, the 3Com 3c985, the Netgear GA620 and various others.
@ -1695,6 +1702,7 @@ device fxp0
device mx0
device pn0
device rl0
device sk0
device ti0
device tl0
device tx0

View File

@ -2,7 +2,7 @@
# LINT -- config file for checking all the sources, tries to pull in
# as much of the source tree as it can.
#
# $Id: LINT,v 1.615 1999/07/03 21:31:00 jdp Exp $
# $Id: LINT,v 1.616 1999/07/06 19:22:40 des Exp $
#
# NB: You probably don't want to try running a kernel built from this
# file. Instead, you should start from GENERIC, and add options from
@ -1552,6 +1552,13 @@ options EISA_SLOTS=12
# the MPX 5030/5038, which is either a RealTek in disguise or a RealTek
# workalike.
#
# The 'sk' device provides support for the SysKonnect SK-984x series
# PCI gigabit ethernet NICs. This includes the SK-9841 and SK-9842
# single port cards (single mode and multimode fiber) and the
# SK-9843 and SK-9844 dual port cards (also single mode and multimode).
# The driver will autodetect the number of ports on the card and
# attach each one as a separate network interface.
#
# The 'ti' device provides support for PCI gigabit ethernet NICs based
# on the Alteon Networks Tigon 1 and Tigon 2 chipsets. This includes the
# Alteon AceNIC, the 3Com 3c985, the Netgear GA620 and various others.
@ -1695,6 +1702,7 @@ device fxp0
device mx0
device pn0
device rl0
device sk0
device ti0
device tl0
device tx0

View File

@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** $Id: userconfig.c,v 1.146 1999/06/28 12:07:36 peter Exp $
** $Id: userconfig.c,v 1.147 1999/06/29 17:37:44 yokota Exp $
**/
/**
@ -387,6 +387,7 @@ static DEV_INFO device_info[] = {
{"ix", "Intel EtherExpress Ethernet adapter", 0, CLS_NETWORK},
{"le", "DEC Etherworks 2 and 3 Ethernet adapters", 0, CLS_NETWORK},
{"lnc", "Isolan, Novell NE2100/NE32-VL Ethernet adapters", 0,CLS_NETWORK},
{"sk", "SysKonnect SK-984x gigabit Ethernet adapters", 0,CLS_NETWORK},
{"ti", "Alteon Networks Tigon gigabit Ethernet adapters", 0,CLS_NETWORK},
{"tl", "Texas Instruments ThunderLAN Ethernet adapters", 0,CLS_NETWORK},
{"tx", "SMC 9432TX Ethernet adapters", 0, CLS_NETWORK},
@ -2542,7 +2543,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: userconfig.c,v 1.146 1999/06/28 12:07:36 peter Exp $
* $Id: userconfig.c,v 1.147 1999/06/29 17:37:44 yokota Exp $
*/
#include "scbus.h"

1916
sys/pci/if_sk.c Normal file

File diff suppressed because it is too large Load Diff

1172
sys/pci/if_skreg.h Normal file

File diff suppressed because it is too large Load Diff

393
sys/pci/xmaciireg.h Normal file
View File

@ -0,0 +1,393 @@
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. 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, 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. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Bill Paul.
* 4. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
* 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.
*
* $Id: xmaciireg.h,v 1.10 1999/07/09 03:35:12 wpaul Exp $
*/
/*
* Registers and data structures for the XaQti Corporation XMAC II
* Gigabit Ethernet MAC. Datasheet is available from http://www.xaqti.com.
* The XMAC can be programmed for 16-bit or 32-bit register access modes.
* The SysKonnect gigabit ethernet adapters use 16-bit mode, so that's
* how the registers are laid out here.
*/
#define XM_DEVICEID 0x00E0AE20
#define XM_XAQTI_OUI 0x00E0AE
#define XM_XMAC_REV(x) (((x) & 0x000000E0) >> 5)
#define XM_XMAC_REV_B2 0x0
#define XM_XMAC_REV_C1 0x1
#define XM_MMUCMD 0x0000
#define XM_POFF 0x0008
#define XM_BURST 0x000C
#define XM_VLAN_TAGLEV1 0x0010
#define XM_VLAN_TAGLEV2 0x0014
#define XM_TXCMD 0x0020
#define XM_TX_RETRYLIMIT 0x0024
#define XM_TX_SLOTTIME 0x0028
#define XM_TX_IPG 0x003C
#define XM_RXCMD 0x0030
#define XM_PHY_ADDR 0x0034
#define XM_PHY_DATA 0x0038
#define XM_GPIO 0x0040
#define XM_IMR 0x0044
#define XM_ISR 0x0048
#define XM_HWCFG 0x004C
#define XM_TX_LOWAT 0x0060
#define XM_TX_HIWAT 0x0062
#define XM_TX_REQTHRESH_LO 0x0064
#define XM_TX_REQTHRESH_HI 0x0066
#define XM_TX_REQTHRESH XM_TX_REQTHRESH_LO
#define XM_PAUSEDST0 0x0068
#define XM_PAUSEDST1 0x006A
#define XM_PAUSEDST2 0x006C
#define XM_CTLPARM_LO 0x0070
#define XM_CTLPARM_HI 0x0072
#define XM_CTLPARM XM_CTLPARM_LO
#define XM_OPCODE_PAUSE_TIMER 0x0074
#define XM_TXSTAT_LIFO 0x0078
/*
* Perfect filter registers. The XMAC has a table of 16 perfect
* filter entries, spaced 8 bytes apart. This is in addition to
* the station address registers, which appear below.
*/
#define XM_RXFILT_BASE 0x0080
#define XM_RXFILT_END 0x0107
#define XM_RXFILT_MAX 16
#define XM_RXFILT_ENTRY(ent) (XM_RXFILT_BASE + ((ent * 8)))
/* Primary station address. */
#define XM_PAR0 0x0108
#define XM_PAR1 0x010A
#define XM_PAR2 0x010C
/* 64-bit multicast hash table registers */
#define XM_MAR0 0x0110
#define XM_MAR1 0x0112
#define XM_MAR2 0x0114
#define XM_MAR3 0x0116
#define XM_RX_LOWAT 0x0118
#define XM_RX_HIWAT 0x011A
#define XM_RX_REQTHRESH_LO 0x011C
#define XM_RX_REQTHRESH_HI 0x011E
#define XM_RX_REQTHRESH XM_RX_REQTHRESH_LO
#define XM_DEVID_LO 0x0120
#define XM_DEVID_HI 0x0122
#define XM_DEVID XM_DEVID_LO
#define XM_MODE_LO 0x0124
#define XM_MODE_HI 0x0126
#define XM_MODE XM_MODE_LO
#define XM_LASTSRC0 0x0128
#define XM_LASTSRC1 0x012A
#define XM_LASTSRC2 0x012C
#define XM_TSTAMP_READ 0x0130
#define XM_TSTAMP_LOAD 0x0134
#define XM_STATS_CMD 0x0200
#define XM_RXCNT_EVENT_LO 0x0204
#define XM_RXCNT_EVENT_HI 0x0206
#define XM_RXCNT_EVENT XM_RXCNT_EVENT_LO
#define XM_TXCNT_EVENT_LO 0x0208
#define XM_TXCNT_EVENT_HI 0x020A
#define XM_TXCNT_EVENT XM_TXCNT_EVENT_LO
#define XM_RXCNT_EVMASK_LO 0x020C
#define XM_RXCNT_EVMASK_HI 0x020E
#define XM_RXCNT_EVMASK XM_RXCNT_EVMASK_LO
#define XM_TXCNT_EVMASK_LO 0x0210
#define XM_TXCNT_EVMASK_HI 0x0212
#define XM_TXCNT_EVMASK XM_TXCNT_EVMASK_LO
/* Statistics command register */
#define XM_STATCMD_CLR_TX 0x0001
#define XM_STATCMD_CLR_RX 0x0002
#define XM_STATCMD_COPY_TX 0x0004
#define XM_STATCMD_COPY_RX 0x0008
#define XM_STATCMD_SNAP_TX 0x0010
#define XM_STATCMD_SNAP_RX 0x0020
/* TX statistics registers */
#define XM_TXSTATS_PKTSOK 0x280
#define XM_TXSTATS_BYTESOK_HI 0x284
#define XM_TXSTATS_BYTESOK_LO 0x288
#define XM_TXSTATS_BCASTSOK 0x28C
#define XM_TXSTATS_MCASTSOK 0x290
#define XM_TXSTATS_UCASTSOK 0x294
#define XM_TXSTATS_GIANTS 0x298
#define XM_TXSTATS_BURSTCNT 0x29C
#define XM_TXSTATS_PAUSEPKTS 0x2A0
#define XM_TXSTATS_MACCTLPKTS 0x2A4
#define XM_TXSTATS_SINGLECOLS 0x2A8
#define XM_TXSTATS_MULTICOLS 0x2AC
#define XM_TXSTATS_EXCESSCOLS 0x2B0
#define XM_TXSTATS_LATECOLS 0x2B4
#define XM_TXSTATS_DEFER 0x2B8
#define XM_TXSTATS_EXCESSDEFER 0x2BC
#define XM_TXSTATS_UNDERRUN 0x2C0
#define XM_TXSTATS_CARRIERSENSE 0x2C4
#define XM_TXSTATS_UTILIZATION 0x2C8
#define XM_TXSTATS_64 0x2D0
#define XM_TXSTATS_65_127 0x2D4
#define XM_TXSTATS_128_255 0x2D8
#define XM_TXSTATS_256_511 0x2DC
#define XM_TXSTATS_512_1023 0x2E0
#define XM_TXSTATS_1024_MAX 0x2E4
/* RX statistics registers */
#define XM_RXSTATS_PKTSOK 0x300
#define XM_RXSTATS_BYTESOK_HI 0x304
#define XM_RXSTATS_BYTESOK_LO 0x308
#define XM_RXSTATS_BCASTSOK 0x30C
#define XM_RXSTATS_MCASTSOK 0x310
#define XM_RXSTATS_UCASTSOK 0x314
#define XM_RXSTATS_PAUSEPKTS 0x318
#define XM_RXSTATS_MACCTLPKTS 0x31C
#define XM_RXSTATS_BADPAUSEPKTS 0x320
#define XM_RXSTATS_BADMACCTLPKTS 0x324
#define XM_RXSTATS_BURSTCNT 0x328
#define XM_RXSTATS_MISSEDPKTS 0x32C
#define XM_RXSTATS_FRAMEERRS 0x330
#define XM_RXSTATS_OVERRUN 0x334
#define XM_RXSTATS_JABBER 0x338
#define XM_RXSTATS_CARRLOSS 0x33C
#define XM_RXSTATS_INRNGLENERR 0x340
#define XM_RXSTATS_SYMERR 0x344
#define XM_RXSTATS_SHORTEVENT 0x348
#define XM_RXSTATS_RUNTS 0x34C
#define XM_RXSTATS_GIANTS 0x350
#define XM_RXSTATS_CRCERRS 0x354
#define XM_RXSTATS_CEXTERRS 0x35C
#define XM_RXSTATS_UTILIZATION 0x360
#define XM_RXSTATS_64 0x368
#define XM_RXSTATS_65_127 0x36C
#define XM_RXSTATS_128_255 0x370
#define XM_RXSTATS_256_511 0x374
#define XM_RXSTATS_512_1023 0x378
#define XM_RXSTATS_1024_MAX 0x37C
#define XM_MMUCMD_TX_ENB 0x0001
#define XM_MMUCMD_RX_ENB 0x0002
#define XM_MMUCMD_GMIILOOP 0x0004
#define XM_MMUCMD_RATECTL 0x0008
#define XM_MMUCMD_GMIIFDX 0x0010
#define XM_MMUCMD_NO_MGMT_PRMB 0x0020
#define XM_MMUCMD_SIMCOL 0x0040
#define XM_MMUCMD_FORCETX 0x0080
#define XM_MMUCMD_LOOPENB 0x0200
#define XM_MMUCMD_IGNPAUSE 0x0400
#define XM_MMUCMD_PHYBUSY 0x0800
#define XM_MMUCMD_PHYDATARDY 0x1000
#define XM_TXCMD_AUTOPAD 0x0001
#define XM_TXCMD_NOCRC 0x0002
#define XM_TXCMD_NOPREAMBLE 0x0004
#define XM_TXCMD_NOGIGAMODE 0x0008
#define XM_TXCMD_SAMPLELINE 0x0010
#define XM_TXCMD_ENCBYPASS 0x0020
#define XM_TXCMD_XMITBK2BK 0x0040
#define XM_TXCMD_FAIRSHARE 0x0080
#define XM_RXCMD_DISABLE_CEXT 0x0001
#define XM_RXCMD_STRIPPAD 0x0002
#define XM_RXCMD_SAMPLELINE 0x0004
#define XM_RXCMD_SELFRX 0x0008
#define XM_RXCMD_STRIPFCS 0x0010
#define XM_RXCMD_TRANSPARENT 0x0020
#define XM_RXCMD_IPGCAPTURE 0x0040
#define XM_RXCMD_BIGPKTOK 0x0080
#define XM_RXCMD_LENERROK 0x0100
#define XM_IMR_RX_EOF 0x0001
#define XM_IMR_TX_EOF 0x0002
#define XM_IMR_TX_UNDERRUN 0x0004
#define XM_IMR_RX_OVERRUN 0x0008
#define XM_IMR_TX_STATS_OFLOW 0x0010
#define XM_IMR_RX_STATS_OFLOW 0x0020
#define XM_IMR_TSTAMP_OFLOW 0x0040
#define XM_IMR_AUTONEG_DONE 0x0080
#define XM_IMR_NEXTPAGE_RDY 0x0100
#define XM_IMR_PAGE_RECEIVED 0x0200
#define XM_IMR_LP_REQCFG 0x0400
#define XM_IMR_GP0_SET 0x0800
#define XM_IMR_FORCEINTR 0x1000
#define XM_IMR_TX_ABORT 0x2000
#define XM_IMR_LINKEVENT 0x4000
#define XM_INTRS \
(~(XM_IMR_LINKEVENT|XM_IMR_AUTONEG_DONE|XM_IMR_TX_UNDERRUN))
#define XM_ISR_RX_EOF 0x0001
#define XM_ISR_TX_EOF 0x0002
#define XM_ISR_TX_UNDERRUN 0x0004
#define XM_ISR_RX_OVERRUN 0x0008
#define XM_ISR_TX_STATS_OFLOW 0x0010
#define XM_ISR_RX_STATS_OFLOW 0x0020
#define XM_ISR_TSTAMP_OFLOW 0x0040
#define XM_ISR_AUTONEG_DONE 0x0080
#define XM_ISR_NEXTPAGE_RDY 0x0100
#define XM_ISR_PAGE_RECEIVED 0x0200
#define XM_ISR_LP_REQCFG 0x0400
#define XM_ISR_GP0_SET 0x0800
#define XM_ISR_FORCEINTR 0x1000
#define XM_ISR_TX_ABORT 0x2000
#define XM_ISR_LINKEVENT 0x4000
#define XM_MODE_FLUSH_RXFIFO 0x00000001
#define XM_MODE_FLUSH_TXFIFO 0x00000002
#define XM_MODE_BIGENDIAN 0x00000004
#define XM_MODE_RX_PROMISC 0x00000008
#define XM_MODE_RX_NOBROAD 0x00000010
#define XM_MODE_RX_NOMULTI 0x00000020
#define XM_MODE_RX_NOUNI 0x00000040
#define XM_MODE_RX_BADFRAMES 0x00000080
#define XM_MODE_RX_CRCERRS 0x00000100
#define XM_MODE_RX_GIANTS 0x00000200
#define XM_MODE_RX_INRANGELEN 0x00000400
#define XM_MODE_RX_RUNTS 0x00000800
#define XM_MODE_RX_MACCTL 0x00001000
#define XM_MODE_RX_USE_PERFECT 0x00002000
#define XM_MODE_RX_USE_STATION 0x00004000
#define XM_MODE_RX_USE_HASH 0x00008000
#define XM_MODE_RX_ADDRPAIR 0x00010000
#define XM_MODE_PAUSEONHI 0x00020000
#define XM_MODE_PAUSEONLO 0x00040000
#define XM_MODE_TIMESTAMP 0x00080000
#define XM_MODE_SENDPAUSE 0x00100000
#define XM_MODE_SENDCONTINUOUS 0x00200000
#define XM_MODE_LE_STATUSWORD 0x00400000
#define XM_MODE_AUTOFIFOPAUSE 0x00800000
#define XM_MODE_EXPAUSEGEN 0x02000000
#define XM_MODE_RX_INVERSE 0x04000000
#define XM_RXSTAT_MACCTL 0x00000001
#define XM_RXSTAT_ERRFRAME 0x00000002
#define XM_RXSTAT_CRCERR 0x00000004
#define XM_RXSTAT_GIANT 0x00000008
#define XM_RXSTAT_RUNT 0x00000010
#define XM_RXSTAT_FRAMEERR 0x00000020
#define XM_RXSTAT_INRANGEERR 0x00000040
#define XM_RXSTAT_CARRIERERR 0x00000080
#define XM_RXSTAT_COLLERR 0x00000100
#define XM_RXSTAT_802_3 0x00000200
#define XM_RXSTAT_CARREXTERR 0x00000400
#define XM_RXSTAT_BURSTMODE 0x00000800
#define XM_RXSTAT_UNICAST 0x00002000
#define XM_RXSTAT_MULTICAST 0x00004000
#define XM_RXSTAT_BROADCAST 0x00008000
#define XM_RXSTAT_VLAN_LEV1 0x00010000
#define XM_RXSTAT_VLAN_LEV2 0x00020000
#define XM_RXSTAT_LEN 0xFFFC0000
/*
* XMAC PHY registers, indirectly accessed through
* XM_PHY_ADDR and XM_PHY_REG.
*/
#define XM_PHY_BMCR 0x0000 /* control */
#define XM_PHY_BMSR 0x0001 /* status */
#define XM_PHY_VENID 0x0002 /* vendor id */
#define XM_PHY_DEVID 0x0003 /* device id */
#define XM_PHY_ANAR 0x0004 /* autoneg advertisenemt */
#define XM_PHY_LPAR 0x0005 /* link partner ability */
#define XM_PHY_ANEXP 0x0006 /* autoneg expansion */
#define XM_PHY_NEXTP 0x0007 /* nextpage */
#define XM_PHY_LPNEXTP 0x0008 /* link partner's nextpage */
#define XM_PHY_EXTSTS 0x000F /* extented status */
#define XM_PHY_RESAB 0x0010 /* resolved ability */
#define XM_BMCR_DUPLEX 0x0100
#define XM_BMCR_RENEGOTIATE 0x0200
#define XM_BMCR_AUTONEGENBL 0x1000
#define XM_BMCR_LOOPBACK 0x4000
#define XM_BMCR_RESET 0x8000
#define XM_BMSR_EXTCAP 0x0001
#define XM_BMSR_LINKSTAT 0x0004
#define XM_BMSR_AUTONEGABLE 0x0008
#define XM_BMSR_REMFAULT 0x0010
#define XM_BMSR_AUTONEGDONE 0x0020
#define XM_BMSR_EXTSTAT 0x0100
#define XM_VENID_XAQTI 0xD14C
#define XM_DEVID_XMAC 0x0002
#define XM_ANAR_FULLDUPLEX 0x0020
#define XM_ANAR_HALFDUPLEX 0x0040
#define XM_ANAR_PAUSEBITS 0x0180
#define XM_ANAR_REMFAULTBITS 0x1800
#define XM_ANAR_ACK 0x4000
#define XM_ANAR_NEXTPAGE 0x8000
#define XM_LPAR_FULLDUPLEX 0x0020
#define XM_LPAR_HALFDUPLEX 0x0040
#define XM_LPAR_PAUSEBITS 0x0180
#define XM_LPAR_REMFAULTBITS 0x1800
#define XM_LPAR_ACK 0x4000
#define XM_LPAR_NEXTPAGE 0x8000
#define XM_PAUSE_NOPAUSE 0x0000
#define XM_PAUSE_SYMPAUSE 0x0080
#define XM_PAUSE_ASYMPAUSE 0x0100
#define XM_PAUSE_BOTH 0x0180
#define XM_REMFAULT_LINKOK 0x0000
#define XM_REMFAULT_LINKFAIL 0x0800
#define XM_REMFAULT_OFFLINE 0x1000
#define XM_REMFAULT_ANEGERR 0x1800
#define XM_ANEXP_GOTPAGE 0x0002
#define XM_ANEXP_NEXTPAGE_SELF 0x0004
#define XM_ANEXP_NEXTPAGE_LP 0x0008
#define XM_NEXTP_MESSAGE 0x07FF
#define XM_NEXTP_TOGGLE 0x0800
#define XM_NEXTP_ACK2 0x1000
#define XM_NEXTP_MPAGE 0x2000
#define XM_NEXTP_ACK1 0x4000
#define XM_NEXTP_NPAGE 0x8000
#define XM_LPNEXTP_MESSAGE 0x07FF
#define XM_LPNEXTP_TOGGLE 0x0800
#define XM_LPNEXTP_ACK2 0x1000
#define XM_LPNEXTP_MPAGE 0x2000
#define XM_LPNEXTP_ACK1 0x4000
#define XM_LPNEXTP_NPAGE 0x8000
#define XM_EXTSTS_HALFDUPLEX 0x4000
#define XM_EXTSTS_FULLDUPLEX 0x8000
#define XM_RESAB_PAUSEMISMATCH 0x0008
#define XM_RESAB_ABLMISMATCH 0x0010
#define XM_RESAB_FDMODESEL 0x0020
#define XM_RESAB_HDMODESEL 0x0040
#define XM_RESAB_PAUSEBITS 0x0180

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.94 1999/07/03 05:41:21 mharo Exp $
* $Id: devices.c,v 1.95 1999/07/06 20:40:22 phk Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -100,6 +100,7 @@ static struct _devname {
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
{ DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" },
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
{ DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" },

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.94 1999/07/03 05:41:21 mharo Exp $
* $Id: devices.c,v 1.95 1999/07/06 20:40:22 phk Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -100,6 +100,7 @@ static struct _devname {
{ DEVICE_TYPE_NETWORK, "mx", "Macronix 98713/98715/98725 PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "pn", "Lite-On 82168/82169 PNIC PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
{ DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" },
{ DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" },
{ DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" },
{ DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" },