Re: Question to multy PCI card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Kirill Messel <kirill.messel@mtu-net.ru> wrote:
> Hi all,
> 
> I have written char device to PCI card, created file in /dev
> directory.
> Now it works fine. But as next step should I use my driver
> to multy PCI card. And I have not any idea how can I do that.
> Can anybody help me with this problem?
> 

If I'm correct, you're saying that you've written a char device
driver to support a card that plugs into the PCI bus.  Next, you'd
like your driver to support more than one card?

I assume that you're using a structure of some kind, or maybe global
variables, to keep information regarding your card.  Just make a
global array with one position for each card you'd like to support. 
For each card found, initialize another slot in the array.  It's not
too tough.  You need to pass your structures around to distinguish
between the cards, for example the pci_dev structure.

This link might be of interest:

http://www.linuxhq.com/kernel/v2.4/doc/pci.txt.html

Hope that helps.

Harmony,

--Christine


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux