Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5503692pxj; Wed, 26 May 2021 12:05:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrBXZqrmgQXs3JQBpS5JR9RUMt6KW5lef7uqrUzzVSvziDitdZPUPkblWeT1fQh0stIr/Z X-Received: by 2002:a05:6638:1650:: with SMTP id a16mr4602822jat.23.1622055937782; Wed, 26 May 2021 12:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622055937; cv=none; d=google.com; s=arc-20160816; b=YvfmV8EjUSc6s/t1MmYM95QDZqEsH4jdY5tlMM9e54ruRd39wL61S084uxfeJyq0K8 i6ww6phOCbWBQ/8DOCZ9a1d18nbHQOne74NqvxzDIoGNobB8r9aTnbdB0kqbC2aGaZMo u/xgqqF8rHDzMIq2xAnKURRx01k7iCFJhrbYaryeHvRsyy3RsRjaugIG+iXHrE8m++lR oOwSvBZ7q1/3prXCZE8m7cWlasdlhGSlBl4Y0mObFsMfA6R6Zn3VmYzT4XS16GWa7yGK WT7E+KV5/tCyGJ/hv1mWzkzZoI/KzYves9xudmcZ7GBB6Zoc8aGYFpCPWKuxB2dPRXzq 8fjw== 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=fFa6TdM+U+9diGPwvFgYQs9GGD9DNcHRDE4gSn3kDYw=; b=o+0R95Cr2N1HKbDKctx6Rg00tkJC/knXg9F6YSJ7PYrQtT5RKDgXR39Ny1jZBQzrA/ wrRFaRfkSXbFQGUC6yE+bmd3OF/Lllc1d2WPpUNp2aHQEWOGOea3A7/3ZytRHQr82fvr 3IWceLuVwbfM4tqJs5HA6TxXDMSgYQUo0/ht8P1PxINLgR4sGoCx+VQ7s7ZOm/qoT6RG oAhMlvDl/hlabCLsr2f6IOco+eZmcah4EMmbZyQKkRpthywB7HF2FwgOE31u7U9o4YOu OVY3bz6yxuCz1NgBbVtwPcRdlVy3Q9YD7bGp7nVsisjluEZA5j6HaE+NyJ6YOQOhEUCn wBYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kh6hEPyJ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a17si185693iol.19.2021.05.26.12.05.19; Wed, 26 May 2021 12:05:37 -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=@kernel.org header.s=k20201202 header.b=Kh6hEPyJ; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235267AbhEZQNh (ORCPT + 99 others); Wed, 26 May 2021 12:13:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:60780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232197AbhEZQNh (ORCPT ); Wed, 26 May 2021 12:13:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A47EA613EC; Wed, 26 May 2021 16:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622045525; bh=plkzmqFfNAQzIDwAmha6TrfSbLQm+saf1V+MFBd4Y4w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Kh6hEPyJbcPHLy+T6gIzgL6WDxQHtT4q0hlJfdrJRBNJ7GX9CpPQov5XxZXoNjZVb RghzrXklpnY1izJOLdaSbNMn5uM8Wk80rxswOoSdV/cxXX5AmkhrLrRuBcG5mykrzt XqIWuL0gnycpFMa8BhmkruiADUxXLRmqo4Nj2HBtSb9gLZgZtYwsPSFCj1jtC5fmSs 1iVfjrVWTryXyJ91gd9bqHsSB6ZeuIxSBHcJO0UN5sabynl0YvopR7QMFjgp5wpHkS GXoZdShHj/hOJfxZKdlOrGg6HvUqfWj4CXOj0cF49M70RDo/rwtyw40CpuUedQi3gE 4XuhfPx7qYSig== Received: by mail-ej1-f53.google.com with SMTP id z16so2699302ejr.4; Wed, 26 May 2021 09:12:05 -0700 (PDT) X-Gm-Message-State: AOAM533M3Ieg4PxVuni481n3tTedHM4kSZLL5CcCtdUupyuGWei4CLHe 874TCtbNvf2Z24us3ikBfvMqLBpVfrMjD6uXMQ== X-Received: by 2002:a17:907:76e8:: with SMTP id kg8mr32336386ejc.130.1622045524118; Wed, 26 May 2021 09:12:04 -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: Rob Herring Date: Wed, 26 May 2021 11:11:52 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 4/4] PCI: brcmstb: add shutdown call to driver To: Bjorn Helgaas Cc: Jim Quinlan , PCI , Bjorn Helgaas , Nicolas Saenz Julienne , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Jim Quinlan , Nicolas Saenz Julienne , Lorenzo Pieralisi , Florian Fainelli , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2021 at 4: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. What's correct here? This was on my radar and something we should get in front of. It's only a matter of time until everyone is converting their drivers to modules since that is now the Android WayTM. My plan here was to register a devm hook to call pci_stop_root_bus() and pci_remove_root_bus(). That way every driver doesn't have to implement a remove() hook. Though maybe they all need to quiesce themselves anyways. Rob