Attansic L1 Gigabit Ethernet driver for Linux

NEWS: The atl1 driver was released as part of kernel version 2.6.21 on April 27, 2007, and is now part of the mainline kernel.

NEWS: On Feb 9, 2007 the atl1 driver was merged into the mainline kernel with kernel version 2.6.20-git5.

NEWS: Attansic has been acquired by Atheros. See this press release for details.

This page is devoted to the Attansic L1 Gigabit Ethernet driver for Linux. The Attansic L1 is included as the onboard network device for the following Asus mainboards. (If you know of other mainboards that include this device, please email me.)

A7SV (laptop) F3E (laptop) F3SC (laptop) F3SV (laptop)
M2A-MX M2N8-VMX M2V M3A
M3A-H/HDMI P2-M2A590G (barebones) P5B-E P5B-MX/WIFI-AP
P5B-SE P5B-VMSE P5E-VM HDMI P5K
P5KC P5KPL-VM P5K-SE P5K-V
P5L-MX P5LD2-VM P5L-VM 1394 P51Sn (laptop)
P51Sr (laptop)

Thanks to Xiong Huang of Attansic for writing the original vendor version of the driver and for granting permission to make the driver available for inclusion in the kernel. After obtaining permission from Attansic, the driver was initially submitted to the Linux Kernel Mailing List (LKML) on September 27, 2006. After multiple review cycles, it was was accepted for inclusion in the mainline kernel and released as part of kernel version 2.6.21. It is now part of each new kernel released from kernel.org.

Jay Cliburn and Chris Snook are co-maintainers of the in-kernel atl1 driver.

Vendor version

Here is a link to the latest L1 driver released by Attansic, now Atheros.

1.2.40.3 Vendor version released by Atheros in May 2008

IMPORTANT NOTE: This is a vendor version of the L1 driver. It was written by Attansic. We do not support this driver. It's offered here merely as a courtesy to make your life easier. If you have a problem with the driver, contact Attansic/Atheros directly.

IMPORTANT NOTE: The Attansic vendor version of drivers prior to 1.2.40.0 have a problem: TSO is broken, and that results in horrible transmit performance. It's fixed in 1.2.40.2 and 1.2.40.3. Don't use a vendor version older than 1.2.40.2!

Our versions

Here are some drivers for the L1 that were adapted for inclusion in the mainline kernel. These were works in progress as we moved toward acceptance in late 2006 and early 2007. You should avoid these drivers and patches if you can. If you run a kernel older than 2.6.21 (except for Centos 5.2), we recommend you use the current vendor driver above. For Centos 5.2, use the prebuilt RPMs below.

For the standalone drivers below, just untar the tarball, cd into the resulting directory, and execute "sudo make install". The driver should build and install itself.

For the prebuilt rpms, just download the file and execute "rpm -ivh kmod-atl1-*.rpm".

2.1.3 L1 prebuilt rpm compatible with Centos 5.2 (kernel 2.6.18)
2.1.3 L1 standalone driver compatible with kernel 2.6.23
2.1.3 L1 standalone driver compatible with kernel 2.6.24
2.1.3 L1 standalone driver compatible with kernel 2.6.25

KNOWN BUGS/PROBLEMS

1. Some Via chipsets don't play well with message signalled interrupts (MSI), and will generate a flood of APIC errors in dmesg or system logs when the atl1 driver starts sending and receiving packets. If this happens, modify your kernel's boot line and add this kernel parameter: pci=nomsi. A fix was added to 2.6.21.4 and later kernels, so you shouldn't see the error if you're running 2.6.21.4 or later.

2. There is a bug in the atl1 driver that results in a kernel hang or crash (oops) under heavy network load IF AND ONLY IF you have 4GB or more RAM in your system. This happens because of an L1 hardware design issue that is exposed by the atl1 driver. If you encounter this problem, modify your kernel's boot line and add this kernel parameter: mem=3900M. A fix was added to the 2.6.23 kernel.

3. Another atl1 bug affects older real-time (RT) kernels. The symptom is very sluggish network performance, accompanied by a log entry that looks like this:

date:time hostname kernel: network driver disabled raw interrupts: atl 1_xmit_frame+0x0/0x7c0 [atl1]

This problem was fixed in 2.6.23, and is fixed in all later kernels.

4. There is a bug in the driver that causes memory corruption during the shutdown of the interface if and only if you have 4GB or more RAM in your system (and your system utilizes all that memory). The bug has been solved and is in the process of being incorporated into kernel 2.6.26. It has been backported to 2.6.25.

5. If you see this message (or lots of them) in your system log:

atl1 0000:02:00.0: hw csum wrong, pkt_flag:1600, err_flag:80

it generally means you're encountering a bug in the L1 hardware that isn't handled well by the atl1 driver. Basically, the L1 hardware treats a fragmented IP packet as an error, when, in fact, it may not be erroneous at all. Fragmented packets can occur, for example, if your MTU size is set too large. In my own case, my DSL modem/router has its MTU size set to 1500 bytes, but it needs 8 of those bytes for its own use. If my Linux box also has its MTU size set to 1500, then inbound and outbound packets will be fragmented at the DSL router so it can add (or remove) its 8 bits. Here's where the hardware bug comes into play. When the L1 hardware receives a fragmented packet, it sets an error flag in one of its registers, and the driver, upon seeing the error bit, spews the "hw csum wrong" message. This has been fixed in the 2.6.27 kernel and beyond. The fragmentation will still occur, but the atl1 driver won't spew the error message that contributes to network slowdown.

You can avoid this condition and significantly improve network performance by adjusting the MTU size downward on your atl1 box. I use an MTU size of 1492 bytes on all my systems that sit behind the DSL modem/router. This MTU size leaves room for the DSL modem/router to add its 8 bits and avoid fragmentation altogether.

6. If you try and build vendor version 1.2.40.3 under Centos 5{.12}, you'll encounter this error:

/home/jcliburn/atl1/vendor_drivers/l1-linux-v1.2.40.2/src/kcompat.h:1116: error: redefinition of typedef ‘irq_handler_t’
include/linux/interrupt.h:67: error: previous declaration of ‘irq_handler_t’ was here
make[2]: *** [/home/jcliburn/atl1/vendor_drivers/l1-linux-v1.2.40.2/src/at_main.o] Error 1
make[1]: *** [_module_/home/jcliburn/atl1/vendor_drivers/l1-linux-v1.2.40.2/src] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.1.18.el5-x86_64'
make: *** [default] Error 2

To remedy this, simply comment out line 1116 in the file named kcompat.h.

Looking for more?

If you don't see what you're looking for, just browse the ftp server.


For any comments or suggestions, please direct them to me:
jcliburn[AT]gmail[DOT]com