[Skiboot] [PATCH v11 22/23] core/opal: Extend opal_pci_set_power_state()

Stewart Smith stewart at linux.vnet.ibm.com
Wed Jun 8 17:34:20 AEST 2016


Andrew Donnellan <andrew.donnellan at au1.ibm.com> writes:
> On 20/05/16 16:32, Gavin Shan wrote:
>> The API opal_pci_set_power_state() applied PCI hotplug on target
>> slot. The power supply to the slot is changed accordingly. It's
>> not the expected behaviour for CAPI developers. They want one
>> specific slot offline or online without affecting the power supply.
>> This extends opal_pci_set_power_state() to meet the requirement.
>>
>> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
>
> This could probably be rolled into patch 21.
>
> The reason the IBM CAPI team needs this is to deal with ASIC cards which 
> may be either dynamically switched from normal mode to CAPI mode and 
> reset, or (potentially later down the track) FPGA cards reflashed with a 
> different FPGA image and reset, and which come back up with a different 
> set of PCI functions than before.
>
> As such, we want to update the skiboot device tree by "removing" and 
> "inserting" the card in that slot, without actually powering off the 
> card (in the case of the Mellanox CX-4, cutting the power will wipe the 
> config registers that we've updated when switching to CAPI mode).
>
> In this context, taking a slot "offline" or putting it "online" simply 
> means updating the skiboot device tree. The terms "offline" and "online" 
> aren't great, but there aren't many better terms that I can think of.
>
> This isn't necessarily CAPI-specific - there's no reason why a non-CAPI 
> PCI card couldn't exhibit similar behaviour - however CAPI mode 
> switching is the main reason for this.

I guess the reason that you want to offline then online rather than just
rescan is that you may need to update what's on the card while it's
offline? Except that the card will be offline... so not sure how that
would work?

Why not a RESCAN rather than OFFLINE/ONLINE pair?

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list