From patchwork Tue Apr 27 17:51:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 12227097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0426CC433ED for ; Tue, 27 Apr 2021 17:54:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5AB2C60FDB for ; Tue, 27 Apr 2021 17:54:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AB2C60FDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uMWSzzhRzlHyqHgeaa7PLiOha0hdJHvIl+NZwt6rGzQ=; b=W+/vZ1XgP2gTa1CH+8bsHir7Kg d+SkuZ+rixN0oDAMGMM+/a/MEMV2AJlBMyQPsq/64AyslnfXMYkgO32mwolVcoa8tG18A3U8uvtYM 4+znC23qg3/nFFVNtjq4FXaGKeTo5uYMcW4990ElzfZAE9RcvFbbndVAzHdrFJbL61xkYoXB8330h 1XSC2kzO4iatYswN6UyI1LNspuAA4xMmSLj2rUPaum3X80a+tjmMkMZLyvh2U1KB3eJSmbHi2L3fA l/aTk+/AYT4xLWJcS0pYzjbtJu10jLcUvvCO84lKO9XLlQiiaoOyxI7wCk2/n+Hr8AwEMCizsy/J/ o+wrUkEA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbRt8-001zYK-HD; Tue, 27 Apr 2021 17:52:46 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbRsO-001zQx-D4; Tue, 27 Apr 2021 17:52:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jiipAsdDAcWlKdQjKY9n5M1r8f05IAR9cMGWFIS34F0=; b=D9QC0hm6UNLIKEfqyNcBUdrJu9 qnWgZg+JONIOO572mIt1DGx6HAsDzdqgNM4TdiO95rM18er9NNkx0g/Z32zTs4FitvSnyfW3iCmRr xTsYVnB02BIsVrOpGhMQNzAgOaqbb58S7myOKeICtDtBx40CyquPfafx+R5ILF3gktJwlREfbdJrh aCCHA4TwU+2ljHi8y+MT49B/G7KxjhfksrTbnLnZjp8U8dwu+iRUjStzzGeFEBhZmZyP36bQbmAi8 fI+kmpLpnwmLz8QijMEZIiP6RJPyPoHS0tFjNjNtkK38xUX/Ja4NDg34FvWgv+94RA6srNwH8sG85 z1IAP8bg==; Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbRsM-00Gtmd-0b; Tue, 27 Apr 2021 17:51:59 +0000 Received: by mail-pj1-x1034.google.com with SMTP id y22-20020a17090a8b16b0290150ae1a6d2bso7684062pjn.0; Tue, 27 Apr 2021 10:51:57 -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=jiipAsdDAcWlKdQjKY9n5M1r8f05IAR9cMGWFIS34F0=; b=hPMjlmoOuIUZ3C5DGZchaD2tsGt5B76Llw9rbAkVaizKoIZgvw060WzJHMt5oKMjbu LGiYJRjTQojS9n8vI/CfsucS9s42iSiunAazCphzMnAtGiP0Jry8hx2C6+Q5bOIuU53+ 3gSLZ6aPTYQq3tHZG2OCFZuWEXK25fouBZudK0lfifTD9Omyj2w3nZPKV/Z/Sh9E9Ytz HkQNM9ItJh/s6boqBuzxR+Pliqara/Yl5PF+cCUEuuQA3K9CL+2zAG+OOLy2sTEePvi3 4DycYR42e4mJ0XkwCb2TVnqUBmkwBqPet2Yh+yCayLN9RD6B9Ww8Vz0Iy8nF9IxYitgU eR3A== 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=jiipAsdDAcWlKdQjKY9n5M1r8f05IAR9cMGWFIS34F0=; b=l7448WTPKlusRREtGRa5SLJfeuMd6O6vmkoqPFi/NiQy5zLM+D48DhK6ZI5SxC8C8v AljpdJHd/U8L9ZGot1O6DH7z0egurV2FkbVttWcfkBlIMEHshz2hxK8+y0humkoZpECn 6dKEQDrZ2lVr5FyLt60FDWdm2hYzgaRfY0VNy8eUONo/DpzwAzwPnHRov3Y6VelnK88K zHcePuQAZ9PRlYi/yvqGyIewOB1R+yzD3dGJEPMgoQJyP7oA5Ej1OLkFbV5RbuvdebNK yU9Du3XLcf94y5CNQvb8rUEkRYurPP/XErL3/oQF+odAxVrJigOLi2Eg5fn7B6Fr9MiL F6Ng== X-Gm-Message-State: AOAM53080j3yJRViMuJGaGC6OPntzwVRoSSJgLsWoxSqroWpCGuVds5i AOUPSchkDRBxAfbV80gVUoA= X-Google-Smtp-Source: ABdhPJynTAfXzItwN2Cr+tVlU0GDgflTrBaY3jF7/6SbzWDHNNgu/uH9c/JnVpRZbze56TA1Eqx1IA== X-Received: by 2002:a17:90a:a60b:: with SMTP id c11mr28260596pjq.125.1619545917681; Tue, 27 Apr 2021 10:51:57 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id h21sm2456833pfo.211.2021.04.27.10.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 10:51:57 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Bjorn Helgaas , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com Cc: Jim Quinlan , Nicolas Saenz Julienne , Lorenzo Pieralisi , Rob Herring , Florian Fainelli , linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 4/4] PCI: brcmstb: add shutdown call to driver Date: Tue, 27 Apr 2021 13:51:39 -0400 Message-Id: <20210427175140.17800-5-jim2101024@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210427175140.17800-1-jim2101024@gmail.com> References: <20210427175140.17800-1-jim2101024@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_105158_072508_FEBD056C X-CRM114-Status: GOOD ( 14.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The shutdown() call is similar to the remove() call except the former does not need to invoke pci_{stop,remove}_root_bus(), and besides, errors occur if it does. Signed-off-by: Jim Quinlan Acked-by: Florian Fainelli --- drivers/pci/controller/pcie-brcmstb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index d3af8d84f0d6..a1fe1a2ada48 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1340,6 +1340,15 @@ static int brcm_pcie_remove(struct platform_device *pdev) return 0; } +static void brcm_pcie_shutdown(struct platform_device *pdev) +{ + struct brcm_pcie *pcie = platform_get_drvdata(pdev); + + if (pcie->has_err_report) + brcm_unregister_die_notifiers(pcie); + __brcm_pcie_remove(pcie); +} + static const struct of_device_id brcm_pcie_match[] = { { .compatible = "brcm,bcm2711-pcie", .data = &bcm2711_cfg }, { .compatible = "brcm,bcm4908-pcie", .data = &bcm4908_cfg }, @@ -1460,6 +1469,7 @@ static const struct dev_pm_ops brcm_pcie_pm_ops = { static struct platform_driver brcm_pcie_driver = { .probe = brcm_pcie_probe, .remove = brcm_pcie_remove, + .shutdown = brcm_pcie_shutdown, .driver = { .name = "brcm-pcie", .of_match_table = brcm_pcie_match,