From patchwork Wed May 29 09:58:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 165366 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9655692ili; Wed, 29 May 2019 03:00:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyewX2uxurP+STNS7tc95MTes6HaP4CwVASyH/Cjpux5AfChHnYbHbQv9H2I87kKxwgPY20 X-Received: by 2002:aa7:9115:: with SMTP id 21mr119563175pfh.14.1559124032750; Wed, 29 May 2019 03:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559124032; cv=none; d=google.com; s=arc-20160816; b=KYBZt/hfRx7MgijAaDTopcepRfzE1D8ehnAE4eMQ4p7WmR4C86tnUFPAiaYzeugh3q XAI1qSPdZiAod+a/XabRCJ8LiBaXIUGcJoEQ7u7k0KotiEvnf283qklavzeKGAlr5vHU WI1+ePauFoliNkWEnrtr1vfDPOfi42k6xSB7BTsuiYlOg7If4Kic86CnklgDrXMk0qOZ Kw+jtBPeXjWIg8fAQ3pxpbVWQGRjXfHeAr29lUlmXCFYE10UeJ9L1N7jwwcMtfgxhYmr CeuQ2TYEFKI2o0U1Xu+LZiTLXQjsoDxw1tw30QMogpwYW3YKJEuxR/X7E6lbqjhQrqdP MaOQ== 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; bh=mlUeci07ifz48zPWr6VNKuIlm3xoReYWQS99J8NNBaY=; b=WlRY+xFL5xkeRY3TtNU+QjZ7MdkhJ7rRARGX9sBkaUbexcgBPh3YlOWvYSz5/JUc7Y 9kYSP+MYk2FJNYQYSNTJ1E3s6GZFdWakgEPdpoeop1lfU/sUVZrMovdqgc/qEFZRm3Bn Ejbrtxvkhup1relUWjMLun79ZGGmk+fo6orfHUO9bGl7tTOefT2gsXRFBtLw/0oWy3Lr 60RoGAb2+j3kxObp23itS6jI9EZxeiqYxUhP0YuolgdM49xC+axWSVSJUP6xkX54UTPp dLZm+ihdpxhizXdjU7H+OyzOeRdqiRsGBsRjLkJm9q+UqpN4QFQEL0/QfgjteoPMHEgO KZSg== 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 d23si24713060pgv.513.2019.05.29.03.00.32; Wed, 29 May 2019 03:00:32 -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 S1726326AbfE2KA1 (ORCPT + 30 others); Wed, 29 May 2019 06:00:27 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57564 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726054AbfE2KAX (ORCPT ); Wed, 29 May 2019 06:00:23 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9B490CFF3ED112421722; Wed, 29 May 2019 18:00:18 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Wed, 29 May 2019 18:00:10 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 1/6] scsi: hisi_sas: Delete PHYs' timer when rmmod or probe failed Date: Wed, 29 May 2019 17:58:42 +0800 Message-ID: <1559123927-160502-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1559123927-160502-1-git-send-email-john.garry@huawei.com> References: <1559123927-160502-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 From: Xiang Chen When removing the driver or for when probe fails, we need to delete PHY's timer. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 8a7feb8ed8d6..256f93e6f89f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -2480,6 +2480,14 @@ EXPORT_SYMBOL_GPL(hisi_sas_alloc); void hisi_sas_free(struct hisi_hba *hisi_hba) { + int i; + + for (i = 0; i < hisi_hba->n_phy; i++) { + struct hisi_sas_phy *phy = &hisi_hba->phy[i]; + + del_timer_sync(&phy->timer); + } + if (hisi_hba->wq) destroy_workqueue(hisi_hba->wq); }