]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
hpsa: do not get enclosure info for external devices
authorDon Brace <don.brace@microsemi.com>
Fri, 6 May 2016 19:13:53 +0000 (12:13 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 22 May 2016 21:50:10 +0000 (14:50 -0700)
Stop annoying "Error, could not get enclosure information"
messages.

Reviewed-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: Justin Lindley <justin.lindley@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Orabug: 23064595
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/scsi/hpsa.c

index 38ce0e308fbefee00de3a7ff607cd4ffdcdea83b..098e8deb92122d4c8dabd88bfbd51218d2ed9090 100644 (file)
@@ -3208,8 +3208,10 @@ static void hpsa_get_enclosure_info(struct ctlr_info *h,
 
        bmic_device_index = GET_BMIC_DRIVE_NUMBER(&rle->lunid[0]);
 
-       if (bmic_device_index == 0xFF00)
+       if (bmic_device_index == 0xFF00 || MASKED_DEVICE(&rle->lunid[0])) {
+               rc = IO_OK;
                goto out;
+       }
 
        bssbp = kzalloc(sizeof(*bssbp), GFP_KERNEL);
        if (!bssbp)
@@ -4197,7 +4199,8 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
                        ncurrent++;
                        break;
                case TYPE_ENCLOSURE:
-                       hpsa_get_enclosure_info(h, lunaddrbytes,
+                       if (!this_device->external)
+                               hpsa_get_enclosure_info(h, lunaddrbytes,
                                                physdev_list, phys_dev_index,
                                                this_device);
                        ncurrent++;