From patchwork Wed May 2 15:56:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 134838 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp846213lji; Wed, 2 May 2018 08:57:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSwkVF4BOwFVYaj/gyJppBFcCTKz5zbpIKIHxbhFFm8yIZAvmQHbczRLCPQFrS1lBBmNR/ X-Received: by 2002:a63:7253:: with SMTP id c19-v6mr16594816pgn.425.1525276651103; Wed, 02 May 2018 08:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525276651; cv=none; d=google.com; s=arc-20160816; b=Jz9rSuCkhn0W0QsJJ9JATyEa7QexepYEmMKIwzuMwQG/b8TNhFJb8mt3YVPyfj/nGr 3oFGbZBD9yGgwDUXeYN/Ch//tRbmd7yzziLY3mmtPrOc8wtaT1k+Pd6terLo+1ik5Knx ILsx4+vcPo7zS9hipLat0/kwNmrauHPfSgliKEkC/mwcUBThOAGmi4noNeIzx+rMut+U qPGp+uWhnoTE+ROfRxU+wVCXOYZqGfuDPV8w2CTdx/K+YVAMDOcIy6hEyy034NVrEgJD oLeZN50Us5NRA5ZKkS2c+6bF0n5sQcnD4q31uGSX+gMHq0/Ru1Yu05sJ83k7WW6scwkr jB/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=jVqhfTpeyIf5RIEg0vsbtReEVrre3TCEGoXC7puwtF4=; b=ZxtoURx+8qxwIFjbxn/z/eclPyttMTAXI1ybv7LAE6E/x4E6j+kka/RxPQ5D4aeoOT 78IEoztl5RbY0KxAdVK0SR4oXilXAHHw6kIQlgmd+NJMHynghoKQsaf3NaarCwJ4lckv hfLoacseQeJqdULzeFKqnHLN35B9CIrBFrVT4jlSgM40WFEQmczFpPY5mpN4F2dNylyu IDps7cdoRYevy1EEzJylDRWkJaDTUXhQEonO2Xe91QLQEBusq/3qNE5mBzhvcBPLdXPG Oa9e4TWkouF4EJEkWyEaF2iW/plyxn1x2hvW7mHqMtH+HJ/Vr0u0TAtKvcv4RNl6d2fb PORQ== 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 x10si11891253pfh.85.2018.05.02.08.57.30; Wed, 02 May 2018 08:57:31 -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 S1752014AbeEBP53 (ORCPT + 29 others); Wed, 2 May 2018 11:57:29 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:54548 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751138AbeEBP51 (ORCPT ); Wed, 2 May 2018 11:57:27 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id ED3FB84BE6AC6; Wed, 2 May 2018 23:57:23 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.361.1; Wed, 2 May 2018 23:57:17 +0800 From: John Garry To: , CC: , , , John Garry , "Xiaofei Tan" Subject: [PATCH 06/11] scsi: hisi_sas: stop controller timer for reset Date: Wed, 2 May 2018 23:56:29 +0800 Message-ID: <1525276594-92173-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525276594-92173-1-git-send-email-john.garry@huawei.com> References: <1525276594-92173-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should only have the timer enabled after PHY up after controller reset, so disable prior to reset. Signed-off-by: John Garry Signed-off-by: Xiaofei Tan --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 24416bb..1f27f84 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1130,6 +1130,9 @@ static int hisi_sas_controller_reset(struct hisi_hba *hisi_hba) old_state = hisi_hba->hw->get_phys_state(hisi_hba); scsi_block_requests(shost); + if (timer_pending(&hisi_hba->timer)) + del_timer_sync(&hisi_hba->timer); + set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); rc = hisi_hba->hw->soft_reset(hisi_hba); if (rc) {