* [Patch 4/7] driver core: Don't stop probing on ->probe errors.
@ 2006-10-27 11:36 Cornelia Huck
0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2006-10-27 11:36 UTC (permalink / raw)
To: Greg K-H; +Cc: linux-kernel, Andrew Morton
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Don't stop on the first ->probe error that is not -ENODEV/-ENXIO.
There might be a driver registered returning an unresonable return code, and
this stops probing completely even though it may make sense to try the next
possible driver. At worst, we may end up with an unbound device.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
drivers/base/dd.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- linux-2.6.orig/drivers/base/dd.c
+++ linux-2.6/drivers/base/dd.c
@@ -133,18 +133,17 @@ probe_failed:
driver_sysfs_remove(dev);
dev->driver = NULL;
- if (ret == -ENODEV || ret == -ENXIO) {
- /* Driver matched, but didn't support device
- * or device not found.
- * Not an error; keep going.
- */
- ret = 0;
- } else {
+ if (ret != -ENODEV && ret != -ENXIO) {
/* driver matched but the probe failed */
printk(KERN_WARNING
"%s: probe of %s failed with error %d\n",
drv->name, dev->bus_id, ret);
}
+ /*
+ * Ignore errors returned by ->probe so that the next driver can try
+ * its luck.
+ */
+ ret = 0;
done:
kfree(data);
atomic_dec(&probe_count);
^ permalink raw reply [flat|nested] 2+ messages in thread* [Patch 4/7] driver core: Don't stop probing on ->probe errors.
@ 2006-11-27 9:35 Cornelia Huck
0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2006-11-27 9:35 UTC (permalink / raw)
To: Greg K-H; +Cc: Andrew Morton, linux-kernel
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Don't stop on the first ->probe error that is not -ENODEV/-ENXIO.
There might be a driver registered returning an unresonable return code, and
this stops probing completely even though it may make sense to try the next
possible driver. At worst, we may end up with an unbound device.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
drivers/base/dd.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
--- linux-2.6-CH.orig/drivers/base/dd.c
+++ linux-2.6-CH/drivers/base/dd.c
@@ -136,18 +136,17 @@ probe_failed:
driver_sysfs_remove(dev);
dev->driver = NULL;
- if (ret == -ENODEV || ret == -ENXIO) {
- /* Driver matched, but didn't support device
- * or device not found.
- * Not an error; keep going.
- */
- ret = 0;
- } else {
+ if (ret != -ENODEV && ret != -ENXIO) {
/* driver matched but the probe failed */
printk(KERN_WARNING
"%s: probe of %s failed with error %d\n",
drv->name, dev->bus_id, ret);
}
+ /*
+ * Ignore errors returned by ->probe so that the next driver can try
+ * its luck.
+ */
+ ret = 0;
done:
kfree(data);
atomic_dec(&probe_count);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-27 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-27 11:36 [Patch 4/7] driver core: Don't stop probing on ->probe errors Cornelia Huck
2006-11-27 9:35 Cornelia Huck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®