int pci_register_driver(&pci_driver) and void driver_attach(struct device_driver * drv)

From: Loïc MARTIN
Date: Mon Jul 25 2005 - 03:29:32 EST


Currently writting down a pci driver, I notice that
"pci_register_driver(&pci_driver)" don't forward my "probe" function
Actually errors are noticed in the kernel ring buffer but don't make
pci_register_driver fail. It returns a zero value in any case.
I traced back to the kernel in order to try to understand this problem
and find the "void driver_attach(struct device_driver * drv)" function
in the "linux-" file which, obviously, can
not returns an error.

So I just wish to know why this function only print this message :

/* driver matched but the probe failed */
"%s: probe of %s failed with error %d\n",
drv->name, dev->bus_id, error);

but don't return the error.
Actually I don't understand why the module is loaded (because
pci_register_driver, which is called during __init, don't fail) while
my pci card could not have been initialized by "probe" function
because it failed for such reasons.


Loïc Martin
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at