jump to navigation

Attansic L1 giganet driver on ASUS P5B-E (kernel=2.6.20) April 9, 2007

Posted by TSAI HONG-BIN in Linux.
trackback

World changes, including Linux kernel …

kernel 2.6.20 has changed the definition of INIT_WORK in include/linux/workqueue.h. Again, your Attansic L1 driver (including mine…) cannot be built right after updating your kernel to 2.6.20. In this post I’ll show you how to modify the atl1 source so that it can be compiled and inserted into kernel for you to enjoy.

edit at_main.c:

at line 56 you change this line———————————>

static void at_tx_timeout_task(struct net_device *netdev);

to ———————————————————–>

static void at_tx_timeout_task(struct work_struct *work);

at line 59 you change this line ———————————>

static void at_link_chg_task(struct net_device *netdev);

to ————————————————————>

static void at_link_chg_task(struct work_struct *work);

at line 353, 355, 357 you see three lines starting with INIT_WORK, please modify them —–>

INIT_WORK(&adapter->tx_timeout_task, at_tx_timeout_task);

INIT_WORK(&adapter->link_chg_task, at_link_chg_task);

INIT_WORK(&adapter->pcie_dma_to_rst_task, at_tx_timeout_task);

start from line 1966 you modify the content of function at_tx_timeout_task as follows ———————————–>

static void at_tx_timeout_task(struct work_struct *work){

struct at_adapter *adapter = container_of(work, struct at_adapter, tx_timeout_task);
struct net_device *netdev = adapter->netdev;

}

start from line 2040 you modify the content of function at_link_chg_task as follows —————————————->

static void at_link_chg_task(struct work_struct *work){
struct at_adapter *adapter = container_of(work, struct at_adapter, link_chg_task);
struct net_device *netdev = adapter->netdev;

}

make clean; make; make install;

done!!

Hopefully someone will include this driver into mainline kernel. @.@

Advertisements

Comments»

1. Attansic L1 giganet driver on ASUS P5B-E « furseal’s lair - April 10, 2007
2. me - May 18, 2007

Did you get this working for kernel 2.6.21.1 ?

R.

3. TSAI HONG-BIN - May 22, 2007

Sorry, I haven’t had a chance to give it a try. Have been overwhelmed by work lately. Once I got a successful compilation, I’ll post it here.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: