AnsweredAssumed Answered

Questions about hotplugging for PCI-e interface

Question asked by Lim Lee on Oct 7, 2016
Latest reply on Oct 9, 2016 by igorpadykov

Hi, All.

I am using a SABRE-AI board(CPU: i.MX6Q, Kernel: Linux imx6qsabrequto 3.14.28) for testing WiFi features.
For the test, a WiFi interface card is connected on a PCI-e slot of the board.
The interface card should be removed and re-inserted on the slot for another tests after the end of one single test.
I conducted the procedure for the above operation as below:

 

(1) # lscpi
---------------------------------------------------------------------------------
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 Network controller: Qualcomm Atheros Device 003e (rev 32)
---------------------------------------------------------------------------------

 

(2) # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
     # lspci
---------------------------------------------------------------------------------
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
---------------------------------------------------------------------------------

 

(3) The interface card for WiFi is removed and re-inserted on the PCI-e slot
     # lspci
---------------------------------------------------------------------------------
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
---------------------------------------------------------------------------------

 

(4) # echo 1 > /sys/bus/pci/rescan
---------------------------------------------------------------------------------
pcieport 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:01:00.0: BAR 0: assigned [mem 0x01000000-0x011fffff 64bit]
---------------------------------------------------------------------------------

 

(5) # lspci
---------------------------------------------------------------------------------
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 Network controller: Qualcomm Atheros Device 003e (rev 32)
---------------------------------------------------------------------------------

 

It seemed that PCI-e interface was normally updated, but our linux system stopped suddenly when uploading module(insmod) related with WiFi.
I think that something was wrong on (4) of the above procedure.
The following log was output as normal when I tried to rescan the interfaces without removing and re-inserting on the slot.

 

(4) # echo 1 > /sys/bus/pci/rescan
---------------------------------------------------------------------------------
pci 0000:01:00.0: BAR 0: assigned [mem 0x01000000-0x011fffff 64bit]
---------------------------------------------------------------------------------

After that, Uploading module completed successfully.

 

My Question is:
(1) Does SABRE-AI board using i.MX6Q CPU support hotplugging for PCI-e interface?
(2) What is the method for resolving the above issue if the board supports hotplugging for PCI-e interface?

 

Thank you.

Outcomes