From: sumit.saxena@avagotech.com Date: Thu, 15 Oct 2015 08:09:24 +0000 (+0530) Subject: megaraid_sas: Expose TAPE drives unconditionally X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0d5b47a724bab0ebaaa933d6ff5e584957aaa188;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;