forked from rpms/kernel
		
	Ignore errors from scsi_dh_add_device (rhbz 1288687)
This commit is contained in:
		
							parent
							
								
									a507ce8c82
								
							
						
					
					
						commit
						5f9495db8b
					
				
							
								
								
									
										41
									
								
								alua_fix.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								alua_fix.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,41 @@ | |||||||
|  | From 221255aee67ec1c752001080aafec0c4e9390d95 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Hannes Reinecke <hare@suse.de> | ||||||
|  | Date: Tue, 1 Dec 2015 10:16:42 +0100 | ||||||
|  | Subject: scsi: ignore errors from scsi_dh_add_device() | ||||||
|  | 
 | ||||||
|  | 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(). | ||||||
|  | 
 | ||||||
|  | Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> | ||||||
|  | Reviewed-by: Christoph Hellwig <hch@lst.de> | ||||||
|  | Signed-off-by: Hannes Reinecke <hare@suse.de> | ||||||
|  | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | ||||||
|  | ---
 | ||||||
|  |  drivers/scsi/scsi_sysfs.c | 7 ++++--- | ||||||
|  |  1 file changed, 4 insertions(+), 3 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
 | ||||||
|  | index fc3cd26..d015374 100644
 | ||||||
|  | --- a/drivers/scsi/scsi_sysfs.c
 | ||||||
|  | +++ b/drivers/scsi/scsi_sysfs.c
 | ||||||
|  | @@ -1120,11 +1120,12 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
 | ||||||
|  |  	} | ||||||
|  |   | ||||||
|  |  	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); | ||||||
|  | -- 
 | ||||||
|  | cgit v0.11.2 | ||||||
|  | 
 | ||||||
| @ -594,6 +594,9 @@ Patch570: HID-multitouch-enable-palm-rejection-if-device-imple.patch | |||||||
| #rhbz 1286293 | #rhbz 1286293 | ||||||
| Patch571: ideapad-laptop-Add-Lenovo-ideapad-Y700-17ISK-to-no_h.patch | Patch571: ideapad-laptop-Add-Lenovo-ideapad-Y700-17ISK-to-no_h.patch | ||||||
| 
 | 
 | ||||||
|  | #rhbz 1288687 | ||||||
|  | Patch572: alua_fix.patch | ||||||
|  | 
 | ||||||
| # END OF PATCH DEFINITIONS | # END OF PATCH DEFINITIONS | ||||||
| 
 | 
 | ||||||
| %endif | %endif | ||||||
| @ -2037,6 +2040,9 @@ fi | |||||||
| # | # | ||||||
| #  | #  | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Dec 10 2015 Laura Abbott <labbott@redhat.com> | ||||||
|  | - Ignore errors from scsi_dh_add_device (rhbz 1288687) | ||||||
|  | 
 | ||||||
| * Thu Dec 10 2015 Laura Abbott <labbott@redhat.com> - 4.4.0-0.rc4.git3.1 | * Thu Dec 10 2015 Laura Abbott <labbott@redhat.com> - 4.4.0-0.rc4.git3.1 | ||||||
| - Linux v4.4-rc4-86-g6764e5e | - Linux v4.4-rc4-86-g6764e5e | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user