Re: Pcie Linux HotPlug Driver

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

 



On Tue, May 28, 2013 at 6:05 AM, Paulo Fortuna Carvalho
<pricardofc@xxxxxxxxxxxxxxx> wrote:
> Hello Yinghai,
> Here goes, in attached .zip file the commands output that you suggested.

It looks like the part you're interested in is this:

    00:03.0 bridge to [bus 03-1a] (Intel root port)
    03:00.0 bridge to [bus 04-1a] (PLX 8733 upstream port)
    04:08.0 bridge to [bus 05-1a] (PLX 8733 downstream port)
    05:00.0 bridge to [bus 06-1a] (PLX 8696 upstream port)
    06:07.0 bridge to [bus 0a] (PLX 8696 downstream port)
    0a:00.0 endpoint (PLD Applications 6114)
    06:0e.0 bridge to [bus 11] (PLX 8696 downstream port)
    11:00.0 endpoint (PLD Applications 6014)

I assume everything except the root port is on your ATCA card, and you
want to hotplug the card as a whole.

This would be handled by the hotplug controller in the 00:03.0 root
port, using pciehp.

Your first step should be to verify that hotplugging the card works
without your ATCA drivers in the system.  When you hot-add the card,
you should see messages in dmesg about the hot-add event and
enumerating all the PCI devices on the card.  lspci at this point
should show your devices, and they should appear in sysfs, but of
course you can't use them because your ATCA drivers aren't loaded.

You should also be able to remove the card (you can request the
removal using the sysfs remove interface or buttons on your ATCA
chassis if they exist) and you should see notes in dmesg about the
devices being removed, and they should disappear from lspci output and
from sysfs.

Your ATCA drivers should be normal PCI device drivers (not port
drivers), and they shouldn't need to do anything special to deal with
hotplug.  From the point of view of your driver, there *is* no
hot-plug.  Your .probe() method will be called after the PCI core
enumerates and configures all the devices, just like it would be if
the card were present at boot-time.  Your .remove() method is called
before the device is powered-off, just like it would be at system
shutdown time.

If you're still having trouble, please collect a complete dmesg log
showing the problem.

Bjorn

> 2013/5/27, Yinghai Lu <yinghai@xxxxxxxxxx>:
>> On Mon, May 27, 2013 at 9:45 AM, Paulo Fortuna Carvalho
>> <pricardofc@xxxxxxxxxxxxxxx> wrote:
>>> My card includes a PCIe Switch.
>>> My coordinators told me that a solution for hotplug (remove/insert
>>> board without shutting down the system) could be the PCIe Port Bus
>>> Driver Model using also pciehp.ko already installed in Linux System.
>>
>> can you post
>> lspci -vvxxx
>> lspci -tv
>> with and without your card/fpga working?
>>
>> If your card have a pcie switch, then you can make your down port has
>> pcie slot cap that support pciehp.
>>
>> Yinghai
>>
--
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