[PATCH 4.2.y-ckt 065/211] megaraid_sas: Expose TAPE drives unconditionally

From: Kamal Mostafa
Date: Tue Jan 05 2016 - 15:35:32 EST


4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.

------------------

From: "sumit.saxena@xxxxxxxxxxxxx" <sumit.saxena@xxxxxxxxxxxxx>

commit 0d5b47a724bab0ebaaa933d6ff5e584957aaa188 upstream.

Expose non-disk (TAPE drive, CD-ROM) unconditionally.

Signed-off-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxxx>
Signed-off-by: Kashyap Desai <kashyap.desai@xxxxxxxxxxxxx>
Reviewed-by: Tomas Henzl <thenzl@xxxxxxxxxx>
Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Kamal Mostafa <kamal@xxxxxxxxxxxxx>
---
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 71b884d..55d17e7 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1671,8 +1671,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;
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/