2.0.30 device handling problems

Rajiv K Singh (rajiv@ncra.tifr.res.in)
Tue, 9 Jun 1998 23:45:37 +0530


Hello members,

I am not sure if this is a right forum for the following requests,
but let me report anyway, someone will definitely find it interesting.

I am developing a device driver for a PCI card for the purpose of
astronomical data acquisition. I run into following problems. Easier first.
My platform is a Dual processor Pentium 233 MHz, 64 MB common mem, linux
2.0.30 compiled with SMP flag (running fine). The hardware offers smp
protocol 1.4 and 1.1. Linux gives better performance when it is set to 1.1,
I am not sure why.

1) Even after I set the IRQ line value with the following function call,
pcibios_write_config_byte(Bus, DevFn, PCI_INTERRUPT_LINE, 0xa);

$ cat /proc/pci still reports IRQ 9 for the device.
I am not sure whether it is a bug, or the value is not getting set.
When I read back again within the driver, I get 0xa for the IRQ line.

2) Within the driver, I wish to use memory mapped register addresses.
IO mapped registers are not available. The moment I use the memory
mapped address of the register, I receive segmentation violation signal.
It makes sense, because, in no way could I tell the kernel to allocate
those physical addresses to the process. What is the way out of this?
It is impossible to believe that people do not use memory mapped i/o.
I did not find a right kind of example device driver that could
demonstrate how. I set the memory mode access in the following manner

pcibios_write_config_byte(Bus, DevFn, PCI_COMMAND, prev_val | 0x2);

3) Astronomical data comes in astronomical quantity as well; something like
8-10 MBytes/sec sustained all through. It is not undesirable to
expect that even DMA or programmed IO could directly write into the
user buffer. I do not know how to specify the physical addresses of
user memory for example in a DMA. I know how to create a shared memory
and lock it into the memory so that the physical addresses remain fixed.
Any help or a good reference would go a long way.

4) For the purpose of making the device driver usable by a common user,
I did not wish to use RT-linux, or letting a chunk of memory untouched
by the OS. In case, if there is no resonable solution of the above
problems, I will be forced to use RT-linux.
Is it possible to allocate several of 128K chunks of memory within
a device driver to hold tha data coming from several ports, worth
a fraction of a second?

I request any kind netters to address them. Private replies are
also welcome. Thanks a lot!

Rajiv
rajiv@ncra.tifr.res.in

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu