From patchwork Mon Apr 24 09:22:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 9695911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C1520601E9 for ; Mon, 24 Apr 2017 09:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B066B26224 for ; Mon, 24 Apr 2017 09:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A410927FA6; Mon, 24 Apr 2017 09:22:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AE6226224 for ; Mon, 24 Apr 2017 09:22:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1167930AbdDXJWg (ORCPT ); Mon, 24 Apr 2017 05:22:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:41121 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1167840AbdDXJWg (ORCPT ); Mon, 24 Apr 2017 05:22:36 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 96952AC06; Mon, 24 Apr 2017 09:22:34 +0000 (UTC) From: Hannes Reinecke To: "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , Johannes Thumshirn , linux-scsi@vger.kernel.org, Hannes Reinecke , Hannes Reinecke Subject: [PATCH] mpt: Move scsi_remove_host() out of mptscsih_remove_host() Date: Mon, 24 Apr 2017 11:22:32 +0200 Message-Id: <1493025752-19963-1-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit c5ce0ab ("scsi: sas: move scsi_remove_host call...") moved the call to scsi_remove_host() into sas_remove_host(), but forgot to modify the mpt drivers. Fixes: c5ce0ab ("scsi: sas: move scsi_remove_host call into sas_remove_host") Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/message/fusion/mptfc.c | 7 ++++++- drivers/message/fusion/mptscsih.c | 2 -- drivers/message/fusion/mptspi.c | 10 +++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 98eafae..d065062 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -1329,7 +1329,7 @@ WQ_MEM_RECLAIM); if (!ioc->fc_rescan_work_q) { error = -ENOMEM; - goto out_mptfc_probe; + goto out_mptfc_host; } /* @@ -1351,6 +1351,9 @@ return 0; +out_mptfc_host: + scsi_remove_host(sh); + out_mptfc_probe: mptscsih_remove(pdev); @@ -1530,6 +1533,8 @@ static void mptfc_remove(struct pci_dev *pdev) } } + scsi_remove_host(ioc->sh); + mptscsih_remove(pdev); } diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 08a807d..6ba07c7 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -1176,8 +1176,6 @@ static int mptscsih_get_completion_code(MPT_ADAPTER *ioc, MPT_SCSI_HOST *hd; int sz1; - scsi_remove_host(host); - if((hd = shost_priv(host)) == NULL) return; diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 031e088..9a336a1 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -1548,11 +1548,19 @@ static void mpt_dv_raid(struct _MPT_SCSI_HOST *hd, int disk) return error; } +static void mptspi_remove(struct pci_dev *pdev) +{ + MPT_ADAPTER *ioc = pci_get_drvdata(pdev); + + scsi_remove_host(ioc->sh); + mptscsih_remove(pdev); +} + static struct pci_driver mptspi_driver = { .name = "mptspi", .id_table = mptspi_pci_table, .probe = mptspi_probe, - .remove = mptscsih_remove, + .remove = mptspi_remove, .shutdown = mptscsih_shutdown, #ifdef CONFIG_PM .suspend = mptscsih_suspend,