Phil Endecott wrote: > Kenji Kaneshige <kaneshige.kenji <at> jp.fujitsu.com> writes: >> Phil Endecott wrote: >> > Dear Experts, >> > > Some of you may have heard about Arjan van de Ven and Auke Kok's work >> > to get an ASUS EEE 901 to boot in 5 seconds. I'm trying to achieve >> > something similar on my own '901. >> > > One of the things that Arjan and Auke didn't do in their startup was >> > wireless networking. This can be switched on and off using a special >> > key combination, and uses pcie hotplug. I'm not entirely certain how >> > it all hangs together, but what seems to work is loading pciehp either >> > as a module or built in to the kernel, and setting pciehp_force=1. >> > This is functional, but very slow because of at least one msleep(1000) >> > in pciehp_ctrl.c. Arjan & Auke boot their kernel in less than a >> second, >> > but mine spends does about four of these 1-second waits > > So, what >> can I do about this? I am a bit suspicious of the pciehp_force >> > parameter; what is it supposed to do? I only need hotplugging on this >> > one device; can I avoid these delays for initialisation associated with >> > other PCI devices that cannot be hot-unplugged? Can the 1 second delay >> > safely be reduced? Can it be made to occur concurrently with other >> > activity? >> >> If your platform allows hotplug using OS native hotplug driver (pciehp >> in Linux) to handle hotplug slots, you don't need pciehp_force. The >> pciehp_force parameter is supposed to be used only for testing purpose >> if you want pciehp to handle hotplug slots even though your platform >> doesn't allow hotplug using OS native hotplug driver. > > Hi Kenji, > > When I don't use pciehp_force, when I press the function key that turns > off wifi it seems that the driver is not un-bound and it spews error > messages. > > I'm not sure how this is all supposed to fit together. I think you're > saying that my platform "doesn't allow" hotplugging, and that setting > pciehp_force is not a legitimate work-around. Is that fair? Can anyone > comment on how this "typically" works on laptops? > According to PCI firmware specification, Native Hot Plug driver need to request hotplug control from firmware. Your platform seems to deny this request. So pciehp cannot handle hotplug slots or hotplug events. It's your platform's decision. I think hotplug slots on your system are supposed to be handled by ACPI based hotplug driver. What about using acpiphp? > FYI I have tried replacing all the msleep(1000) calls with msleep(100) > and it does still work, but this is presumably not a legitimate change > for all hardware. > msleep(1000) after turning power off is mandatory. msleep(1000) after turning power on can be replaced with waiting for Data Link Layer Link Active event and msleep(100). I made a patch about this. It would reduce wait time, if your hotplug slots are Data Link Layer Link Active Capabile. Please see below about the patch. http://marc.info/?l=linux-pci&m=122465344022226&w=2 Thanks, Kenji Kaneshige -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html