From patchwork Fri Mar 23 16:05:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 132352 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp778427ljb; Fri, 23 Mar 2018 09:07:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELt/kmPOCe6sWxX6L9etOlgS153kN8BmL33B2T4vewuIAN00ebafMKQOSgx3LsPsHzNl57yi X-Received: by 10.98.57.143 with SMTP id u15mr24513825pfj.79.1521821254201; Fri, 23 Mar 2018 09:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521821254; cv=none; d=google.com; s=arc-20160816; b=F2HFgykRv+CQOyGpLK0H6nOidpsNzHTzBNiBCYdpngSFdLSjEG7PJLEwMdByp1gvZY KR9/jPZfHC4BBHE2Jcc2wTFHv9Nj8NL9CNksBMlWO1CU4eq97R/brFNkV4SYyd+TFJVe sz8eXkkK69XBGnn2fBVcZAxYr9oIycLihkhSTQXWH4t0NzA95P44lzfmV3Xc7EjgOuIv N4uAuxXUimQNAUv2u0h03ZpAUWJfJIbxj3PqCKe7qNpqmes7FrXEOZ7ngFPWyDQFiXIb 3/nN8LCllyI7+3BaPp0BszyoGYho5wpRuvL3rhmwionNi9xNdQ/WtTKE8Cgvpnw5VYhH r0bA== 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=qxziBHC9vfOOtOQZYh8XMBDpvpTRaj/yQZpaWAv8mOM=; b=vCJ+KR+8DbZUAW3npxDbJT3+1UzQxackYtnSmNZi8vP/a3khtIOmIpvxxVHQNW6V+t q3W5i5Zcsokfj5jR5quLPJvZm4mAnyFJyOxTW6+Y28mUHpABCP7I+R1VmDD5qODnbfIQ oZKHw+Fa2wmYbyXjKMECTBerj8vnFkAIV+iAnfM/zb8dzrqrmfxKdIHo+bHIKDhzghGX DYuqdfPrZwvhg3Rrj1FxC/pnpnRiOGXDhlQeRx9ucMlwEfur3WAyIs2aAZKO1MLIxTlh TKdySfgRYr8FfQilYN4ZJaQDHwxm9uK3tlO8MLRXdLNayfEstnJW93aVPfM64HcuZ7td DOPQ== 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 v23-v6si8407309plo.276.2018.03.23.09.07.33; Fri, 23 Mar 2018 09:07:34 -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 S1752465AbeCWQHb (ORCPT + 28 others); Fri, 23 Mar 2018 12:07:31 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6688 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752019AbeCWQGI (ORCPT ); Fri, 23 Mar 2018 12:06:08 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D58511D8D22F5; Sat, 24 Mar 2018 00:05:50 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.361.1; Sat, 24 Mar 2018 00:05:45 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 3/8] scsi: hisi_sas: delete timer when removing hisi_sas driver Date: Sat, 24 Mar 2018 00:05:10 +0800 Message-ID: <1521821115-120040-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521821115-120040-1-git-send-email-john.garry@huawei.com> References: <1521821115-120040-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 Delete timer for v1 and v3 hw when removing hisi_sas driver. Signed-off-by: Xiang chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 49c1fa6..a216795 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -2177,6 +2177,9 @@ int hisi_sas_remove(struct platform_device *pdev) struct hisi_hba *hisi_hba = sha->lldd_ha; struct Scsi_Host *shost = sha->core.shost; + if (timer_pending(&hisi_hba->timer)) + del_timer(&hisi_hba->timer); + sas_unregister_ha(sha); sas_remove_host(sha->core.shost); diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 89b9505..bed6afb 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3599,9 +3599,6 @@ static int hisi_sas_v2_remove(struct platform_device *pdev) struct sas_ha_struct *sha = platform_get_drvdata(pdev); struct hisi_hba *hisi_hba = sha->lldd_ha; - if (timer_pending(&hisi_hba->timer)) - del_timer(&hisi_hba->timer); - hisi_sas_kill_tasklets(hisi_hba); return hisi_sas_remove(pdev); diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index df5414a..efe64bc 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2183,6 +2183,9 @@ static void hisi_sas_v3_remove(struct pci_dev *pdev) struct hisi_hba *hisi_hba = sha->lldd_ha; struct Scsi_Host *shost = sha->core.shost; + if (timer_pending(&hisi_hba->timer)) + del_timer(&hisi_hba->timer); + sas_unregister_ha(sha); sas_remove_host(sha->core.shost);