From: "Loïc MARTIN" <martinloik@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: int pci_register_driver(&pci_driver) and void driver_attach(struct device_driver * drv)
Date: Mon, 25 Jul 2005 10:28:21 +0200 [thread overview]
Message-ID: <958d5cd1050725012845d76286@mail.gmail.com> (raw)
kernel: 2.6.11.10
Currently writting down a pci driver, I notice that
"pci_register_driver(&pci_driver)" don't forward my "probe" function
errors.
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-2.6.11.10/drivers/base/bus.c" 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 */
printk(KERN_WARNING
"%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.
Thanks
--
Loïc Martin
reply other threads:[~2005-07-25 8:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=958d5cd1050725012845d76286@mail.gmail.com \
--to=martinloik@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox