Re: Hot add a PCIe device driver upon hotplug event

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

 



On Tue, Jan 13, 2015 at 7:03 AM, Paulo Fortuna Carvalho
<pricardofc@xxxxxxxxx> wrote:
> Hello Bjorn,
> Im sending a picture of lspci command for yuo t see the pcie switch
> and endpoints status when i boot the system with everything connected.
> DPIO cards are the 2 endpoints (6114 is a carrier containing a pcie
> switch) and 6014 is the DAq card endpoint (both use a FPGA Virtex 6
> from XILINX).
> We have in the system an OSS card that is the second PCIe switch in
> the system hierarchy closest to the root complex that is the chipset
> in the motherboard and then the processor.
> The OS is redhat v6.3 and the kernel we are using is 3.0.9 realtime.

Can you try a more recent kernel?  There have been significant hotplug
changes since 3.0, and I don't want to spend time debugging issues
that have already been fixed.  If it turns out that hotplug works as
you expect in, say, v3.18, then you can figure out whether it's better
to backport the hotplug fixes, or to update to a newer RT kernel.

Bjorn

> Im sending also the dmesg information after system boot
> (dmesg_output1.txt) and after I perform a switch off of the DAq card
> (6014) handle, switch on and switch off again.
> As you can see from dmesg_output2.txt the hot-add event is detected by
> the pciehp on slot (8) bu no further print messages are sent to the
> system log. At this point hotplug surprise is off. I will turn it on
> on next test.
>
> The PCIe cards (both carrier and DAq) are ATCA with PCIExpress
> capabilities for Linux PCI device drivers perform required operations.
>
> Regards,
> Paulo.
>
>
> 2015-01-12 17:41 GMT, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>:
>> On Mon, Jan 12, 2015 at 11:26 AM, Paulo Fortuna Carvalho
>> <pricardofc@xxxxxxxxx> wrote:
>>> Hello Helgas,
>>> I cannot see that line in dmesg. I think that something else is
>>> missing...
>>> Do you know what may cause that not appearing in dmesg? Hotplug Surprise?
>>
>> Can you just collect the entire dmesg log, so I can see what
>> controller is involved and what is happening?
>>
>> Surprise hotplug should work.  Are you inserting an ExpressCard, or is
>> it some other form factor?  Exactly what hardware are you adding, and
>> what are you adding it to?
>>
>> Bjorn
>>
>>> 2015-01-12 16:58 GMT, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>:
>>>> On Mon, Jan 12, 2015 at 5:42 AM, Paulo Fortuna Carvalho
>>>> <pricardofc@xxxxxxxxx> wrote:
>>>>> Hello,
>>>>> I want to automatically load/unload a PCIe device driver when a card
>>>>> is inserted/removed from the system. I can see in the system logger
>>>>> with dmesg that the interrupt event is captured and acknowledged by
>>>>> the pciehp hotplug service driver.
>>>>> What I want to do next is that the operating system load/unload the
>>>>> corresponding PCIe device driver for that card.
>>>>
>>>> When pciehp receives the interrupt, it should enumerate the device,
>>>> and you should see a line in dmesg similar to this (of course, it will
>>>> have different bus/device/function and different vendor/device IDs):
>>>>
>>>>   pci 0000:00:16.0: [8086:9c3a] type 00 class 0x078000
>>>>
>>>> The PCI core should then add the device using device_add(), and part
>>>> of that is to emit a uevent, which can be read by user-space.
>>>> Generally udev would handle the event and load the appropriate driver.
>>>> I don't know the details of how the user-space side works.
>>>>
>>>> Bjorn
>>>>
>>
--
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