Hi,
here's a solution to get the Atheros Gigabit ethernet on the Asus P8H67-V Sandy Brigde board to work.
The device is listed as:
Unfortunately, the 1969:1083 is not supported yet by the atl1e module in the kernel. Atheros offers linux drivers for the AR81 family on their website:Code:07:00.0 Ethernet controller [0200]: Atheros Communications Device [1969:1083] (rev c0) Subsystem: ASUSTeK Computer Inc. Device [1043:847e] Flags: bus master, fast devsel, latency 0, IRQ 47 Memory at fe400000 (64-bit, non-prefetchable) [size=256K] I/O ports at d000 [size=128] Capabilities: [40] Power Management version 3 Capabilities: [48] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [58] Express Endpoint, MSI 00 Capabilities: [6c] Vital Product Data Capabilities: [100] Advanced Error Reporting
AR81Family Linux Driver
Since some data structures of net_device changed in 2.6.35, the above driver does not compile with kernels > 2.6.34. I wrote a patch to adapt to the changes in net_device and the Makefile:
Change into the src directory of the Atheros driver and apply:Code:diff -urN src-old/atl1c_main.c src/atl1c_main.c --- src-old/atl1c_main.c 2011-01-28 13:32:59.277576319 +0100 +++ src/atl1c_main.c 2011-01-28 11:48:39.677573301 +0100 @@ -336,7 +336,13 @@ { struct atl1c_adapter *adapter = netdev_priv(netdev); struct atl1c_hw *hw = &adapter->hw; + +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) ) + struct netdev_hw_addr *ha; +#else struct dev_mc_list *mc_ptr; +#endif + u32 mac_ctrl_data = 0; u32 hash_value; @@ -359,10 +365,18 @@ AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); /* comoute mc addresses' hash value ,and put it into hash table */ - for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { - hash_value = atl1c_hash_mc_addr(hw, mc_ptr->dmi_addr); - atl1c_hash_set(hw, hash_value); + +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) ) + netdev_for_each_mc_addr(ha, netdev){ + hash_value = atl1c_hash_mc_addr(hw, ha->addr); + atl1c_hash_set(hw, hash_value); + } +#else + for(mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { + hash_value = atl1c_hash_mc_addr(hw, mc_ptr->dmi_addr); + atl1c_hash_set(hw, hash_value); } +#endif } #ifdef NETIF_F_HW_VLAN_TX diff -urN src-old/atl1e_main.c src/atl1e_main.c --- src-old/atl1e_main.c 2011-01-28 13:32:59.277576319 +0100 +++ src/atl1e_main.c 2011-01-28 11:46:30.327572286 +0100 @@ -1829,7 +1829,13 @@ { struct atl1e_adapter *adapter = netdev_priv(netdev); struct atl1e_hw *hw = &adapter->hw; + +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) ) + struct netdev_hw_addr *ha; +#else struct dev_mc_list *mc_ptr; +#endif + u32 rctl; u32 hash_value; @@ -1856,10 +1862,17 @@ /* comoute mc addresses' hash value ,and put it into hash table */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) ) + netdev_for_each_mc_addr(ha, netdev){ + hash_value = atl1e_hash_mc_addr(hw, ha->addr); + atl1e_hash_set(hw, hash_value); + } +#else for(mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { hash_value = atl1e_hash_mc_addr(hw, mc_ptr->dmi_addr); atl1e_hash_set(hw, hash_value); } +#endif } diff -urN src-old/Makefile src/Makefile --- src-old/Makefile 2011-01-28 13:32:59.277576319 +0100 +++ src/Makefile 2011-01-28 11:33:56.707574257 +0100 @@ -89,12 +89,12 @@ CONFIG_FILE := $(KSRC)/include/linux/autoconf.h endif else - ifneq (,$(wildcard $(KOBJ)/include/linux/utsrelease.h)) - VERSION_FILE := $(KOBJ)/include/linux/utsrelease.h + ifneq (,$(wildcard $(KOBJ)/include/generated/utsrelease.h)) + VERSION_FILE := $(KOBJ)/include/generated/utsrelease.h else VERSION_FILE := $(KOBJ)/include/linux/version.h endif - CONFIG_FILE := $(KSRC)/include/linux/autoconf.h + CONFIG_FILE := $(KSRC)/include/generated/autoconf.h endif ifeq (,$(wildcard $(VERSION_FILE)))
It should build fine now.Code:patch -p1 < /path/to/AR81Family-linux-v1-1.0.1.14.patch
I tested it on 2.6.35-25-server and 2.6.38-rc2.



Adv Reply

Bookmarks