+ driver-core-dont-stop-probing-on-probe-errors.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     driver core: Don't stop probing on ->probe errors
has been added to the -mm tree.  Its filename is
     driver-core-dont-stop-probing-on-probe-errors.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: driver core: Don't stop probing on ->probe errors
From: Cornelia Huck <cornelia.huck@xxxxxxxxxx>

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@xxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/base/dd.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -puN drivers/base/dd.c~driver-core-dont-stop-probing-on-probe-errors drivers/base/dd.c
--- a/drivers/base/dd.c~driver-core-dont-stop-probing-on-probe-errors
+++ a/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);
_

Patches currently in -mm which might be from cornelia.huck@xxxxxxxxxx are

driver-core-fixes-make_class_name-retval-checks.patch
driver-core-fixes-sysfs_create_link-retval-checks-in.patch
driver-core-fixes-device_register-retval-check-in.patch
driver-core-dont-stop-probing-on-probe-errors.patch
driver-core-change-function-call-order-in.patch
driver-core-per-subsystem-multithreaded-probing.patch
driver-core-dont-fail-attaching-the-device-if-it.patch
cpu-topology-consider-sysfs_create_group-return-value.patch
git-s390.patch
tty-switch-to-ktermios-sclp-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux