[Skiboot] [PATCH 4/7] core/pci: Fix initial PCIe slot power state

Gavin Shan gwshan at linux.vnet.ibm.com
Thu Aug 11 15:24:40 AEST 2016


On Thu, Aug 11, 2016 at 03:16:43PM +1000, Andrew Donnellan wrote:
>On 11/08/16 14:55, Gavin Shan wrote:
>>+	if (slot->slot_cap & PCICAP_EXP_SLOTCAP_PWCTRL) {
>> 		slot->power_ctl = 1;
>>+
>>+		/* The power is on by default */
>>+		slot->power_state = 1;
>
>Can we use PCI_SLOT_POWER_ON rather than 1?
>
>>+		if (pd && ecap) {
>>+			pci_cfg_read16(phb, pd->bdfn,
>>+				       ecap + PCICAP_EXP_SLOTCTL, &slot_ctl);
>>+			if (slot_ctl & PCICAP_EXP_SLOTCTL_PWRCTLR)
>>+				slot->power_state = 0;
>
>PCI_SLOT_POWER_OFF?
>

Yes, PCI_SLOT_POWER_{OFF, ON} should be used in next respin.

Thanks,
Gavin



More information about the Skiboot mailing list