On Friday 23 March 2007 07:02, krishna.vamsi@xxxxxxxxx wrote: Thank you for answering. > First have a look at the /proc/pci. It gives good amount of information > on PCI devices connected. Once you find the device you are looking for,. > u can get the Pci_dev reference with vendor id and device id. > > pci_dev = pci_find_device(Vendor, devid, NULL/*First reference*/); So function is not important here, i.e., it will be returned in the pci_dev? so i can tell if this is the device i want to handle? I am still not sure how the hardware addresses a pci device. I.e. We program the pci bus controller to Bus:x. Also we put on the controller the device number and function number but they don't really matter. I.e. We write to Bus:x but the pci devices on that bus needs to find out if it was addressed for them by reading the device number and function number from the PCI controller? I.e. I can have two PCI cards(peripherals) on the same bus with the same device class but different function numbers and they would both will have different configuration areas. > PCI Device can support 6 IO regions, and the address of the these > regions will be stored in Configuration space of the pci device, Exact > location where these address will be stored is referred as BAR(Base > address register), there are 6 BARs ranged from 0-5. So, these 6 regions are the only ones possible to map right? I.e. any device will have to make do with those or create another peripheral, even on the same PCI card right? -- Regards, Tzahi. -- Tzahi Fadida Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info WARNING TO SPAMMERS: see at http://members.lycos.co.uk/my2nis/spamwarning.html -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ