From patchwork Sat Sep 30 00:34:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 9978863 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 5E8A16037F for ; Sat, 30 Sep 2017 00:35:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51508298D1 for ; Sat, 30 Sep 2017 00:35:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45D85298D5; Sat, 30 Sep 2017 00:35:00 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 B5C09298D1 for ; Sat, 30 Sep 2017 00:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbdI3Ae6 (ORCPT ); Fri, 29 Sep 2017 20:34:58 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:52637 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbdI3Ae5 (ORCPT ); Fri, 29 Sep 2017 20:34:57 -0400 Received: by mail-qt0-f193.google.com with SMTP id o52so1596032qtc.9; Fri, 29 Sep 2017 17:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WcJHBP71jRUw4bLT8Qmf7YHnfTjz9UxcbHUsvaExSNY=; b=FDFikSEfZHxt7n9oF/6ZImRLIlCsJNpMwINxk1zZkiyPjESOZJAIQmOeeOgReQ4gYo o7k3eBM3/N7PL+szC6OX/1mj0fmDgyTGBEaFr1cPTYI7ENkxzke+qHzwCl7bnNu++9X3 uwJOwfYl/YjeKIe+7kX+IYtWNYgTrA7Wl5zL3pUoO8EsZlIrAUGNP82w3/ShnwWUwlmU JgzvtNl0L9bGFO+Fvj0d7Krz9CGQZVj41T3xyBVVlrX37CMEeXue407m5L9mg6vbvw34 q6C0lKtn/0KQlYD1VqZ6p8VNVLSBbliVeoy3nWbxVvO5GgahCLKUcjLv/OKKFNio4Bbr vE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WcJHBP71jRUw4bLT8Qmf7YHnfTjz9UxcbHUsvaExSNY=; b=hQP7gxczquc+0E3gd5Zy7owTQxgFT8LFHDJatW27gnKA3WaZtJ0ZXeMGLQRFUsu9+m SSxGS42FCJDsqveGKA2UYCFEHETo6Ppuehc83is6LSuZjtlcOYinsQSrWqVZGlZQ/4kv tvc0AeS0mMft22SKIiPhm04FZcYGU/pYnhHk1ntp0OGntSa99v3EG44bTgEXNZF3a5zF A1c5Xf+la5cpXhX/4Y5PqvWfHnKkzKA/CM7i6STynG68Z8Tcd5A9Mn2fTrCMwvXLPOOg kRZUBLyqcY+E7bplDTxPks5NHcDfeNKBSkcxOB4NSTZvjUIAZ7Bwz/hPXVqRyNBQ9HYk grfg== X-Gm-Message-State: AMCzsaWfTD+Bl5rGXAml3m1UMq6S8dRss9tJxxVB09qYPhuvMEQmv7Cw 1qZsasqY5uEg/QHFElRU3Kp1Iw== X-Google-Smtp-Source: AOwi7QCWVWlVXzbv21hcfXKXqYyo+EkiWRikcOq1SVdK5OQhcErvVz5DNffVZNeApb06Mf3cY7iPrA== X-Received: by 10.237.62.79 with SMTP id m15mr8914953qtf.244.1506731696237; Fri, 29 Sep 2017 17:34:56 -0700 (PDT) Received: from pallmd1.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id u32sm3596918qte.25.2017.09.29.17.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Sep 2017 17:34:55 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: Dick Kennedy , stable@vger.kernel.org, James Smart Subject: [PATCH v2 01/21] lpfc: fix pci hot plug crash in timer management routines Date: Fri, 29 Sep 2017 17:34:27 -0700 Message-Id: <20170930003447.10747-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170930003447.10747-1-jsmart2021@gmail.com> References: <20170930003447.10747-1-jsmart2021@gmail.com> 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 From: Dick Kennedy During pci hot plug, the kernel crashes in timer management code. The sli4 remove_one handler is not stoping the timers as it starts to remove the port so that it can be swapped. Fix: Stop the timers early in the handler routine. Note: Fix in SLI-4 only. SLI-3 already stopped the timers properly. Cc: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- v2: original v1 hot plug patch split into 2 patches drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 7e7ae786121b..1773b9ce3149 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -11419,6 +11419,7 @@ lpfc_pci_remove_one_s4(struct pci_dev *pdev) lpfc_debugfs_terminate(vport); lpfc_sli4_hba_unset(phba); + lpfc_stop_hba_timers(phba); spin_lock_irq(&phba->hbalock); list_del_init(&vport->listentry); spin_unlock_irq(&phba->hbalock);