* [PATCH 0/2] megaraid_sas: couple of fixes
@ 2015-11-05 15:47 Sumit Saxena
2015-11-05 15:47 ` [PATCH 1/2] megaraid_sas: Fix TAPE drive not exposed attached to PERC5 controller Sumit Saxena
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sumit Saxena @ 2015-11-05 15:47 UTC (permalink / raw)
To: linux-scsi, jbottomley, martin.petersen, thenzl; +Cc: kashyap.desai
Sumit Saxena (2):
megaraid_sas: Fix TAPE drive not exposed attached to PERC5 controller
megaraid_sas: Fix sparse warning
drivers/scsi/megaraid/megaraid_sas.h | 1 +
drivers/scsi/megaraid/megaraid_sas_base.c | 20 +++++++++++++++++---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
3 files changed, 19 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] megaraid_sas: Fix TAPE drive not exposed attached to PERC5 controller
2015-11-05 15:47 [PATCH 0/2] megaraid_sas: couple of fixes Sumit Saxena
@ 2015-11-05 15:47 ` Sumit Saxena
2015-11-05 15:47 ` [PATCH 2/2] megaraid_sas: Fix sparse warning Sumit Saxena
2015-11-09 16:07 ` [PATCH 0/2] megaraid_sas: couple of fixes Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Sumit Saxena @ 2015-11-05 15:47 UTC (permalink / raw)
To: linux-scsi, jbottomley, martin.petersen, thenzl
Cc: kashyap.desai, Sumit Saxena
DELL PERC5 controller's(device ID- 0x0015) firmware does not expose TAPE drives to driver in response of DCMD- MR_DCMD_PD_LIST_QUERY and it causes TAPE drives not be
exposed to OS when connected behind PERC5 controller. This patch will unblock scanning of TAPE drives connected behind PERC5 controller by exposing non TYPE_DISK
unconditionally. This patch should be applied on top of last 2 patch series submitted by me. Here is the links for those series-
http://marc.info/?l=linux-scsi&m=144489694505390&w=2 and http://marc.info/?l=linux-scsi&m=144102204225400&w=2
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
---
drivers/scsi/megaraid/megaraid_sas.h | 1 +
drivers/scsi/megaraid/megaraid_sas_base.c | 20 +++++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 9b918ab..86572ee 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1790,6 +1790,7 @@ struct megasas_instance {
u8 UnevenSpanSupport;
u8 supportmax256vd;
+ u8 allow_fw_scan;
u16 fw_supported_vd_count;
u16 fw_supported_pd_count;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f8d5455..dfe1a3a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1760,6 +1760,20 @@ static void megasas_set_dma_alignment(struct scsi_device *sdev)
static int megasas_slave_configure(struct scsi_device *sdev)
{
+ u16 pd_index = 0;
+ struct megasas_instance *instance;
+
+ instance = megasas_lookup_instance(sdev->host->host_no);
+ if (instance->allow_fw_scan) {
+ if (sdev->channel < MEGASAS_MAX_PD_CHANNELS &&
+ sdev->type == TYPE_DISK) {
+ pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
+ sdev->id;
+ if (instance->pd_list[pd_index].driveState !=
+ MR_PD_STATE_SYSTEM)
+ return -ENXIO;
+ }
+ }
megasas_set_dma_alignment(sdev);
/*
* The RAID firmware may require extended timeouts.
@@ -1783,9 +1797,8 @@ 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) ||
- (instance->pd_list[pd_index].driveType != TYPE_DISK)) {
+ if ((instance->allow_fw_scan || instance->pd_list[pd_index].driveState ==
+ MR_PD_STATE_SYSTEM)) {
return 0;
}
return -ENXIO;
@@ -4699,6 +4712,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
case PCI_DEVICE_ID_DELL_PERC5:
default:
instance->instancet = &megasas_instance_template_xscale;
+ instance->allow_fw_scan = 1;
break;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] megaraid_sas: Fix sparse warning
2015-11-05 15:47 [PATCH 0/2] megaraid_sas: couple of fixes Sumit Saxena
2015-11-05 15:47 ` [PATCH 1/2] megaraid_sas: Fix TAPE drive not exposed attached to PERC5 controller Sumit Saxena
@ 2015-11-05 15:47 ` Sumit Saxena
2015-11-09 16:07 ` [PATCH 0/2] megaraid_sas: couple of fixes Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Sumit Saxena @ 2015-11-05 15:47 UTC (permalink / raw)
To: linux-scsi, jbottomley, martin.petersen, thenzl
Cc: kashyap.desai, Sumit Saxena
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 72c731d..bdc2606 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1865,7 +1865,7 @@ megasas_build_syspd_fusion(struct megasas_instance *instance,
/* Want to send all IO via FW path */
pRAID_Context->VirtualDiskTgtId = cpu_to_le16(device_id);
pRAID_Context->configSeqNum = 0;
- io_request->DevHandle = le16_to_cpu(0xFFFF);
+ io_request->DevHandle = cpu_to_le16(0xFFFF);
}
cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle;
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] megaraid_sas: couple of fixes
2015-11-05 15:47 [PATCH 0/2] megaraid_sas: couple of fixes Sumit Saxena
2015-11-05 15:47 ` [PATCH 1/2] megaraid_sas: Fix TAPE drive not exposed attached to PERC5 controller Sumit Saxena
2015-11-05 15:47 ` [PATCH 2/2] megaraid_sas: Fix sparse warning Sumit Saxena
@ 2015-11-09 16:07 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2015-11-09 16:07 UTC (permalink / raw)
To: Sumit Saxena
Cc: linux-scsi, jbottomley, martin.petersen, thenzl, kashyap.desai
>>>>> "Sumit" == Sumit Saxena <sumit.saxena@avagotech.com> writes:
Applied.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-09 16:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 15:47 [PATCH 0/2] megaraid_sas: couple of fixes Sumit Saxena
2015-11-05 15:47 ` [PATCH 1/2] megaraid_sas: Fix TAPE drive not exposed attached to PERC5 controller Sumit Saxena
2015-11-05 15:47 ` [PATCH 2/2] megaraid_sas: Fix sparse warning Sumit Saxena
2015-11-09 16:07 ` [PATCH 0/2] megaraid_sas: couple of fixes Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox