PCIe hotplug/rescan ?

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

 



Dear kernel-newbies...

I have my own PCIe board with an FPGA + driver (running on 2.6.18
kernel).
I'd like to update the FPGA code on the fly (e.g. by programming via
JTAG)
 
The problem is that when I reprogram the FPGA, our board seems not be
accessible anymore.
I related this issue to the fact that the PCI configuration records are
reset during reprogramming (in addition, the PCIe link speed is normally
negotiated at BIOS boot time)
 
I wonder if there's a way in linux to force the system to "hotplug" our
board.
 
I've been browsing the web and came up with a solution using the fakephp
driver (Fake PCI HotPlug).
I was able to successfully rescan the PCI bus when I did not reprogram
the FPGA.
 
But when I do reprogram the FPGA, rescanning the PCI bus returns with an
error message (see kernel messages below)
    pci_hotplug: PCI Hot Plug PCI Core version: 0.5
    fakephp: Fake PCI Hot Plug Controller Driver
    viking: Looking for device (Message from our driver)
    PCI: Device 0000:01:00.0 not available because of resource
collisions
    viking: probe of 0000:01:00.0 failed with error -22 
 
I think the resource collision is due to the fact that the content PCI
configuration registers have changed (I confirmed this by comparing
'lspci -xxx' output before and after reprogramming the FPGA)
 
I also tried the PCIe Hotplug module (pciehp) but this one seems to be
unable to gain control over the hotplug hardware; see kernel messages
below:
    pciehp: HPC vendor_id 8086 device_id 2660 ss_vid 0 ss_did 0
    Evaluate _OSC Set fails. Status = 0x0005
    Evaluate _OSC Set fails. Status = 0x0005
    pciehp: Cannot get control of hotplug hardware for pci 0000:00:1c.0
    pciehp: PCI Express Hot Plug Controller Driver version: 0.4
 
Does anybody now how this issue can be solved ?

Either by storing the PCI configuration regs content and restoring it
(sounds risky) or by another way of rescanning the PCI bus ?

Am I doing something wrong (too little) using the pcie hotplug module ?

It might be that I don't need to "hotplug" since the board was already
present during bootup...

Appreciate your comments,
Tom
 


DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux