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

Re: PCI Device list



try doing lspci -v.
See if the device is listed there..
Hope this helps
Dp


Usman S. Ansari wrote:
> I am trying to list of the pci devices of type storage, for which I have following code,
> the code does not find any device. I was expecting to see hard disk and/or drives. What am I doing
> wrong.
> 
> struct pci_dev *disk=NULL;
> while (1)
>    {
>     if ((disk = pci_find_class(PCI_BASE_CLASS_STORAGE, disk)) == NULL)
>        {
>         printk("End of storage devices\n");
>         break;
>        }
>     else
>        {
>         pci_read_config_word(disk, PCI_VENDOR_ID, &vid);
>         pci_read_config_word(disk, PCI_DEVICE_ID, &did);
>         printk("Vendor id = %d, Device id = %x\n", vid, did);
>         printk("Class = %d\n", disk->class);
>        }
> }
> 
> __________________________________
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
> http://launch.yahoo.com/promos/britneyspears/
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/