lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <afc2e96167db7e1602a39f8b9aab42a860b0c654.camel@linux.intel.com>
Date:   Tue, 14 Dec 2021 09:33:11 -0800
From:   "David E. Box" <david.e.box@...ux.intel.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     nirmal.patel@...ux.intel.com, jonathan.derrick@...ux.dev,
        lorenzo.pieralisi@....com, robh@...nel.org, kw@...ux.com,
        bhelgaas@...gle.com, michael.a.bottini@...ux.intel.com,
        rafael@...nel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, Adhitya Mohan <me@...ityamohan.in>
Subject: Re: [PATCH V3 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ