Re: [PATCH] pcie_aspm: Make link_state_store consistent with link_state_show

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

 



On Dec 3, 2015 9:21 AM, "Bjorn Helgaas" <helgaas@xxxxxxxxxx> wrote:
>
> On Thu, Nov 19, 2015 at 08:05:35AM -0800, Andy Lutomirski wrote:
> > If CONFIG_PCIEASPM_DEBUG is set, then pci devices have a link_state
> > attribute.  Reading that attribute shows the state as a bit mask: 1
> > means L0S upstream, 2 means L0S downstream, and 4 means L1.
> >
> > Oddly, writing to link_state is inconsistent and gets translated,
> > leading to mysterious results in which the value you store isn't
> > comparable the value you load back out.
> >
> > Fix it by making link_state_store match link_state_show.
> >
> > Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxx>
>
> Applied to pci/aspm for v4.5, thanks!  You didn't touch the
> "aspm_disabled" check, but I moved it above the input validation code to
> make the patch look like the attached.  I think it's better to not
> even look at the input if aspm_disabled, and this also puts the
> validation code all together.

Looks good to me.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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