Re: [PATCH V2] Bug fix for PME interrupt handler, add Root Status check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 30, 2017 at 4:12 AM, Qiang Zheng <zhengqiang10@xxxxxxxxxx> wrote:
> PCIe PME and hot plug share same interrupt number. In some special case,
> Link down event cause hot plug interrupt, devices is not disconnected,
> But read config will return 0xff.
>
> In that case, PME work function will run and not return Because
> Root Status PME bit always 1 and can not be cleared.
>
> This patch add Root Status check in PME interrupt handler,
> Just do same as pciehp isr Slot status check.
>
> Signed-off-by: Qiang Zheng <zhengqiang10@xxxxxxxxxx>
> ---
>  drivers/pci/pcie/pme.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
> index fafdb16..2ff2e57 100644
> --- a/drivers/pci/pcie/pme.c
> +++ b/drivers/pci/pcie/pme.c
> @@ -273,7 +273,7 @@ static irqreturn_t pcie_pme_irq(int irq, void *context)
>         spin_lock_irqsave(&data->lock, flags);
>         pcie_capability_read_dword(port, PCI_EXP_RTSTA, &rtsta);
>
> -       if (!(rtsta & PCI_EXP_RTSTA_PME)) {
> +       if (rtsta == U32_MAX || !(rtsta & PCI_EXP_RTSTA_PME)) {
>                 spin_unlock_irqrestore(&data->lock, flags);
>                 return IRQ_NONE;
>         }
> --

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux