Hi all,

I am trying to use the "w83977af_ir.o" driver in linux version 2.2.15pre17.

Now, when I load the driver like so

> bash# rmmod serial
> bash# modprobe w83977af_ir

then modprobe locks up. If you switch to another console
and do lsmod, you can see the module w83977af_ir listed,
but it says 'uninitialised' immediately after this.

I worked out by inserting printk statements that function
w83977af_open() in file drivers/net/irda/w83977af_ir.c
was making a call to function register_netdev() on line 261.
However the call to function register_netdev() never returned.

Function w83977af_open() calls function rtnl_lock(), just
before the call to register_netdev(). But within function
register_netdev() there is yet another call to rtnl_lock().
I think this may be causing the hang.

I modified file w83977af_ir.c as indicated in the patch below.
Now the driver loads without hanging.

bash$ diff -C 2 w83977af_ir.c~ w83977af_ir.c
*** w83977af_ir.c~      Tue Apr 11 17:34:33 2000
--- w83977af_ir.c       Tue Apr 11 18:20:27 2000
***************
*** 258,264 ****
        dev->get_stats       = w83977af_net_get_stats;

!       rtnl_lock();
        err = register_netdev(dev);
!       rtnl_unlock();
        if (err) {
                ERROR(__FUNCTION__ "(), register_netdev() failed!\n");
--- 258,264 ----
        dev->get_stats       = w83977af_net_get_stats;

!       //rtnl_lock();
        err = register_netdev(dev);
!       //rtnl_unlock();
        if (err) {
                ERROR(__FUNCTION__ "(), register_netdev() failed!\n");
 bash$

best regards
Robbie Dinn     [EMAIL PROTECTED]


----------
[EMAIL PROTECTED]


_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to