status of serialio bug
John Heim
jheim at math.wisc.edu
Tue Feb 28 10:01:19 EST 2012
I've been looking into the speakup bug that causes you to get an error
message when loading some speakup modules for serial hardware synths. What
I've found is that the speakup code calls a function named request_resource.
That function is apparently part of the standard linux kernel code. The
source code module says its copyright Linux Torbalds. In case you're not
aware of it, Linus Torvalds is the guy who created linux.
Anyway, the request_resource function does nothing other than to add an item
to a linked list unless the item would overlap an item already in the list.
I take this to mean that the linked list is nothing more than a list of
reserved resources and you're supposed to check the list before you use a
resource. But it doesn't actually prevent you from using the resource.
The problem is that the serial port space is definately already reserved
when speakup asks for it even if you have nothing using the serial port. I
added code to the speakup module to dump the linked list and it shows that
the entire range from 0x000 through 0xcf7 is taken by something named "PCI
Bus 0000:00". The serial port's address is 0x3f8 so that definately falls in
that range. Therefore, it will always fail when speakup calls
request_resource to reserve the serial port.
The only other possibility is that speakup is checking the wrong linked
list. It's checking a list named ioport_resource which certainly sounds
like the right list. And why would something called the PCI Bus have the
serial port address space reserved? That makes no sense to me either.
So my plan is to subscribe to the kernel coders email list and ask for
information on that function call.
More information about the Speakup
mailing list