How to access second PCI card with same signature in linux

Hi all, I have developed a linux based PCI card driver.Now I am using single card, with single card my application is working fine.Now I have inserted the second card with the same signature,

So how can i access that second card using the same driver.

Is there any Minor number mechanism to work with the second card.I don't know, Can anyone help me regarding this issue, it will be great pleasure.

Thanking you.

Reply to
mahi
Loading thread data ...

In kernel 2.4, to enumerate all your cards you need to keep calling pci_find_device() until it fails. For each device, you can map your I/O & memory resources.

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, 
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266
Reply to
Mark McDougall

Funny. I've never had the slightest problem with a single driver accessing multiple identical cards. They always get sequential devices nodes and udev maps them to names like /dev/dsp, /dev/dsp1, /dev/dsp2. You can force assignments by using the PCI address to differentiate them, but if you don't, linux will simply assign them device nodes as they are discovered, typically in the order the PCI bus is scanned (?).

Maybe you should look at the existing source code for any existing driver to see how it's done.

Reply to
AZ Nomad

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.