Ubuntu Natty and PCI ExpressCard hot plug issue
I was experimenting with USB 3.0 and since one of my laptops did not have an USB 3.0 port, I tried to use a PCI ExpressCard. The card itself is of famed no-name brand, but according to lspci it is identified as
USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
When I plugged it in nothing happened. Since I have experienced similar behaviour on some PCMCIA cards years ago, I thought that card may be ok, but it is possible that some hot plug function is not working. I inserted the card and rebooted the machine… and it worked perfectly. But if the card was ejected and reinserted again, it did not work. So the problem was in hotplugging.
This bug is currently present also in stock Ubuntu kernel. Hotplug support is compiled in, but it does not work (at least in 64 bit kernel it does not). However, it is quite easy to fix this, and you do not even have to compile the kernel. All you have to do is to edit grub boot parameters and edit /etc/modules to autoload acpiphp module.
EDIT BOOT PARAMETERS
You should edit the file /etc/default/grub
sudo gedit /etc/default/grub
You should edit GRUB_CMDLINE_LINUX_DEFAULT and add pciehp_force=1 and pciehp_poll_mode=1 to the list.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pciehp_force=1 pciehp_poll_mode=1"
Save and then run
sudo gedit /etc/modules
and add a line with acpiphp into it. Save file and now you can reboot the machine. PCI ExpressCard should be hot-pluggable now.