From: Scott Teel Date: Fri, 9 Sep 2016 21:30:36 +0000 (-0500) Subject: scsi: hpsa: Prevent sending bmic commands to externals X-Git-Tag: v4.9-rc1~95^2~29 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b6e5597f4c9ae545a1bd18e830d9f6b4465cadd;p=karo-tx-linux.git scsi: hpsa: Prevent sending bmic commands to externals Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 5d25e8db281c..82b277be6bf1 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -4072,7 +4072,17 @@ static void hpsa_get_ioaccel_drive_info(struct ctlr_info *h, struct bmic_identify_physical_device *id_phys) { int rc; - struct ext_report_lun_entry *rle = &rlep->LUN[rle_index]; + struct ext_report_lun_entry *rle; + + /* + * external targets don't support BMIC + */ + if (dev->external) { + dev->queue_depth = 7; + return; + } + + rle = &rlep->LUN[rle_index]; dev->ioaccel_handle = rle->ioaccel_handle; if ((rle->device_flags & 0x08) && dev->ioaccel_handle)