summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorDon Brace <don.brace@microsemi.com>2017-05-05 00:50:50 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-13 02:48:00 +0200
commit5ac517b8a2c592a3a6e3928de7b868c52b200444 (patch)
tree98680afe8b660b274d005eb3b475d44ec5f551ed /drivers/scsi/hpsa.c
parentscsi: hpsa: update identify physical device structure (diff)
downloadlinux-5ac517b8a2c592a3a6e3928de7b868c52b200444.tar.xz
linux-5ac517b8a2c592a3a6e3928de7b868c52b200444.zip
scsi: hpsa: do not get enclosure info for external devices
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>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 73daace478cb..8e22aed09adb 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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;