Received: by 10.213.65.68 with SMTP id h4csp296510imn; Fri, 23 Mar 2018 05:00:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELuBu1XInDMpu7oOqzl7f+2fJSjhEKDOmSb7+Ocl52VlAO/NizldoW6HoiYqriIa1CinJKhB X-Received: by 2002:a17:902:8490:: with SMTP id c16-v6mr18862468plo.132.1521806453207; Fri, 23 Mar 2018 05:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521806453; cv=none; d=google.com; s=arc-20160816; b=dByymY17e3tvzi7LslyPtAcOzjFflS9B7JLoOJsgj+pcOVc2/ZmwVzf0Xnkq8hfcFG u7eJmlrFGJwLlmYGwVbCKA7F1crkfYRF/sQhFJ0RWzOsxL91EKUZddHfeorNB0BBk7v9 vfystAyLfqYT2pre595BGPt+Yo/nGE40RJD0p/58K0YTxw9EdYSXMnyGJeLhhBlwtEF/ D1Y6hoLzmFYN8sZLYnBczjPKe6qcgRT3LaxmgOsnM/zxbSKcdMOhpic2koUvLDuBqw5h UV2u7c92Xjc8jIj0UoWYwAQpmhLI08fHL8ta72WZYep/3thwHZhTvwBvOgXW9yz3+o32 3oaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kNvhUjmmpW7bZYmGe4NJfqPdlaBTq0ehUkESxXW4lUM=; b=ibKmNdQVWOELR6aUBk/yd6yITOZ8O3ffywkyAWLMaDuXcH1/9yNWnzYMkci3psOWNG c+7EuFaaczfSJlGNEfjykn8ZR8NWhgBLc0bilQeb0m9aiPYGHheLTq/P5sVdQFLn8r+W eQdFJEina6puIiR+nVDz8bIK8Zpov0Xg9ZHvYwIKGGSnZpJSmpPBMPGTa9682HIO9tL8 k86PsJHBTrkGD/CvGOMth587qEd5qBlnCRbZ56nCDSLVVch22mR6HeF0jRRrxbEEKT97 reXHntnLeP0sOXmYYdjCUnqZ7Z4OoohA8mbILdDLXHfzA3tZjbo4xcg27n1bnggv/MKk dBgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36-v6si8634421pla.163.2018.03.23.05.00.38; Fri, 23 Mar 2018 05:00:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753572AbeCWKAT (ORCPT + 99 others); Fri, 23 Mar 2018 06:00:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36440 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753493AbeCWKAR (ORCPT ); Fri, 23 Mar 2018 06:00:17 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 694941388; Fri, 23 Mar 2018 10:00:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kashyap Desai , Shivasharan S , Hannes Reinecke , Tomas Henzl , "Martin K. Petersen" Subject: [PATCH 4.14 01/77] scsi: megaraid_sas: Do not use 32-bit atomic request descriptor for Ventura controllers Date: Fri, 23 Mar 2018 10:53:35 +0100 Message-Id: <20180323094142.319679627@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094142.260022880@linuxfoundation.org> References: <20180323094142.260022880@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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);