]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: aacraid: Fixed expander hotplug for SMART family
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Wed, 22 Feb 2017 15:23:13 +0000 (07:23 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 1 Mar 2017 13:15:21 +0000 (07:15 -0600)
BugLink: http://bugs.launchpad.net/bugs/1668726
Current driver Hotplug processing code skips over Enclosure channel,
therefore any addition/removal of expander enclosure is not processed.
Additionally device addition code relies on older device type, which
prevents the hotplug of adapter expanders.

Fixed by removing code that skips over Enclosure channels and using the
latest device type for addition or removal or enclosure expanders.

Fixes: 6223a39fe6fbbeef (scsi: aacraid: Added support for hotplug)
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from linux-next commit a56e574067c20d01d8fc74863fa187dd66da7b94)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/aacraid/commsup.c

index a2ea70d8a13ac6ef901877925ba494d4488a09b2..1994c7445b54fd4a1932b446886152f693b693f4 100644 (file)
@@ -1908,9 +1908,6 @@ static void aac_resolve_luns(struct aac_dev *dev)
        for (bus = 0; bus < AAC_MAX_BUSES; bus++) {
                for (target = 0; target < AAC_MAX_TARGETS; target++) {
 
-                       if (aac_phys_to_logical(bus) == ENCLOSURE_CHANNEL)
-                               continue;
-
                        if (bus == CONTAINER_CHANNEL)
                                channel = CONTAINER_CHANNEL;
                        else
@@ -1922,7 +1919,7 @@ static void aac_resolve_luns(struct aac_dev *dev)
                        sdev = scsi_device_lookup(dev->scsi_host_ptr, channel,
                                        target, 0);
 
-                       if (!sdev && devtype)
+                       if (!sdev && new_devtype)
                                scsi_add_device(dev->scsi_host_ptr, channel,
                                                target, 0);
                        else if (sdev && new_devtype != devtype)