# Getting PCI-express hotplug to work

## Akkara

I am trying to get a esata pci-express card to be recognized on hotplug.  The card is a Kouwell BT-5652E3 using the Silicon Image chip.  The machine is a Macbook Pro, 2nd generation, running linux-2.6.26-gentoo-r1.

The card works if I boot with it already inserted, and it correctly handles hard-drive hotplug.  It seems like a pretty nice card (got it for $10).  It uses the sata_sil24 driver, CONFIG_SATA_SIL24=m.

But if I boot without the card and then insert it, nothing happens.  No new messages in dmesg nor in /var/log/message, no changes in the output of "lspci", nothing.

I think I might not have the kernel configured properly.  There are many options in the kernel related to PCI and hotplug and I'm not sure which one(s) applies in my situation.  I had tried enabling several of them, building them as modules, and then "modprobing" them, but still nothing happens.  With some modules I get an error message such as: *Quote:*   

> FATAL: Error inserting acpiphp (/lib/modules/2.6.26-gentoo-r1/kernel/drivers/pci/hotplug/acpiphp.ko): No such device

 

Currently, this is the PCI-related configuration: grep PCI .config

```
# Bus options (PCI etc.)

CONFIG_PCI=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_MMCONFIG=y

CONFIG_PCI_DOMAINS=y

CONFIG_PCIEPORTBUS=y

CONFIG_HOTPLUG_PCI_PCIE=y

CONFIG_PCIEAER=y

# CONFIG_PCIEASPM is not set

CONFIG_PCI_MSI=y

CONFIG_PCI_LEGACY=y

CONFIG_PCI_DEBUG=y

CONFIG_HOTPLUG_PCI=y

# CONFIG_HOTPLUG_PCI_FAKE is not set

# CONFIG_HOTPLUG_PCI_ACPI is not set

CONFIG_HOTPLUG_PCI_CPCI=y

# CONFIG_HOTPLUG_PCI_CPCI_ZT5550 is not set

# CONFIG_HOTPLUG_PCI_CPCI_GENERIC is not set

# CONFIG_HOTPLUG_PCI_SHPC is not set

# PCI IDE chipsets support

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_PATA_CMD640_PCI is not set

# CONFIG_IEEE1394_PCILYNX is not set

CONFIG_NET_PCI=y

# CONFIG_NE2K_PCI is not set

# CONFIG_SERIO_PCIPS2 is not set

CONFIG_SERIAL_8250_PCI=y

# CONFIG_RADIO_GEMTEK_PCI is not set

# PCI devices

# CONFIG_SND_CMIPCI is not set

# CONFIG_SND_YMFPCI is not set

# CONFIG_VIRTIO_PCI is not set
```

Thanks!

----------

## richard.scott

isn't that handled by the pcmcia tools?

----------

## szczerb

I don't really know much about pcmcia tools,  but the name suggests that they are for pcmcia, which uses an ISA bus. ExpressCard on the other hand uses a PCIe 2.0 bus which natively supports hotplug and therefore userland tools shouldn't be needed (I guess...).

----------

## richard.scott

 *szczerb wrote:*   

> I don't really know much about pcmcia tools,  but the name suggests that they are for pcmcia, which uses an ISA bus. ExpressCard on the other hand uses a PCIe 2.0 bus which natively supports hotplug and therefore userland tools shouldn't be needed (I guess...).

 

Are you plugging your card into a card slot on the side of your laptop? If so, then pcmcia is most likely your route forward to manage devices installed. To my knowledge I don't have an ISA bus on my laptop (I could be wrong) and I need pcmcia installed to get access to my wifi card etc.

----------

## szczerb

But recent laptops don't have PCMCIA, they have ExpressCard. And his Apple certainly seems to be quite recent. So I really doubt that he needs anything besides correct kernel configuration.

So, in menuconfig:

Bus options ->

 <*>PCI Express support

     [*]PCI Express Hotplug driver

BTW. PCMCIA is a kind of ISA bus so if you have PCMCIA then, you have ISA.

----------

