Re: [PATCHv3 1/2] pciehp: Let user control LED status
From: Keith Busch
Date: Tue Sep 13 2016 - 12:25:48 EST
On Tue, Sep 13, 2016 at 09:05:39AM -0600, Keith Busch wrote:
> +int pciehp_get_raw_attention_status(struct hotplug_slot *hotplug_slot,
> + u8 *value)
> +{
> + struct slot *slot = hotplug_slot->private;
> + struct pci_dev *pdev = ctrl_dev(slot->ctrl);
> + u16 slot_ctrl;
> +
> + pcie_capability_read_word(pdev, PCI_EXP_SLTCTL, &slot_ctrl);
> + *status = (slot_ctrl & (PCI_EXP_SLTCTL_AIC | PCI_EXP_SLTCTL_PIC)) >> 6;
Sorry, I generated this patch from a wrong branch. Won't compile, will
send the correct series. Apologies for the churn.