pci_register_driver question(s)

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

 



Hi all,

I'm working on a new kernel driver for a mesanet anything i/o board. (http://mesanet.com/parallelcardinfo.html - the 4I68 FPGA based PC104-PLUS Anything I/O card)

I've read the "Linux device drivers" book - the must read but I'm having some trouble whit the pci_register_driver() function. Let me paste the code since that would make things more clear then I can tell.

#ifndef PCI_VENDOR_ID_ANYIO
#define PCI_VENDOR_ID_ANYIO 0x14F1 // cx8800
#endif
#ifndef PCI_DEVICE_ID_ANYIO
#define PCI_DEVICE_ID_ANYIO 0x8800 //cx800
#endif

#define DRIVER_VERSION "0.01"

static int cards_found=0;

static struct pci_device_id anyio_pci_tbl[] = {
   {
    .vendor = PCI_VENDOR_ID_ANYIO,
    .device = PCI_DEVICE_ID_ANYIO,
    .subvendor = PCI_ANY_ID,
    .subdevice = PCI_ANY_ID,
    },
   {0,},
};


static struct pci_driver anyio_driver = {
   .name = "anyio",
   .id_table = anyio_pci_tbl,
   .probe = anyio_probe_one,
   .remove = anyio_remove_one,
};


static int __devinit anyio_probe_one(struct pci_dev *dev, const struct pci_device_id *id)
{
printk(KERN_ALERT "Inside the anyio_probe_one function!!\n");

// more code
}

static int __init  anyio_init(void)
{
   printk(KERN_ALERT "Hello, world\n");
   pci_register_driver(&anyio_driver);
   printk(KERN_ALERT "pci_register_driver called\n");
   return 0;
}


More code is there but this is the most relevant part (I think) - the hello world stuff makes its way to the log files as does the pci_register_driver called stuff, but the inside anyio_probe_one stuff does not. It seems to me that the probe function never gets executed. The must logical reason for this is - i tink that it cant find the board itself with the corresponding ID's however - the printk function should be executed no?


A small not - the PCI_VENDOR_ID and such are borrowed from the cx88xx modules (tv card) since this card is in my machine and I don't use it - I thought i might use it for testing. (the boards itself are at the university - and its still vacation :D) .

Any ideas? - thx in advance,

Jeffry Molanus
gila at home.nl






--
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