[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090319232154.GA30769@ldl.fc.hp.com>
Date: Thu, 19 Mar 2009 17:21:54 -0600
From: Alex Chiang <achiang@...com>
To: Trent Piepho <xyzzy@...akeasy.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
jbarnes@...tuousgeek.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 07/12] PCI: Introduce /sys/bus/pci/rescan
* Trent Piepho <xyzzy@...akeasy.org>:
> On Thu, 19 Mar 2009, Alex Chiang wrote:
> > * Andrew Morton <akpm@...ux-foundation.org>:
> > > > + +struct bus_attribute pci_bus_attrs[] = { +
> > > > __ATTR(rescan, S_IWUSR, NULL, bus_rescan_store), +
> > > > __ATTR_NULL +}; +#endif
> > >
> > > Why CONFIG_HOTPLUG rather than CONFIG_HOTPLUG_PCI (or
> > > similar)?
> >
> > I first started out with CONFIG_HOTPLUG_PCI but then all that
> > stuff got compiled out, and I couldn't figure out why at the
> > time.
>
> HOTPLUG_PCI is a subset of HOTPLUG. It gives you support for
> actual hotplug hardware. The rescan/remove functions don't do
> anything to hotplug hardware and don't use any code from the
> pci hotplug core (which is designed to support hotplug
> hardware). Rescan and remove just need the ability to unbind a
> driver from device, delete a device and create a new device.
> Which HOTPLUG gives us.
>
> So, we use HOTPLUG because that's all we need. The idea is to
> make the sysfs interface for PCI have the most features it can
> support.
>
> If we wanted to make the interface not have remove/rescan
> unless needed, then using HOTPLUG_PCI wouldn't make much sense.
> It would be better to have a new option "PCI remove/rescan
> sysfs interface" or something that turned it on. But it isn't
> much code, so I don't think it's necessary to do that.
Well, I don't know what I did wrong last time, but I no longer
have technical difficulty putting it under CONFIG_HOTPLUG_PCI.
Looking at Documentation/PCI/pci.txt, and the various archs, it
seems they all assume CONFIG_HOTPLUG means PCI.
This could be cleaned up, but it's certainly non-trivial, and a
bit more than I'd want to bite off for this particular patchset.
Plus, Trent is right. Looks like we use HOTPLUG_PCI to really
mean physically supported hotplug, not the logical stuff that
this patchset is adding.
Thanks.
/ac
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists