]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
scsi: hpsa: do not get enclosure info for external devices
authorDon Brace <don.brace@microsemi.com>
Thu, 4 May 2017 22:50:50 +0000 (17:50 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:48:00 +0000 (20:48 -0400)
external shelves do not support BMICs.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 73daace478cb4f70e9d97902c433aa30b383d407..8e22aed09adbb4f3ee27d3b0d2bb4670e18d7397 100644 (file)
@@ -3353,6 +3353,11 @@ static void hpsa_get_enclosure_info(struct ctlr_info *h,
 
        bmic_device_index = GET_BMIC_DRIVE_NUMBER(&rle->lunid[0]);
 
+       if (encl_dev->target == -1 || encl_dev->lun == -1) {
+               rc = IO_OK;
+               goto out;
+       }
+
        if (bmic_device_index == 0xFF00 || MASKED_DEVICE(&rle->lunid[0])) {
                rc = IO_OK;
                goto out;