Scott Hiles
2003-05-27 01:36:59 UTC
Ugh.I worked all weekend to try to figure out why the USB drivers crash
under kernel 2.4.21. I didn't fix that problem, but along the way I finally
found the bug that had eluded me from the first version with USB. I have
tested it under 2.4.20 and 2.4.18-24.7.x. The driver is much more stable
now under USB. But, I still can't figure out what changed in 2.4.21 that is
causing it to crash. I have isolated it to a call to wake up the interrupt
system but I can't figure out why it is happening. If anyone has the
knowledge and the time, it wouldn't hurt to have a second set of eyes go
over the x10_ldisc_plusb.c code to see if someone else can see something
that I seem to be overlooking.
I have put the source on sourceforge, but I have not put compiled rpms out
yet until I know that the driver is fully stable. If I haven't received any
bug reports on the new driver by June 5, I will build the rpms and put them
on sourceforge.
Specific fixes:
1) atomic management of the circular buffers for the log and extended data
have been added to make the drivers work under SMP. I had a user with an
SMP machine test it out and it worked! Alas, it didn't work for another
user, but I am closer on the SMP stuff.
2) Advanced the USB drivers to use circular queues for incoming packets so
that interrupt handling is much faster. The data path from interrupt to
decoder now uses bottom half tasklets that allow the decoder to run in
parallel to the interrupt routines. This will avoid missing interrupts and
will allow the decoder to run slower than the interrupts.
3) Found the bug that caused the system to crash a random time after the
USB driver was unloaded. The problem was that I had called usb_urb_free()
twice and the USB system didn't check to see if the URB had actually been
freed before. As a result, the USB list would be corrupt causing random
types of failures.
Scott
under kernel 2.4.21. I didn't fix that problem, but along the way I finally
found the bug that had eluded me from the first version with USB. I have
tested it under 2.4.20 and 2.4.18-24.7.x. The driver is much more stable
now under USB. But, I still can't figure out what changed in 2.4.21 that is
causing it to crash. I have isolated it to a call to wake up the interrupt
system but I can't figure out why it is happening. If anyone has the
knowledge and the time, it wouldn't hurt to have a second set of eyes go
over the x10_ldisc_plusb.c code to see if someone else can see something
that I seem to be overlooking.
I have put the source on sourceforge, but I have not put compiled rpms out
yet until I know that the driver is fully stable. If I haven't received any
bug reports on the new driver by June 5, I will build the rpms and put them
on sourceforge.
Specific fixes:
1) atomic management of the circular buffers for the log and extended data
have been added to make the drivers work under SMP. I had a user with an
SMP machine test it out and it worked! Alas, it didn't work for another
user, but I am closer on the SMP stuff.
2) Advanced the USB drivers to use circular queues for incoming packets so
that interrupt handling is much faster. The data path from interrupt to
decoder now uses bottom half tasklets that allow the decoder to run in
parallel to the interrupt routines. This will avoid missing interrupts and
will allow the decoder to run slower than the interrupts.
3) Found the bug that caused the system to crash a random time after the
USB driver was unloaded. The problem was that I had called usb_urb_free()
twice and the USB system didn't check to see if the URB had actually been
freed before. As a result, the USB list would be corrupt causing random
types of failures.
Scott