Hi Vamsi,
Ian recently explained to me that CoMeDI in the kernel tree is somewhat different from the Github-CoMeDI.
Especially the PCI Plug and Play Mechanism is more advanced in the kernel tree version:
Kernel tree CoMeDI: low level drivers have *_auto_attach() handler which is registered by probe().
low level Isa Drivers use *_attach() handler which is exported.
Github CoMeDI: low level drivers have *_attach() handler and PnP is "emulated". Ian knows more.
He wrote some info on that in the other group converstion where I added ISRs in 2 of the DigIO drivers :
adl_pci7x3x.c and adv_pci_dio.c .
What wonders me a bit on your config is which comedi_pci.ko and comedi.ko will be loaded in your machine.
Both of your CoMeDI variants should bring their own modules.
As you have the kernels CoMeDI modules configured and activated for your adl_pci7x3x.ko, that stuff will likely win at boot time. But I guess, it is not compatible with your adl_pci7256.ko modified from the Github style CoMeDI variant.
You could try to learn from the lower (?) lines adl_pci7x3x.c, where the adl_pci7x3x_pci_probe(), adl_pci7x3x_auto_attach() and the published stuff for module probing lives. See below.
Another important point is that the PCI device ID in your new driver
#define PCI_DEVICE_ID_PCI7256 0x7256
is really correct and matches the "lspci -nn" data.
But Adlink really just seems to use the Board type as hex value...
File end of adl_pci7x3x.c:
static struct comedi_driver adl_pci7x3x_driver = {
.driver_name = "adl_pci7x3x",
.module = THIS_MODULE,
.auto_attach = adl_pci7x3x_auto_attach,
.detach = comedi_pci_detach,
};
static int adl_pci7x3x_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{
return comedi_pci_auto_config(dev, &adl_pci7x3x_driver,
id->driver_data);
}
static const struct pci_device_id adl_pci7x3x_pci_table[] = {
{ PCI_VDEVICE(ADLINK, 0x7230), BOARD_PCI7230 },
{ PCI_VDEVICE(ADLINK, 0x7233), BOARD_PCI7233 },
{ PCI_VDEVICE(ADLINK, 0x7234), BOARD_PCI7234 },
{ PCI_VDEVICE(ADLINK, 0x7432), BOARD_PCI7432 },
{ PCI_VDEVICE(ADLINK, 0x7433), BOARD_PCI7433 },
{ PCI_VDEVICE(ADLINK, 0x7434), BOARD_PCI7434 },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, adl_pci7x3x_pci_table);
static struct pci_driver adl_pci7x3x_pci_driver = {
.name = "adl_pci7x3x",
.id_table = adl_pci7x3x_pci_table,
.probe = adl_pci7x3x_pci_probe,
.remove = comedi_pci_auto_unconfig,
};
module_comedi_pci_driver(adl_pci7x3x_driver, adl_pci7x3x_pci_driver);
MODULE_DESCRIPTION("ADLINK PCI-723x/743x Isolated Digital I/O boards");
...
MODULE_LICENSE("GPL");
Ciao, Bernd