On Fri, 16 Nov 2001, Philipp Matthias Hahn wrote:
> Hello Andrew, Jedd, LKML!
>
> On 2001.11.16 08:17 Andrew Morton wrote:
> > > Since linux-2.4.15-pre[14]+kdb+freeswan I get an oops when stopping my
> > > 8139too network:
> > >
> > > # ifdown eth0
> > > eth0: unable to signal thread
> >
> > Could you please tell us what the return value is from kill_proc()?
> Now running 2.4.15-pre5 with your patch and kill_proc returns -3.
Found it! Here's what happend:
modprobe 8139too:
rtl8139_init_board() zeros "struct rtl8139_private"
ifconfig eth0 up:
rtl8139_open() is called, which starts rtl8139_thread()
ifconfig eth0 down:
rtl8139_close() sets "time_to_die = 1"
rtl8139_thread() exits
ifconfig eth0 up 'again':
rtl8139_open() is called, which starts rtl8139_thread()
time_to_die is still 1
rtl8139_thread() exits immediately
ifconfig eth0 down:
rtl8139_close() tries to signal a nonexistent thread -> ESRCH
rmmod 8139too
OOPS
Resetting time_to_die=0 in rtl8139_open() should fix the problem:
--- linux-2.4.15/drivers/net/8139too.c.orig Sat Nov 24 19:48:00 2001
+++ linux-2.4.15/drivers/net/8139too.c Sat Nov 24 19:48:49 2001
@@ -1270,6 +1270,7 @@
tp->full_duplex = tp->duplex_lock;
tp->tx_flag = (TX_FIFO_THRESH << 11) & 0x003f0000;
tp->twistie = 1;
+ tp->time_to_die = 0;
rtl8139_init_ring (dev);
rtl8139_hw_start (dev);
BYtE
Philipp
-- / / (_)__ __ ____ __ Philipp Hahn / /__/ / _ \/ // /\ \/ / /____/_/_//_/\_,_/ /_/\_\ pmhahn@titan.lahn.de- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Nov 30 2001 - 21:00:17 EST