Converting a device driver for real time kernel
What is the best way of converting an existing device driver to work under a real-time kernel?
A device driver provided for a special serial card (Curtiss Wright SL240 sFDFP card) works under vanilla Linux (SLES SP10 SP2 kernel 18.104.22.168-0.21-smp), but compiling the driver under the real time kernel (22.214.171.124-0.14-rt) the system locks up and crashes. The rt kernel is being used to write large amounts of data from the serial card to disk and testing has found the rt kernel has the best consistent write performance.
I have gone back to the supplier and they are not interested in developing a real time version of the driver. So I am trying to modify the driver myself. The driver code can be provided if anyone wants a look (released under GPLv2).
Any assistance would be useful.
when you say Real Time kernel...
The RT patches to the linux kernel add some more API calls so that the various drivers can take advantage of some extra scheduling features, high resolution timers and such but it is not an actual real time kernel. To get true real time you need either the RTAI linux kernel or move to VxWorks (ka-ching$$$$) QNX, OSE etc...
I suspect that you are running into a compatibility issue in general, not with any actual real time issues since your driver was never written to use the RT API calls.
You need to start sending single characters to the I/F and debugging the code using printk() and the mighty panic() if it still dies without a whimper. Welcome to kernel debugging. Good Luck.