26 Feb 2012 00:40
John Heim <john <at> johnheim.net>
2012-02-25 23:40:43 GMT
2012-02-25 23:40:43 GMT
I’m sorry this is a little off topic but I’m pretty desperate. I need to find out where I can get help fixing a bug in a kernel module for a serial device. The bug is in the driver for a speech synthesizer. I’ve already emailed the original developer and he is not interested in continuing to work on the driver. I’m blind and I need my hardware speech synthesizer to work.
I’ve traced the bug to code that calls the function request_resource. The code for the request_region function says its copyright Linus Torvalds so I’m guessing its part of the linux core functions. Below is a code snippet that is like the code that is failing. An error code of –16 is always returned. According to the comments in the driver module, this code is supposed to “steal” the serial port. But it gets the -16 error code and errors out.
struct resource myres;
myres.name = "ltlk";
myres.start = 0x3F8;
myres.end = 0x3FF;
myres.flags = IORESOURCE_BUSY;
error = request_resource (&ioport_resource, &myres);
The actual code is in drivers/staging/speakup/synth.c. Its not exactly like the code snippet above but it does exactly the same thing. I pasted this code into the module, recompiled the kernel, and it has all the same values and has the same result. So if anyone could tell me what’s wrong with the above code, I could probably fix the real code.But if you want to look at the real code its in the kernel code in drivers/staging/speakup/synth.c.
The code in the driver module has not changed. They must have changed something elsewhere in the kernel code that broke this module. I don’t know exactly when it started happening but it was sometime after 2.6.32 and before 2.6.37. The problem applies only to 64 bit hardware but it doesn’t matter if the kernel is compiled for 686 or amd64. So, for example, I can get speech with the 32-bit version of the grml live CD on a 32 bit machine but not on a 64 bit machine. And I can’t get speech at all with the 64 bit grml CD. Same is true for stock debian kernels and kernels I compile myself. But a 2.6.32-amd64 stock debian kernel does work.
_______________________________________________ Linux-parport mailing list Linux-parport <at> lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-parport