Skip to contentSkip to conversation

pciehp: Setting maxpayload after hot_plug ?

DISCUSSION Xavier Bru 1 participant 1 message Nov 9, 2010

lore
Share & tools
lore

Xavier Bru

author
#0 lore raw

Hello,

I have a concern around hot-plugging a pci adapter that sits behind a pci switch port, using the pciehp driver:
. When I boot with the adapter plugged, the maxpayload is set to
256 (as the pci switch upstream port is connected to a port that has the capability maxpayload%6.
. In case I hot-replace this adapter, after hot-plugging the
adapter, the maxpayload value is set to the default value (128).
. In case there was no adapter plugged at boot time, the
corresponding pci port has a default maxpayload8, and after hot-plugging the board, the pci port and the board stay with maxpayload8.

So, here is my question: should the pciehp driver be aware of the maxpayload, and re-initialize it in the pci bus hierarchy and on the board (has it is done I suppose by BIOS initialization when the board is present ) ? Else, who is in charge to reinitialize the maxpayload to the right value ?

Thanks in advance for your help.

Xavier