From 0d5b47a724bab0ebaaa933d6ff5e584957aaa188 Mon Sep 17 00:00:00 2001 From: "sumit.saxena@avagotech.com" Date: Thu, 15 Oct 2015 13:39:24 +0530 Subject: [PATCH] megaraid_sas: Expose TAPE drives unconditionally Expose non-disk (TAPE drive, CD-ROM) unconditionally. Cc: Signed-off-by: Sumit Saxena Signed-off-by: Kashyap Desai Reviewed-by: Tomas Henzl Reviewed-by: Martin K. Petersen Signed-off-by: Martin K. Petersen --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 +++-- 1 file 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; -- 2.20.1