Message ID | 4A48C15C.3000509@tuffmail.co.uk (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Corentin Chary |
Headers | show |
On Mon, Jun 29, 2009 at 02:27:56PM +0100, Alan Jenkins wrote: > The whole point of registering as a PCI hotplug driver was to prevent > conflict with pciehp. At the moment it happens to work because > eeepc-laptop is loaded first, but it doesn't work the other way round. > If pciehp is loaded first then we fail to claim the slot - we need to > respect this and not handle hotplug events. > > Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
On Mon, Jun 29, 2009 at 9:22 PM, Matthew Garrett<mjg59@srcf.ucam.org> wrote: > On Mon, Jun 29, 2009 at 02:27:56PM +0100, Alan Jenkins wrote: >> The whole point of registering as a PCI hotplug driver was to prevent >> conflict with pciehp. Â At the moment it happens to work because >> eeepc-laptop is loaded first, but it doesn't work the other way round. >> If pciehp is loaded first then we fail to claim the slot - we need to >> respect this and not handle hotplug events. >> >> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> > Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> > IMO this is not an urgent patch - it's not a regression from 2.6.30. > Given the number of other changes, I'd be happier if it could be held > back for 2.6.32. Merged into ACPI4Asus, while waiting 2.6.32. Thanks
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 76dc3d9..faedee5 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -664,15 +664,20 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot, static void eeepc_hotplug_work(struct work_struct *work) { struct pci_dev *dev; - struct pci_bus *bus = pci_find_bus(0, 1); - bool blocked; + struct pci_bus *bus; + bool blocked = eeepc_wlan_rfkill_blocked(); + + rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); + if (ehotk->hotplug_slot == NULL) + return; + + bus = pci_find_bus(0, 1); if (!bus) { pr_warning("Unable to find PCI bus 1?\n"); return; } - blocked = eeepc_wlan_rfkill_blocked(); if (!blocked) { dev = pci_get_slot(bus, 0); if (dev) { @@ -693,8 +698,6 @@ static void eeepc_hotplug_work(struct work_struct *work) pci_dev_put(dev); } } - - rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); } static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
The whole point of registering as a PCI hotplug driver was to prevent conflict with pciehp. At the moment it happens to work because eeepc-laptop is loaded first, but it doesn't work the other way round. If pciehp is loaded first then we fail to claim the slot - we need to respect this and not handle hotplug events. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> --- IMO this is not an urgent patch - it's not a regression from 2.6.30. Given the number of other changes, I'd be happier if it could be held back for 2.6.32. drivers/platform/x86/eeepc-laptop.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)