megaraid_sas: Expose TAPE drives unconditionally
author[email protected] <[email protected]>
Thu, 15 Oct 2015 08:09:24 +0000 (13:39 +0530)
committerMartin K. Petersen <[email protected]>
Thu, 29 Oct 2015 07:05:11 +0000 (03:05 -0400)
Expose non-disk (TAPE drive, CD-ROM) unconditionally.

Cc: <[email protected]>
Signed-off-by: Sumit Saxena <[email protected]>
Signed-off-by: Kashyap Desai <[email protected]>
Reviewed-by: Tomas Henzl <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/megaraid/megaraid_sas_base.c

index 04a1edc0afc8ff54eb9672ae16400eb8ea111fa2..00a360b8f29b730e7de5c407b7d49e8dfd3ef914 100644 (file)
@@ -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;