From: Don Brace Date: Fri, 6 May 2016 19:13:53 +0000 (-0700) Subject: hpsa: do not get enclosure info for external devices X-Git-Tag: v4.1.12-92~161^2~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ea51980831d112fceaeba372476d958b402dc672;p=users%2Fjedix%2Flinux-maple.git hpsa: do not get enclosure info for external devices Stop annoying "Error, could not get enclosure information" messages. Reviewed-by: Mahesh Rajashekhara Reviewed-by: Justin Lindley Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Matthew R. Ochs Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Orabug: 23064595 Signed-off-by: Manjunath Govindashetty --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 38ce0e308fbe..098e8deb9212 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -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++;