1.\" Copyright (c) Berkeley Software Design, Inc.
2.\" Copyright (c) 1997, 1998, 1999, 2000
3.\" Bill Paul <wpaul@osd.bsdi.com>. All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\" 3. All advertising materials mentioning features or use of this software
14.\" must display the following acknowledgement:
15.\" This product includes software developed by Bill Paul.
16.\" 4. Neither the name of the author nor the names of any co-contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
24.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30.\" THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\" $FreeBSD: head/share/man/man4/pcn.4 148145 2005-07-19 00:26:30Z trhodes $
33.\"
34.Dd July 16, 2005
35.Dt PCN 4
36.Os
37.Sh NAME
38.Nm pcn
39.Nd "AMD PCnet/PCI Fast Ethernet device driver"
40.Sh SYNOPSIS
41To compile support for the
42.Nm
43driver into your kernel, place the following lines in your kernel configuration file:
44.Bd -ragged -offset indent
45.Cd "device miibus"
46.Cd "device pcn"
47.Ed
48.Pp
49Alternatively, to load the
50.Nm
51driver at boot time, place the following line in
52.Xr loader.conf 5 :
53.Bd -literal -offset indent
54if_pcn_load="YES"
55.Ed
56.Sh DESCRIPTION
57The
58.Nm
59driver provides support for PCI Ethernet adapters and embedded
60controllers based on the AMD PCnet/FAST, PCnet/FAST+, PCnet/FAST III,
61PCnet/PRO and PCnet/Home Ethernet controller chips.
62Supported NIC's include the Allied Telesyn AT-2700 familly.
63.Pp
64The PCnet/PCI chips include a 100Mbps Ethernet MAC and support
65both a serial and MII-compliant transceiver interface.
66They use a bus master DMA and a scatter/gather descriptor scheme.
67The AMD chips provide a mechanism for zero-copy receive,
68providing good performance in server environments.
69Receive address filtering is provided using a single perfect filter entry
70for the station address and a 64-bit multicast hash table.
71.Pp
72The
73.Nm
74driver supports the following media types:
75.Pp
76.Bl -tag -width 10baseTXUTP
77.It autoselect
78Enable autoselection of the media type and options.
79The user can manually override
80the autoselected mode by adding media options to
81.Xr rc.conf 5 .
82.It 10baseT/UTP
83Set 10Mbps operation.
84The
85.Xr ifconfig 8
86.Cm mediaopt
87option can also be used to select either
88.Sq full-duplex
89or
90.Sq half-duplex
91modes.
92.It 100baseTX
93Set 100Mbps (Fast Ethernet) operation.
94The
95.Xr ifconfig 8
96.Cm mediaopt
97option can also be used to select either
98.Sq full-duplex
99or
100.Sq half-duplex
101modes.
102.El
103.Pp
104The
105.Nm
106driver supports the following media options:
107.Pp
108.Bl -tag -width full-duplex
109.It full-duplex
110Force full duplex operation
111.It half-duplex
112Force half duplex operation.
113.El
114.Pp
115For more information on configuring this device, see
116.Xr ifconfig 8 .
117.Sh HARDWARE
118The
119.Nm
120driver supports adapters and embedded controllers based on the AMD PCnet/FAST,
121PCnet/FAST+, PCnet/FAST III, PCnet/PRO and PCnet/Home Fast Ethernet chips:
122.Pp
123.Bl -bullet -compact
124.It
125AMD Am53C974/Am79C970/Am79C974 PCnet-PCI
126.It
127AMD Am79C970A PCnet-PCI II
128.It
129AMD Am79C971 PCnet-FAST
130.It
131AMD Am79C972 PCnet-FAST+
132.It
133AMD Am79C973/Am79C975 PCnet-FAST III
134.It
135AMD Am79C976 PCnet-PRO
136.It
137AMD PCnet/Home HomePNA
138.It
139Allied-Telesis LA-PCI
140.It
141Contec C-NET(98)S (PC-98)
142.It
143NEC SV-98/2-B05, B06
144.El
145.Sh DIAGNOSTICS
146.Bl -diag
147.It "pcn%d: couldn't map ports/memory"
148A fatal initialization error has occurred.
149.It "pcn%d: couldn't map interrupt"
150A fatal initialization error has occurred.
151.It "pcn%d: watchdog timeout"
152The device has stopped responding to the network, or there is a problem with
153the network connection (e.g.\& a cable fault).
154.It "pcn%d: no memory for rx list"
155The driver failed to allocate an mbuf for the receiver ring.
156.It "pcn%d: no memory for tx list"
157The driver failed to allocate an mbuf for the transmitter ring when
158allocating a pad buffer or collapsing an mbuf chain into a cluster.
159.It "pcn%d: chip is in D3 power state -- setting to D0"
160This message applies only to adapters which support power
161management.
162Some operating systems place the controller in low power
163mode when shutting down, and some PCI BIOSes fail to bring the chip
164out of this state before configuring it.
165The controller loses all of
166its PCI configuration in the D3 state, so if the BIOS does not set
167it back to full power mode in time, it will not be able to configure it
168correctly.
169The driver tries to detect this condition and bring
170the adapter back to the D0 (full power) state, but this may not be
171enough to return the driver to a fully operational condition.
172If
173you see this message at boot time and the driver fails to attach
174the device as a network interface, you will have to perform a
175warm boot to have the device properly configured.
176.Pp
177Note that this condition only occurs when warm booting from another
178operating system.
179If you power down your system prior to booting
180.Fx ,
181the card should be configured correctly.
182.El
183.Sh SEE ALSO
184.Xr arp 4 ,
185.Xr miibus 4 ,
186.Xr netintro 4 ,
187.Xr ng_ether 4 ,
188.Xr ifconfig 8
189.Rs
190.%T AMD PCnet/FAST, PCnet/FAST+ and PCnet/Home datasheets
191.%O http://www.amd.com
192.Re
193.Sh HISTORY
194The
195.Nm
196device driver first appeared in
197.Fx 4.3 .
198.Sh AUTHORS
199The
200.Nm
201driver was written by
202.An Bill Paul Aq wpaul@osd.bsdi.com .
2.\" Copyright (c) 1997, 1998, 1999, 2000
3.\" Bill Paul <wpaul@osd.bsdi.com>. All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\" 3. All advertising materials mentioning features or use of this software
14.\" must display the following acknowledgement:
15.\" This product includes software developed by Bill Paul.
16.\" 4. Neither the name of the author nor the names of any co-contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
24.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30.\" THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\" $FreeBSD: head/share/man/man4/pcn.4 148145 2005-07-19 00:26:30Z trhodes $
33.\"
34.Dd July 16, 2005
35.Dt PCN 4
36.Os
37.Sh NAME
38.Nm pcn
39.Nd "AMD PCnet/PCI Fast Ethernet device driver"
40.Sh SYNOPSIS
41To compile support for the
42.Nm
43driver into your kernel, place the following lines in your kernel configuration file:
44.Bd -ragged -offset indent
45.Cd "device miibus"
46.Cd "device pcn"
47.Ed
48.Pp
49Alternatively, to load the
50.Nm
51driver at boot time, place the following line in
52.Xr loader.conf 5 :
53.Bd -literal -offset indent
54if_pcn_load="YES"
55.Ed
56.Sh DESCRIPTION
57The
58.Nm
59driver provides support for PCI Ethernet adapters and embedded
60controllers based on the AMD PCnet/FAST, PCnet/FAST+, PCnet/FAST III,
61PCnet/PRO and PCnet/Home Ethernet controller chips.
62Supported NIC's include the Allied Telesyn AT-2700 familly.
63.Pp
64The PCnet/PCI chips include a 100Mbps Ethernet MAC and support
65both a serial and MII-compliant transceiver interface.
66They use a bus master DMA and a scatter/gather descriptor scheme.
67The AMD chips provide a mechanism for zero-copy receive,
68providing good performance in server environments.
69Receive address filtering is provided using a single perfect filter entry
70for the station address and a 64-bit multicast hash table.
71.Pp
72The
73.Nm
74driver supports the following media types:
75.Pp
76.Bl -tag -width 10baseTXUTP
77.It autoselect
78Enable autoselection of the media type and options.
79The user can manually override
80the autoselected mode by adding media options to
81.Xr rc.conf 5 .
82.It 10baseT/UTP
83Set 10Mbps operation.
84The
85.Xr ifconfig 8
86.Cm mediaopt
87option can also be used to select either
88.Sq full-duplex
89or
90.Sq half-duplex
91modes.
92.It 100baseTX
93Set 100Mbps (Fast Ethernet) operation.
94The
95.Xr ifconfig 8
96.Cm mediaopt
97option can also be used to select either
98.Sq full-duplex
99or
100.Sq half-duplex
101modes.
102.El
103.Pp
104The
105.Nm
106driver supports the following media options:
107.Pp
108.Bl -tag -width full-duplex
109.It full-duplex
110Force full duplex operation
111.It half-duplex
112Force half duplex operation.
113.El
114.Pp
115For more information on configuring this device, see
116.Xr ifconfig 8 .
117.Sh HARDWARE
118The
119.Nm
120driver supports adapters and embedded controllers based on the AMD PCnet/FAST,
121PCnet/FAST+, PCnet/FAST III, PCnet/PRO and PCnet/Home Fast Ethernet chips:
122.Pp
123.Bl -bullet -compact
124.It
125AMD Am53C974/Am79C970/Am79C974 PCnet-PCI
126.It
127AMD Am79C970A PCnet-PCI II
128.It
129AMD Am79C971 PCnet-FAST
130.It
131AMD Am79C972 PCnet-FAST+
132.It
133AMD Am79C973/Am79C975 PCnet-FAST III
134.It
135AMD Am79C976 PCnet-PRO
136.It
137AMD PCnet/Home HomePNA
138.It
139Allied-Telesis LA-PCI
140.It
141Contec C-NET(98)S (PC-98)
142.It
143NEC SV-98/2-B05, B06
144.El
145.Sh DIAGNOSTICS
146.Bl -diag
147.It "pcn%d: couldn't map ports/memory"
148A fatal initialization error has occurred.
149.It "pcn%d: couldn't map interrupt"
150A fatal initialization error has occurred.
151.It "pcn%d: watchdog timeout"
152The device has stopped responding to the network, or there is a problem with
153the network connection (e.g.\& a cable fault).
154.It "pcn%d: no memory for rx list"
155The driver failed to allocate an mbuf for the receiver ring.
156.It "pcn%d: no memory for tx list"
157The driver failed to allocate an mbuf for the transmitter ring when
158allocating a pad buffer or collapsing an mbuf chain into a cluster.
159.It "pcn%d: chip is in D3 power state -- setting to D0"
160This message applies only to adapters which support power
161management.
162Some operating systems place the controller in low power
163mode when shutting down, and some PCI BIOSes fail to bring the chip
164out of this state before configuring it.
165The controller loses all of
166its PCI configuration in the D3 state, so if the BIOS does not set
167it back to full power mode in time, it will not be able to configure it
168correctly.
169The driver tries to detect this condition and bring
170the adapter back to the D0 (full power) state, but this may not be
171enough to return the driver to a fully operational condition.
172If
173you see this message at boot time and the driver fails to attach
174the device as a network interface, you will have to perform a
175warm boot to have the device properly configured.
176.Pp
177Note that this condition only occurs when warm booting from another
178operating system.
179If you power down your system prior to booting
180.Fx ,
181the card should be configured correctly.
182.El
183.Sh SEE ALSO
184.Xr arp 4 ,
185.Xr miibus 4 ,
186.Xr netintro 4 ,
187.Xr ng_ether 4 ,
188.Xr ifconfig 8
189.Rs
190.%T AMD PCnet/FAST, PCnet/FAST+ and PCnet/Home datasheets
191.%O http://www.amd.com
192.Re
193.Sh HISTORY
194The
195.Nm
196device driver first appeared in
197.Fx 4.3 .
198.Sh AUTHORS
199The
200.Nm
201driver was written by
202.An Bill Paul Aq wpaul@osd.bsdi.com .