Re: PCIe hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg KH wrote:
On Mon, Apr 19, 2010 at 12:45:44PM -0700, Nishank wrote:
Hi,

I'm trying understand PCIe hot-plugging and surprise removal as
supported in kernel. I am using a board having Ibex Peak. Can
someone please help me understand -
 1. Which is the relevant driver for pcie hp for this board? (looks
like pciehp but I see others as well - shpchp)

Depends on the hardware, what does yours have on it?

 2. Is there a specific user-space utility for safe removal of PCIe?
Seems like it should be something like - quiesce, unbind, power-off.

You can do it with a simple one line bash script:
	echo 0 > /sys/bus/pci/slot/SLOT_NUMBER/power

Or you can use the very old pcihpview GUI tool if you really like those
types of things.

Or you can just press the button on the back of your machine that
controls the power to the slot.

 3. Is there any existing driver which supports PCIe surprise
removal? Also, when pcie slot has been powered off (as in
handle_suprise_event() in pciehp), how is the driver notified about
it?

The pciehp driver handles pcie device removal, assuming that is what is
controlling the hardware.  It is notified through the PCIe standard way
(go read the PCI spec for the boring details...)

The pciehp driver detects surprise removal through presence detect
changed event.

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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux