1 .\" Copyright (c) 2021 Michael J. Karels
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .Nd "Raspberry Pi 4 / BCM2711 Gigabit Ethernet controller driver"
33 To compile this driver into the kernel,
34 place the following lines in the
35 kernel configuration file:
36 .Bd -ragged -offset indent
43 driver supports the BCM2711 Ethernet controller
44 as found on the Raspberry Pi 4.
46 The following features are supported in the
51 .Bl -item -offset indent -compact
53 IP/TCP/UDP checksum offload for IPv4 and IPv6
55 10/100/1000Mbps operation in full-duplex mode
57 10/100Mbps operation in half-duplex mode
60 Note that the operation of transmit checksum offload is coupled
61 for IPv4 and IPv6; to disable it, both must be disabled even if both
62 address families are not in use.
66 driver supports the following media types:
67 .Bl -tag -width ".Cm 10baseT/UTP"
69 Enable autoselection of the media type and options.
70 The user can manually override
71 the autoselected mode by adding media options to
78 option can also be used to select either
84 Set 100Mbps (Fast Ethernet) operation.
88 option can also be used to select either
94 Set 1000baseT operation over twisted pair.
102 driver supports the following media options set with the
107 .Bl -tag -width ".Cm full-duplex"
109 Force full duplex operation.
111 Force half duplex operation.
114 For more information on configuring this device, see
119 driver supports the Ethernet controller portion of the Broadcom BCM2711
120 on the Raspberry Pi 4 Model B and related systems.
121 It utilizes the BCM54213PE PHY.
123 Tunables can be set at the
125 prompt before booting the kernel or stored in
127 The following loader tunable variable is available, and is also
128 available as a read-only
131 .Bl -tag -width indent
132 .It Va hw.genet.rx_batch
133 The maximum number of packets to pass to the link-layer input routine
138 The following variable is available as a
141 .Bl -tag -width indent
142 .It Va hw.genet.tx_hdr_min
143 When the driver is given an output packet in a buffer chain
144 in which the first buffer contains only the Ethernet header,
145 the number of bytes of the packet to add to the Ethernet header
147 Certain packets may be lost if this value is too small.
148 The default value is 56, and is sufficient for the observed cases to date.
153 driver has no diagnostics that are likely in normal operation.
158 most failures that cause packet loss in the transmit and receive paths
159 cause a cryptic diagnostic message naming the failure.
160 These messages generally make sense only when looking at the driver source.
172 device driver first appeared in
177 driver was written by
178 .An Mike Karels Aq Mt karels@freebsd.org .
179 Portions are derived from the bcmgenet driver in
182 and parts of the structure and common code are from the awg driver
183 for the Allwinner EMAC by Jared McNeill.