lkml.org 
[lkml]   [2021]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices
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.

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