From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH 16/23] PCI: add pci bus removal through /sys/.../pci_bus/.../remove Date: Thu, 8 Mar 2012 07:45:25 -0800 Message-ID: <20120308154525.GB5907@kroah.com> References: <1331018040-30725-1-git-send-email-yinghai@kernel.org> <1331018040-30725-17-git-send-email-yinghai@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Bjorn Helgaas Cc: Yinghai Lu , Jesse Barnes , x86 , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap , linux-doc@vger.kernel.org, Matthew Garrett , linux-acpi@vger.kernel.org List-Id: linux-acpi@vger.kernel.org On Wed, Mar 07, 2012 at 09:45:18PM -0700, Bjorn Helgaas wrote: > >> I'm not sure it makes sense to talk about removing a "bus" and lea= ving > >> the upstream bridge (either a host bridge or a P2P bridge). =A0I t= hink > >> it'd make more sense to remove the bridge itself, which would of > >> course have the consequence of removing the secondary bus. > > > > for root bus, that remove pci_host_bridge and pci root bus. > > > > for pci bus under pci bridge, will remove that pci bus, but will st= ill > > keep =A0that pci bridge. > > that should be ok. just like some pci bridge is there, and later ca= n > > not create child bus for it. > > > > there is one case: during test busn_alloc, i need to remove all dev= ice > > on one bus, and > > use setpci to change bridge bus number register. then use rescan > > bridge to create new bus. > > > > with this one, I just need to remove that bus, instead of remove > > children devices one by one. >=20 > I don't think making it convenient for manual testing is an argument > for this interface. For sysfs interfaces it is more important to mak= e > something that fits well into the grand plan of how things Should > Work. If you need internal helper functions for convenience, I'm OK > with that, because it's easier to change those than to change sysfs > interfaces. If it's "only" for testing, then put it in debugfs, not sysfs. thanks, greg k-h