K2.6 patches and update.
[tomato.git] / release / src-rt / bcm57xx / linux / bcm5700.4
blob1549000220f9679a4b8654011335c1766dd39e27
1 .\" Copyright (c) 2000-2005 Broadcom Corporation
2 .\" This is free documentation; you can redistribute it and/or
3 .\" modify it under the terms of the GNU General Public License as
4 .\" published by the Free Software Foundation.
5 .\"
6 .\" bcm5700.4,v 5.9 
7 .\"
8 .TH BCM5700 4 "10/28/05" "Broadcom Corporation"
9 .\"
10 .\" NAME part
11 .\"
12 .SH NAME
13 bcm5700 \- Broadcom NetXtreme BCM5700 series Gigabit Ethernet device driver
14 .\"
15 .\" SYNOPSIS part
16 .\"
17 .SH SYNOPSIS
18 .B insmod bcm5700.o
19 .RB [ line_speed=\c
20 .IR n,... ]
21 .RB [ auto_speed=\c
22 .IR n,... ]
23 .RB [ full_duplex=\c
24 .IR n,... ]
25 .RB [ rx_flow_control=\c
26 .IR n,... ]
27 .RB [ tx_flow_control=\c
28 .IR n,... ]
29 .RB [ auto_flow_control=\c
30 .IR n,... ]
31 .RB [ mtu=\c
32 .IR n,... ]
33 .RB [ tx_checksum=\c
34 .IR n,... ]
35 .RB [ rx_checksum=\c
36 .IR n,... ]
37 .RB [ scatter_gather=\c
38 .IR n,... ]
39 .RB [ nic_tx_bd=\c
40 .IR n,... ]
41 .RB [ tx_pkt_desc_cnt=\c
42 .IR n,... ]
43 .RB [ rx_std_desc_cnt=\c
44 .IR n,... ]
45 .RB [ rx_jumbo_desc_cnt=\c
46 .IR n,... ]
47 .RB [ adaptive_coalesce=\c
48 .IR n,... ]
49 .RB [ rx_coalesce_ticks=\c
50 .IR n,... ]
51 .RB [ rx_max_coalesce_frames=\c
52 .IR n,... ]
53 .RB [ tx_coalesce_ticks=\c
54 .IR n,... ]
55 .RB [ tx_max_coalesce_frames=\c
56 .IR n,... ]
57 .RB [ stats_coalesce_ticks=\c
58 .IR n,... ]
59 .RB [ enable_wol=\c
60 .IR n,... ]
61 .RB [ enable_tso=\c
62 .IR n,... ]
63 .RB [ vlan_tag_mode=\c
64 .IR n,... ]
65 .RB [ delay_link=\c
66 .IR n,... ]
67 .RB [ disable_d3hot=\c
68 .IR n,... ]
69 .\"
70 .\" DESCRIPTION part
71 .\"
72 .SH DESCRIPTION
73 .I bcm5700
74 is the low-level device driver for the Broadcom
75 .B NetXtreme BCM5700
76 series PCI/PCI-X and PCI Express Gigabit Ethernet NIC. The driver has
77 been tested on most 2.4.x and 2.6.x kernels up to 2.4.27 and 2.6.8 for
78 i386, ia64, and x86_64 systems.
79 It should also work on other big-endian and little-endian CPU platforms,
80 but only very limited testing has been done and minor modifications to the
81 Makefile and source files may be required.
82 .PP
83 The driver supports up to 16 NICs and allocates the next available ethernet
84 device (eth0..eth#) for each NIC found. The driver is available as a loadable
85 module or can be compiled into the kernel. The loadable module binary
86 \fBbcm5700.o\fP or \fBbcm5700.ko\fP is installed in the following path:
87 .PP
88 2.2.x kernels:
89 .RS
90 /lib/modules/<kernel_version>/net/bcm5700.o
91 .RE
92 .PP
93 2.4.x kernels:
94 .RS
95 /lib/modules/<kernel_version>/kernel/drivers/net/bcm5700.o
96 .RE
97 .PP
98 2.4.x kernels with bcm5700 as an addon driver (e.g. Red Hat 7.3, 2.1AS):
99 .RS
100 /lib/modules/<kernel_version>/kernel/drivers/net/bcm/bcm5700.o
104 /lib/modules/<kernel_version>/kernel/drivers/addon/bcm5700/bcm5700.o
107 2.6.x kernels:
109 /lib/modules/<kernel_version>/kernel/drivers/net/bcm5700.ko
112 2.6.x kernels with bcm5700 as an addon driver (e.g. SusE 9 SLES):
114 /lib/modules/<kernel_version>/kernel/drivers/net/bcm/bcm5700.ko
118 Note: If loading the driver on Red Hat 7.3, 2.1AS or other newer kernels
119 with the tg3 driver, it may be necessary to unload the tg3 driver first if
120 it is loaded. While tg3 is a fully functioning driver written by Red Hat et al,
121 Broadcom recommends users to use the bcm5700 driver written and tested by
122 Broadcom. Use ifconfig to bring down all eth# interfaces used by tg3
123 and use rmmod to unload tg3.
124 It may also be necessary to manually edit the file /etc/modules.conf to
125 change interface alias names from tg3 to bcm5700. See the man page for
126 modules.conf for more details.
129 Refer to various Linux documentations
130 on how to configure network protocol and address.
132 .\" PARAMETER part
134 .SH PARAMETERS
135 Optional parameters for the driver can be supplied as command line arguments 
136 to the insmod command. These parameters can also be set in the file
137 /etc/modules.conf (see the man page for modules.conf). These parameters take
138 the form
140 .B <parameter>=n1[,n2,...]
142 where the multiple values n1,n2,... are for multiple NICs installed in the
143 system.
145 Note that default or other meaningful values will be used when invalid values
146 are selected. Some combinations of parameters may conflict and lead to
147 failures. The driver cannot detect all such conflicting combinations.
149 All the parameters are listed below.
151 .B line_speed
152 Selects the line speed of the link. This parameter is used together with
153 \fBfull_duplex\fP and \fBauto_speed\fP to select the speed and
154 duplexity of the link and the setting of autonegotiation. The valid values are:
157 .B 0
158 Autonegotiate for highest speed supported by link partner (default)
160 .B 10
161 10 Mbps
163 .B 100
164 100 Mbps
166 .B 1000
167 1000 Mbps
169 If \fBline_speed\fP is set to \fB10\fP, \fB100\fP, or \fB1000\fP,
170 the NIC will autonegotiate for
171 the selected speed (and selected duplexity) if \fBauto_speed\fP is set to
172 \fB1\fP. If \fBauto_speed\fP is set to \fB0\fP, the selected speed and
173 duplexity will be set without autonegotiation. Note that 1000 Mbps must be
174 negotiated for copper twisted pair links.
177 .B auto_speed
178 Enables or disables autonegotiation. The valid values are:
181 .B 0
182 Autonegotiation disabled
184 .B 1
185 Autonegotiation enabled (default)
187 Note that this parameter is ignored and assumed \fB1\fP if \fBline_speed\fP is
188 set to \fB0\fP.
190 .TP    
191 .B full_duplex
192 Selects the duplexity of the link. This paramter is used together with
193 \fBline_speed\fP to select the speed and duplexity of the link. Note that this
194 parameter is ignored if \fBline_speed\fP is \fB0\fP. The valid values are:
197 .B 0
198 half duplex
200 .B 1
201 full duplex (default)
204 .B rx_flow_control
205 Enables or disables receiving flow control (pause) frames. This parameter
206 is used together with \fBauto_flow_control\fP. The valid values are:
209 .B 0
210 pause receive disabled
212 .B 1
213 pause receive enabled if \fBauto_flow_control\fP is set to \fB0\fP, or pause
214 receive advertised if \fBauto_flow_control\fP is set to \fB1\fP (default)
217 .B tx_flow_control
218 Enables or disables transmitting flow control (pause) frames. This parameter
219 is used together with \fBauto_flow_control\fP. The valid values are:
222 .B 0
223 pause transmit disabled
225 .B 1
226 pause transmit enabled if \fBauto_flow_control\fP is set to \fB0\fP, or pause
227 transmit advertised if \fBauto_flow_control\fP is set to \fB1\fP (default)
230 .B auto_flow_control
231 Enables or disables autonegotiation of flow control. This parameter is used
232 together with \fBrx_flow_control\fP and \fBtx_flow_control\fP to determine the
233 advertised flow control capability. The valid values are:
236 .B 0
237 flow control autonegotiation disabled
239 .B 1
240 flow control autonegotiation enabled with capability specified in
241 \fBrx_flow_control\fP and \fBtx_flow_control\fP (only valid if \fBline_speed\fP
242 is set to \fB0\fP or \fBauto_speed\fP is set to \fB1\fP) (default)
245 .B mtu
246 Enables jumbo frames up to the specified MTU size. The valid range for
247 this parameter is 1500 to 9000. Default is 1500 which is standard
248 ethernet (non-jumbo) MTU size. Note that the MTU size excludes the
249 ethernet header size of 14 bytes. Actual frame size is MTU size + 14 bytes.
250 Jumbo MTU sizes are not supported on BCM5705 chips.
253 The MTU size can also be changed using ifconfig after the driver is loaded.
254 See the ifconfig man page for details.
257 .B tx_checksum
258 Enables or disables hardware transmit TCP/UDP checksum. The valid values
259 are:
262 .B 0
263 checksum disabled
265 .B 1
266 checksum enabled (default)
269 .B rx_checksum
270 Enables or disables hardware receive TCP/UDP checksum validation. The
271 valid values are:
274 .B 0
275 checksum disabled
277 .B 1
278 checksum enabled (default)
282 scatter_gather
283 Enables or disables scatter-gather and 64-bit DMA on x86. This option is only
284 useful when running on TUX-enabled kernels or newer kernels with zero-copy TCP.
285 The valid values are:
288 .B 0
289 scatter-gather and 64-bit DMA on x86 disabled
291 .B 1
292 scatter-gather and 64-bit DMA on x86 enabled (default)
296 nic_tx_bd
297 Enables either NIC based or host based transmit buffer descriptors (Tx BDs).
298 NIC based Tx BDs may be slightly faster on certain machines on earlier
299 2.4 kernels where each transmit packet is usually entirely contiguous. On
300 later kernels with scatter-gather and TCP segmentation option, host based
301 Tx BDs using DMA transfer are usually faster. NIC based Tx BDs are not
302 supported on 5705 family controllers. The valid values are:
305 .B 0
306 NIC based transmit buffer descriptors disabled (using host based
307 transmit buffer descriptors) (default)
309 .B 1
310 NIC based transmit buffer descriptors enabled (not supported
311 on 5705 family controllers)
314 .B tx_pkt_desc_cnt
315 Configures the number of transmit descriptors. Default is 120. The
316 valid range is from 1 to 511. Note that the driver may not be able to
317 allocate the required amount of memory if this parameter is set too high.
318 Depending on kernel and CPU architecture, each descriptor may require up
319 to about 268 bytes. This parameter should not be set less than \fB80\fP if
320 \fBadaptive_coalesce\fP (see below) is enabled.
323 .B rx_std_desc_cnt
324 Configures the number of receive descriptors for frames up to 1528 bytes.
325 Default is 200. The valid range is from 1 to 511. This parameter should
326 not be set less than \fB80\fP on systems with high network traffic. Setting this
327 parameter higher allows the NIC to buffer larger bursts of network
328 traffic without dropping frames, especially on slower systems. Note that
329 the driver may not be able to allocate the required amount of memory if
330 this parameter is set too high. Depending on kernel and CPU architecture,
331 each descriptor may require up to about 268 bytes. Each descriptor also
332 requires a socket buffer of at least 1536 bytes. This parameter should not
333 be set less than \fB50\fP if \fBadaptive_coalesce\fP (see below) is enabled.
336 .B rx_jumbo_desc_cnt
337 Configures the number of receive descriptors for jumbo frames larger
338 than 1528 bytes. Default is 128 and valid range is from 1 to 255.
339 When jumbo frames larger than 1528 bytes are used, this parameter should
340 not be set lower than \fB60\fP on systems with high network traffic. Setting
341 this parameter higher allows the NIC to buffer larger bursts of jumbo
342 traffic without dropping frames, especially on slower systems. Depending
343 on kernel and CPU architecture, each descriptor may require up to about
344 268 bytes. Each descriptor also requires a socket buffer the size of a
345 maximum jumbo frame. On systems with insufficient memory, it may be
346 necessary to reduce this parameter. This parameter should not be set less
347 than \fB50\fP if \fBadaptive_coalesce\fP (see below) is enabled. When the maximum
348 frame size is 1528 or smaller (MTU size 1514 or smaller), this parameter
349 is not used and is always 0.
352 .B adaptive_coalesce
353 Enables or disables adaptive adjustments to the various interrupt
354 coalescing parameters. Enabling it allows the driver to dynamically
355 adjust the interrupt coalescing parameters to achieve high throughput
356 during heavy traffic and low latency during light traffic. 
357 \fBrx_std_desc_cnt\fP, (and \fBrx_jumbo_desc_cnt\fP if using jumbo frames)
358 should not be set less than \fB50\fP, and \fBtx_pkt_desc_cnt\fP should not be
359 set less than \fB80\fP when this parameter is enabled. Note that if the
360 kernel supports the NAPI receive polling mode, interrupt coalescing will
361 be handled in a different way and this parameter will not be used. The valid
362 values are:
365 .B 0
366 disabled (always disabled in NAPI mode)
368 .B 1
369 enabled (default)
372 .B rx_coalesce_ticks
373 Configures the number of 1 usec ticks before the NIC
374 generates receive interrupt after receiving a frame. This parameter works
375 in conjunction with the \fBrx_max_coalesce_frames\fP parameter. Interrupt will
376 be generated when either of these thresholds is exceeded. \fB0\fP means this
377 parameter is ignored and interrupt will be generated when the
378 \fBrx_max_coalesce_frames\fP threshold is reached. The valid range is from 0
379 to 500, and default is 60 (18 if using NAPI mode). This parameter is not
380 used and will be adjusted
381 automatically if \fBadaptive_coalesce\fP is set to \fB1\fP.
383 .B rx_max_coalesce_frames
384 Configures the number of received frames before the
385 NIC generates receive interrupt. The valid range is from 0 to 100, and default
386 is 15 (6 if using NAPI mode). This parameter and
387 \fBrx_coalesce_ticks\fP cannot be both \fB0\fP,
388 otherwise no receive interrupts will be generated. It should also be set
389 lower than \fBrx_std_desc_cnt\fP (and \fBrx_jumbo_desc_cnt\fP
390 if using jumbo frames). This parameter is not
391 used and will be adjusted automatically if
392 \fBadaptive_coalesce\fP is set to \fB1\fP.
394 .B tx_coalesce_ticks
395 Configures the number of 1 usec ticks before the NIC
396 generates transmit interrupt after transmitting a frame. This parameter
397 works in conjunction with the \fBtx_max_coalesce_frames\fP parameter. Interrupt
398 will be generated when either of these thresholds is exceeded. \fB0\fP means
399 this parameter is ignored and interrupt will be generated when the
400 \fBtx_max_coalesce_frames\fP threshold is reached. The valid range is from 0 to
401 500, and default is 200. This parameter is not used and will be adjusted
402 automatically if \fBadaptive_coalesce\fP is set to \fB1\fP.
404 .B tx_max_coalesce_frames
405 Configures the number of transmitted frames before
406 the NIC generates transmit interrupt. The valid range is from 0 to 100, and
407 default is 35. This parameter and \fBtx_coalesce_ticks\fP cannot be both
408 \fB0\fP, otherwise no transmit completion interrupts will be generated. This
409 parameter should always be set lower than \fBtx_pkt_desc_cnt\fP.
410 This parameter is not used and will be adjusted
411 automatically if \fBadaptive_coalesce\fP is set to \fB1\fP.
413 .B stats_coalesce_ticks
414 Configures the number of 1 usec ticks between
415 periodic statistics block DMAs. The valid range is from 100 to 3600000000, and
416 default is 1000000 (1 sec.). 0 is also valid and is used to disable
417 statistics updates. This parameter is not used and will be set to default
418 if \fBadaptive_coalesce\fP is set to \fB1\fP.
420 .B enable_wol
421 Enables or disables magic packet Wake-On-LAN when the system is shutdown.
422 Note that not all systems support Wake-On-LAN. The valid values are:
425 .B 0
426 magic packet Wake-On-LAN disabled (default)
428 .B 1
429 magic packet Wake-On-LAN enabled
432 .B enable_tso
433 Enables or disables TCP Segmentation Option (TSO) when using kernels that
434 support it. This parameter is only defined on newer kernels that support
435 TSO. The valid values are:
438 .B 0
439 TSO disabled
441 .B 1
442 TSO enabled (default)
445 .B vlan_tag_mode
446 This parameter controls the stripping of VLAN tags on incoming packets,
447 and is used to allow VLAN tagged ASF or IPMI packets to be received
448 properly. The valid values are:
451 .B 0
452 Auto mode (default)
454 .B 1
455 Normal strip mode
457 .B 2
458 Forced strip mode
460 In normal mode, VLAN tags are only stripped if VLANs are registered
461 by the 802.1q VLAN module or BASP. In forced strip mode, VLAN tags
462 are always stripped. Auto mode will select normal strip mode if ASF/IPMI
463 is disabled, or forced strip mode if ASF/IPMI is enabled.
464 .RE    
466 .B delay_link
467 If set to 1, this parameter will cause the driver to return 
468 -EOPNOTSUPP when the SIOCGMIIREG or ETHTOOL_GLINK ioctls are called
469 during the first 6 seconds after driver reset. When the driver resets
470 the NIC during ifconfig, the link will drop and it may take several
471 seconds for the link to come up after autonegotiation completes. Some
472 applications, such as ifup, may not wait long enough for the link
473 before giving up. Setting this parameter to 1 may get around such
474 problems. The default value is 0, which means that the driver will
475 always return true link states to all ioctl calls, when applicable.
477 .B disable_d3hot
478 If set to 1, this parameter will cause the driver to never
479 put the device in D3Hot power state when the NIC is shutdown or
480 suspended. If set, this parameter will also disable the Wake-On-Lan
481 setting. A rare D3Hot related problem was seen during repeated shutdown of
482 PCI Express devices on systems running 2.6 kernels.
485 .\" DRIVER MESSAGES part
487 .SH DRIVER MESSAGES
488 The following are the most common sample messages that may be logged in the file
489 /var/log/messages. Use dmesg -n <level> to control the level at which messages
490 will appear on the console. Most systems are set to level 6 by default.
492 .B Broadcom Gigabit Ethernet Driver bcm5700 with Broadcom NIC Extension (NICE) ver. 8.3.9 (09/30/05)
494 Driver signon
497 .B eth#: Broadcom BCM5704 1000Base-T found at mem faff0000, IRQ 16, node addr 0010180402d8
499 .B eth#: Broadcom BCM5704 Integrated Copper transceiver found
501 .B eth#: Scatter-gather ON, 64-bit DMA ON, Tx Checksum ON, Rx Checksum ON, 802.1Q VLAN ON, NAPI ON
503 NIC detected
506 .B bcm5700: eth# NIC Link is Up, 1000 Mbps full duplex, receive & transmit flow control ON
508 Link up and speed indication
511 .B bcm5700: eth# NIC Link is Down
513  Link down indication
516 .\" FILES part
518 .SH FILES
519 .I /proc/net/nicinfo/eth#.info
521 Detailed statistics and configuration file.
524 .\" AUTHOR part
526 .SH AUTHOR
527 Michael Chan \- mchan@broadcom.com
529 .\" SEE ALSO part
531 .SH SEE ALSO
532 .BR ifconfig (8),
533 .BR insmod (8),
534 .BR modules.conf (5).