RE: PCIe Hotplugging not working

From: Anand Kanaginhal
Date: Fri Dec 09 2011 - 12:19:40 EST



Following Daring fireball :).. my comments inline----------------------------------------
> Date: Fri, 9 Dec 2011 12:45:25 +0000
> From: mjg59@xxxxxxxxxxxxx
> To: anand_dk@xxxxxxxxxxx
> CC: bhelgaas@xxxxxxxxxx; greg@xxxxxxxxx; linux-pci@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-hotplug@xxxxxxxxxxxxxxx
> Subject: Re: PCIe Hotplugging not working
>
> Do you have anything in /sys/class/pci/slots ? Does your card show up in
> lspci when you hotplug it?
I dont see the directory structure /sys/class/pci/slots

$ ls /sys/class
ata_device dmi leds power_supply scsi_disk tty
ata_link firmware mdio_bus ppdev scsi_generic usbmon
ata_port gpio mem ppp scsi_host vc
backlight graphics misc printer sound vtconsole
bdi hidraw mmc_host regulator spi_host wmi
block hwmon net rfkill spi_master
bsg i2c-adapter pci_bus rtc spi_transport
dma input pktcdvd scsi_device thermaldirectories.


However, slots was found in /sys/bus/pci/slots

$ ls /sys/bus/pci/slots
0000:00:00.0 0000:00:10.0 0000:00:1c.0 0000:00:1f.2 0000:03:01.0
0000:00:03.0 0000:00:10.1 0000:00:1c.4 0000:00:1f.3 0000:03:08.0
0000:00:08.0 0000:00:16.0 0000:00:1c.6 0000:00:1f.5 0000:03:09.0
0000:00:08.1 0000:00:19.0 0000:00:1d.0 0000:01:00.0 0000:04:00.0
0000:00:08.2 0000:00:1a.0 0000:00:1e.0 0000:01:00.1 0000:07:00.0
0000:00:08.3 0000:00:1b.0 0000:00:1f.0 0000:02:00.0 0000:08:00.0

lspci neither adds nor removes entries on hotplugging either card c1,c2.
Output of lspci is as follows

$ lspci
...
02:00.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
03:01.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
03:08.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)
03:09.0 PCI bridge: PLX Technology, Inc. PEX 8533 32-lane, 6-port PCI Express Switch (rev aa)

anand card c1>>>>>>>>04:00.0 Memory controller: Device 174a:0701 
anand card c2>>>>>>>>05:00.0 Ethernet controller: Agere Systems ET-131x PCI-E Ethernet Controller (rev 02)
....
$
Also along the other stuffs, for the topology I am having, please let me know if my assumptions are technically correct
---
1. With the above setup, If I hotplug card c1 and/or c2, will my driver probe
get invoked.
2. I dont have to add any rules for in /etc/udev/rules.d/*.rules for my driver
 to work.
3. The standard hotplug controller driver would get the hotplug event from the
 switch and handle it.
4. The standard hotplug controller driver will be responsible for invoking
.probe and .remove functions of my driver.
---
Thanks
Anand


>
> --
> Matthew Garrett | mjg59@xxxxxxxxxxxxx
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/