aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid/megaraid_sas_base.c
diff options
context:
space:
mode:
authorsumit.saxena@avagotech.com <sumit.saxena@avagotech.com>2015-10-15 13:39:24 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2015-10-29 03:05:11 -0400
commit0d5b47a724bab0ebaaa933d6ff5e584957aaa188 (patch)
tree9af1fa5374b813ebc8b5514805ef359bf58aafb5 /drivers/scsi/megaraid/megaraid_sas_base.c
parent609fb07b2bdebe5d2c6a9da7e9d8e05155086418 (diff)
downloadlinux-stericsson-0d5b47a724bab0ebaaa933d6ff5e584957aaa188.tar.gz
megaraid_sas: Expose TAPE drives unconditionally
Expose non-disk (TAPE drive, CD-ROM) unconditionally. Cc: <stable@vger.kernel.org> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 04a1edc0afc8..00a360b8f29b 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1743,8 +1743,9 @@ static int megasas_slave_alloc(struct scsi_device *sdev)
pd_index =
(sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
sdev->id;
- if (instance->pd_list[pd_index].driveState ==
- MR_PD_STATE_SYSTEM) {
+ if ((instance->pd_list[pd_index].driveState ==
+ MR_PD_STATE_SYSTEM) ||
+ (instance->pd_list[pd_index].driveType != TYPE_DISK)) {
return 0;
}
return -ENXIO;