On Thu, Sep 6, 2012 at 7:34 AM, Prarit Bhargava <[email protected]> wrote:
> Signed-off-by: Yinghai Lu <[email protected]>
> Cc: Kenji Kaneshige <[email protected]>
> Cc: [email protected]
>
>>diff --git a/drivers/pci/hotplug/pciehp_hpc.c 
>>b/drivers/pci/hotplug/pciehp_hpc.c
>>index 13b2eaf..7cee8db 100644
>>--- a/drivers/pci/hotplug/pciehp_hpc.c
>>+++ b/drivers/pci/hotplug/pciehp_hpc.c
>>@@ -631,6 +631,8 @@ int pciehp_power_off_slot(struct slot * slot)
>>       slot_cmd = POWER_OFF;
>>       cmd_mask = PCI_EXP_SLTCTL_PCC;
>>       retval = pcie_write_cmd(ctrl, slot_cmd, cmd_mask);
>>+      /* need to enable link again for present bit report */
>>+      pciehp_link_enable(ctrl);
>
> You're not checking the return value of pciehp_link_enable().  I wonder if
> enabling the link is the only way to get the present bit to report 
> correctly...

that is silicon problem. and no one noticed that before.

>
> Also, should the pciehp_link_enable() be called in pciehp_power_on_slot() if
> we already reenable it on the power off?

we call that in pciehp_power_on_slot for another case:
BIOS could have link disable on pcie slot if there is no card plugged
in that slot.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to