All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] forwarded errors
@ 2005-07-26  7:30 Loïc Martin
  2005-07-26  8:39 ` Domen Puncer
  0 siblings, 1 reply; 2+ messages in thread
From: Loïc Martin @ 2005-07-26  7:30 UTC (permalink / raw)
  To: kernel-janitors

kernel: 2.6.11.10

Hello

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 
-------------------
hardware, n:
      The parts of a computer system that can be kicked.

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [KJ] forwarded errors
  2005-07-26  7:30 [KJ] forwarded errors Loïc Martin
@ 2005-07-26  8:39 ` Domen Puncer
  0 siblings, 0 replies; 2+ messages in thread
From: Domen Puncer @ 2005-07-26  8:39 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On 26/07/05 09:30 +0200, Lo?c Martin wrote:
> kernel: 2.6.11.10
> 
> Hello
> 
> Currently writting down a pci driver, I notice that
> "pci_register_driver(&pci_driver)" don't forward my "probe" function
> errors.

Because you could have 0 devices at that time. And devices could be
added to system after pci_register_driver is called (think hotplug).

driver != device

> 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 
> -------------------
> hardware, n:
>       The parts of a computer system that can be kicked.
> 
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-26  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26  7:30 [KJ] forwarded errors Loïc Martin
2005-07-26  8:39 ` Domen Puncer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.