Re: [PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

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

 



Hi Yinghai

Which version of linux did you apply this? 

I'm not sure if you can ignore PDC when ATTN isn't present. Surprise hot-add on
systems with Power Control would depend on PDC.

There is some new code to deal with both Presence detect and DLLSC events since
4.10-rc1. 


On Thu, Feb 16, 2017 at 10:12:47PM -0800, Yinghai Lu wrote:
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> 
> ---
>  drivers/pci/hotplug/pciehp_hpc.c |    5 +++--

> +		if (!ATTN_BUTTN(ctrl))
> +			pciehp_queue_interrupt_event(slot, present ?
> +					INT_PRESENCE_ON : INT_PRESENCE_OFF);
>  	}
>  
>  	/* Check Power Fault Detected */

This is what we have since v4.10-rc1

    /*
     * Check Link Status Changed at higher precedence than Presence
     * Detect Changed.  The PDS value may be set to "card present" from
     * out-of-band detection, which may be in conflict with a Link Down
     * and cause the wrong event to queue.
     */
    if (events & PCI_EXP_SLTSTA_DLLSC) {
        ctrl_info(ctrl, "Slot(%s): Link %s\n", slot_name(slot),
              link ? "Up" : "Down");
        pciehp_queue_interrupt_event(slot, link ? INT_LINK_UP :
                         INT_LINK_DOWN);
    } else if (events & PCI_EXP_SLTSTA_PDC) {
        present = !!(status & PCI_EXP_SLTSTA_PDS);
        ctrl_info(ctrl, "Slot(%s): Card %spresent\n", slot_name(slot),
              present ? "" : "not ");
        pciehp_queue_interrupt_event(slot, present ? INT_PRESENCE_ON :
                         INT_PRESENCE_OFF);
    }


Cheers
Ashok




[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