Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4750781pxj; Tue, 25 May 2021 15:49:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsIm00/SV0Fl5E+9IriD8gwCIsCGc+y9C7KNnP4dcCI1q3X82yeUsOamo1wJUQq1lTc/mK X-Received: by 2002:aa7:c499:: with SMTP id m25mr33755677edq.109.1621982941974; Tue, 25 May 2021 15:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621982941; cv=none; d=google.com; s=arc-20160816; b=DzPWgZ1GV4SP0JaMIjPR1erufLb6S6NK/Qg3u2rgrnl54m/TWVwud9k9XufdhK+NY3 +MP448H+XBzukOJ4eA/j3d4yEPItx57UkcPb+ul3OmSZnGXpljP+fyT0y1piBvoZe53Y IHDe+aeiYAv9jlxc9Murfnl1IN2iOy5STRxncptChLMz0a3GuvsFjFsKEq114+5fp8Px gAFwYtBLDufrvrvN+j0XI59ywOK9iiYA4+iJaTN0zlpCLSXS8v16JNYdn/xGE35Wb4bq ROrArMIuol12Swup8AxkwyU94fJpF5b6YCB5NWaXZWSd89EeMo48BfwWhryO2rzppSpA ebGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=tgqrZgBopkwqpblbpRIce+uoMtu7X9Owh8X5ABOZczA=; b=1B+OdZChg7nEiziwcpDjTm8Z2v7LfPDqT3QZwxQl/STuVjbZgUf8FQFH8jWR8l5Ic4 NhPmIkOocee0aGsb1dTcnsu5WDPy035pxZB/w3IgkUSsd4niBr74OBPNwiA4iSTZXod9 poSPCGfMHJaYQ57pGB/9KQCztqtJpYKTi04zAPg5DHj0+yTUHBxwVBfnMTTsl2YB0Pqx 8mlPr9DwL94nu1SyCOTe2Q9lfOro1qUEdNk1ymkn6mR/NGi+p3rspHuPO/29oV8LsQLp GkW5TePn1ead0alS3Kuzfi77L5HzpoYVqpQ6jq7zw+QW+wohWw5/U57ppsAaX8vr8scr loqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=CmAxN01v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si15842606edw.535.2021.05.25.15.48.36; Tue, 25 May 2021 15:49:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=CmAxN01v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231947AbhEYVmM (ORCPT + 99 others); Tue, 25 May 2021 17:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231801AbhEYVmL (ORCPT ); Tue, 25 May 2021 17:42:11 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB539C061756 for ; Tue, 25 May 2021 14:40:40 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id y14so31629809wrm.13 for ; Tue, 25 May 2021 14:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tgqrZgBopkwqpblbpRIce+uoMtu7X9Owh8X5ABOZczA=; b=CmAxN01v4xOIcO1rpUVEtEIZ/PXIGH07njIIsTuUFlSuf2G7DYoAQGQGJRXNBVf++g vY/Yb9vVrzqNW5MvxDXw0mBf5Cvj3PZpJCRGc9vXxz+lEVM5vbU8oeBdus0YeQDcjiRU KDLEtfpNZmEOrIfQ13J+Ds2t1/akCg9cC8xP4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tgqrZgBopkwqpblbpRIce+uoMtu7X9Owh8X5ABOZczA=; b=OR8hLofosyGq4rqYwSiGZB3AltzicOcKCu+WjStacSwDwM3LTqjXBGMWBe9en6brlR +vZ4Aixt2ceIgzslM4FqZ6Dkt/z2Brzg/JyzWKFS8k9Zg5ydAZAcS52jvuZe0aYDdmOH +xRt4JihFIc32+vzQXiQPclPJOS+xZBRJpePVJtWFBNoP6kgCTyiu9zcX3S5TB6mx0Fn gbknrWAo/CDMKNgMf5xrL3KRMevXnkTYX4gAb/ROcftyhndIEzUuzCcIdWc3BJd7+S0E gmYB8pNbfCEjjBgAy4st4oUD5VtI7pBb0QZL0BvfYtuli6+4q8+ogDt5QAWgWflLL3Y0 Fiuw== X-Gm-Message-State: AOAM533hyAg5xxFRtFm+VYx1xECE8o+SCSv6lluOFbm5yJ6hUk3KNCGJ afPw8zqDPwetVG912Ogr6l1c7qZuFdhY2PpYHf4R4w== X-Received: by 2002:adf:ee44:: with SMTP id w4mr28232705wro.415.1621978839318; Tue, 25 May 2021 14:40:39 -0700 (PDT) MIME-Version: 1.0 References: <20210427175140.17800-5-jim2101024@gmail.com> <20210525211804.GA1228022@bjorn-Precision-5520> In-Reply-To: <20210525211804.GA1228022@bjorn-Precision-5520> From: Jim Quinlan Date: Tue, 25 May 2021 17:40:28 -0400 Message-ID: Subject: Re: [PATCH v1 4/4] PCI: brcmstb: add shutdown call to driver To: Bjorn Helgaas Cc: Jim Quinlan , "open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" , Bjorn Helgaas , Nicolas Saenz Julienne , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Nicolas Saenz Julienne , Lorenzo Pieralisi , Rob Herring , Florian Fainelli , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000091f25f05c32e60b1" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000091f25f05c32e60b1 Content-Type: text/plain; charset="UTF-8" On Tue, May 25, 2021 at 5:18 PM Bjorn Helgaas wrote: > > Capitalize "Add" in the subject. > > On Tue, Apr 27, 2021 at 01:51:39PM -0400, Jim Quinlan wrote: > > 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. > > This doesn't explain why shutdown() is necessary. "errors occur" > might be a hint, except that AFAICT, many similar drivers do invoke > pci_stop_root_bus() and pci_remove_root_bus() (several of them while > holding pci_lock_rescan_remove()), without implementing .shutdown(). > > It is ... unfortunate that there's such a variety of implementations > here. I don't believe these driver differences are all necessary > consequences of hardware differences. Fair enough, I'll dig into the error. Regards, Jim Quinlan Broadcom STB > > > Signed-off-by: Jim Quinlan > > --- > > 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, > > -- > > 2.17.1 > > --00000000000091f25f05c32e60b1 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQbgYJKoZIhvcNAQcCoIIQXzCCEFsCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3FMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1R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