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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 16 Jul 2019 08:59:23 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Kishon Vijay Abraham I <kishon@...com>
Cc:     Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        linux-omap@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: PCI: dra7xx: PCI_EXP_LNKCTL2 usage

ab5fe4f4d31e ("PCI: dra7xx: Add support to force RC to work in GEN1 mode")
added this:

  +       dw_pcie_cfg_read(pp->dbi_base + exp_cap_off + PCI_EXP_LNKCTL2,
  +                        2, &reg);
  +       if ((reg & PCI_EXP_LNKCAP_SLS) != PCI_EXP_LNKCAP_SLS_2_5GB) {
  +               reg &= ~((u32)PCI_EXP_LNKCAP_SLS);
  +               reg |= PCI_EXP_LNKCAP_SLS_2_5GB;
  +               dw_pcie_cfg_write(pp->dbi_base + exp_cap_off +
  +                                 PCI_EXP_LNKCTL2, 2, reg);
  +       }

This probably works as intended, but it *looks* wrong because it uses
LNKCAP_* symbols on LNKCTL2 register values.  We do have
PCI_EXP_LNKCTL2_* symbols, so I think it would be better if we used
used those.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ