lkml.org 
[lkml]   [2021]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V3 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices
From
Date
On Mon, 2021-12-13 at 23:56 -0800, Christoph Hellwig wrote:
> On Thu, Dec 09, 2021 at 12:12:35PM -0800, David E. Box wrote:
> > +static int vmd_enable_aspm(struct pci_dev *pdev, void *userdata)
> > +{
> > + int features = *(int *)userdata;
> > +
> > + if (features & VMD_FEAT_QUIRK_OVERRIDE_ASPM &&
> > + pdev->class == PCI_CLASS_STORAGE_EXPRESS) {
> > + int pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR);
> > +
> > + if (pos) {
> > + pci_write_config_word(pdev, pos + PCI_LTR_MAX_SNOOP_LAT,
> > 0x1003);
> > + pci_write_config_word(pdev, pos +
> > PCI_LTR_MAX_NOSNOOP_LAT, 0x1003);
> > + if (pcie_aspm_policy_override(pdev))
> > + pci_info(pdev, "Unable of override ASPM
> > policy\n");
> > + }
>
> This is completely unredable due to the long lines. Just return early on
> the two conditionals and it will all be fine.

Sure.

Thanks.

\
 
 \ /
  Last update: 2021-12-14 18:34    [W:0.043 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site