From: Greg Kroah-Hartman Date: Thu, 22 Mar 2018 10:24:59 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v3.18.102~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0a5fa0746d6e4c831358783f4c87417f61f7b6d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: scsi-megaraid_sas-do-not-use-32-bit-atomic-request-descriptor-for-ventura-controllers.patch --- diff --git a/queue-4.14/scsi-megaraid_sas-do-not-use-32-bit-atomic-request-descriptor-for-ventura-controllers.patch b/queue-4.14/scsi-megaraid_sas-do-not-use-32-bit-atomic-request-descriptor-for-ventura-controllers.patch new file mode 100644 index 00000000000..827760d4f98 --- /dev/null +++ b/queue-4.14/scsi-megaraid_sas-do-not-use-32-bit-atomic-request-descriptor-for-ventura-controllers.patch @@ -0,0 +1,106 @@ +From 9ff97fa8db94caeab59a3c5401e975df468b4d8e Mon Sep 17 00:00:00 2001 +From: Shivasharan S +Date: Wed, 14 Feb 2018 00:10:52 -0800 +Subject: scsi: megaraid_sas: Do not use 32-bit atomic request descriptor for Ventura controllers + +From: Shivasharan S + +commit 9ff97fa8db94caeab59a3c5401e975df468b4d8e upstream. + +Problem Statement: Sending I/O through 32 bit descriptors to Ventura series of +controller results in IO timeout on certain conditions. + +This error only occurs on systems with high I/O activity on Ventura series +controllers. + +Changes in this patch will prevent driver from using 32 bit descriptor and use +64 bit Descriptors. + +Cc: +Signed-off-by: Kashyap Desai +Signed-off-by: Shivasharan S +Reviewed-by: Hannes Reinecke +Reviewed-by: Tomas Henzl +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/megaraid/megaraid_sas_fusion.c | 42 +++++++++------------------- + 1 file changed, 14 insertions(+), 28 deletions(-) + +--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c ++++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c +@@ -190,36 +190,30 @@ inline void megasas_return_cmd_fusion(st + /** + * megasas_fire_cmd_fusion - Sends command to the FW + * @instance: Adapter soft state +- * @req_desc: 32bit or 64bit Request descriptor ++ * @req_desc: 64bit Request descriptor + * +- * Perform PCI Write. Ventura supports 32 bit Descriptor. +- * Prior to Ventura (12G) MR controller supports 64 bit Descriptor. ++ * Perform PCI Write. + */ + + static void + megasas_fire_cmd_fusion(struct megasas_instance *instance, + union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc) + { +- if (instance->is_ventura) +- writel(le32_to_cpu(req_desc->u.low), +- &instance->reg_set->inbound_single_queue_port); +- else { + #if defined(writeq) && defined(CONFIG_64BIT) +- u64 req_data = (((u64)le32_to_cpu(req_desc->u.high) << 32) | +- le32_to_cpu(req_desc->u.low)); ++ u64 req_data = (((u64)le32_to_cpu(req_desc->u.high) << 32) | ++ le32_to_cpu(req_desc->u.low)); + +- writeq(req_data, &instance->reg_set->inbound_low_queue_port); ++ writeq(req_data, &instance->reg_set->inbound_low_queue_port); + #else +- unsigned long flags; +- spin_lock_irqsave(&instance->hba_lock, flags); +- writel(le32_to_cpu(req_desc->u.low), +- &instance->reg_set->inbound_low_queue_port); +- writel(le32_to_cpu(req_desc->u.high), +- &instance->reg_set->inbound_high_queue_port); +- mmiowb(); +- spin_unlock_irqrestore(&instance->hba_lock, flags); ++ unsigned long flags; ++ spin_lock_irqsave(&instance->hba_lock, flags); ++ writel(le32_to_cpu(req_desc->u.low), ++ &instance->reg_set->inbound_low_queue_port); ++ writel(le32_to_cpu(req_desc->u.high), ++ &instance->reg_set->inbound_high_queue_port); ++ mmiowb(); ++ spin_unlock_irqrestore(&instance->hba_lock, flags); + #endif +- } + } + + /** +@@ -772,7 +766,6 @@ megasas_ioc_init_fusion(struct megasas_i + const char *sys_info; + MFI_CAPABILITIES *drv_ops; + u32 scratch_pad_2; +- unsigned long flags; + + fusion = instance->ctrl_context; + +@@ -900,14 +893,7 @@ megasas_ioc_init_fusion(struct megasas_i + break; + } + +- /* For Ventura also IOC INIT required 64 bit Descriptor write. */ +- spin_lock_irqsave(&instance->hba_lock, flags); +- writel(le32_to_cpu(req_desc.u.low), +- &instance->reg_set->inbound_low_queue_port); +- writel(le32_to_cpu(req_desc.u.high), +- &instance->reg_set->inbound_high_queue_port); +- mmiowb(); +- spin_unlock_irqrestore(&instance->hba_lock, flags); ++ megasas_fire_cmd_fusion(instance, &req_desc); + + wait_and_poll(instance, cmd, MFI_POLL_TIMEOUT_SECS); + diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..f86d90d74a7 --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1 @@ +scsi-megaraid_sas-do-not-use-32-bit-atomic-request-descriptor-for-ventura-controllers.patch diff --git a/queue-4.15/series b/queue-4.15/series new file mode 100644 index 00000000000..f86d90d74a7 --- /dev/null +++ b/queue-4.15/series @@ -0,0 +1 @@ +scsi-megaraid_sas-do-not-use-32-bit-atomic-request-descriptor-for-ventura-controllers.patch