Skip to contentSkip to conversation

Patch "scsi: ignore errors from scsi_dh_add_device()" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Aug 14, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

scsi: ignore errors from scsi_dh_add_device()

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
scsi-ignore-errors-from-scsi_dh_add_device.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 221255aee67ec1c752001080aafec0c4e9390d95 Mon Sep 17 00:00:00 2001

From: Hannes Reinecke <[email protected]>
Date: Tue, 1 Dec 2015 10:16:42 +0100
Subject: scsi: ignore errors from scsi_dh_add_device()

From: Hannes Reinecke <[email protected]>

commit 221255aee67ec1c752001080aafec0c4e9390d95 upstream.

device handler initialisation might fail due to a number of reasons. But as device_handlers are optional this shouldn't cause us to disable the device entirely.
So just ignore errors from scsi_dh_add_device().

---
 drivers/scsi/scsi_sysfs.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/scsi/scsi_sysfs.c +4 -3
@@ -1058,11 +1058,12 @@ int scsi_sysfs_add_sdev(struct scsi_devi
 	}
 
 	error = scsi_dh_add_device(sdev);
-	if (error) {
+	if (error)
+		/*
+		 * device_handler is optional, so any error can be ignored
+		 */
 		sdev_printk(KERN_INFO, sdev,
 				"failed to add device handler: %d\n", error);
-		return error;
-	}
 
 	device_enable_async_suspend(&sdev->sdev_dev);
 	error = device_add(&sdev->sdev_dev);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/scsi-ignore-errors-from-scsi_dh_add_device.patch