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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Oct 2022 13:17:46 -0700
From:   Han Jingoo <jingoohan1@...il.com>
To:     Lorenzo Pieralisi <lpieralisi@...nel.org>
Cc:     Vidya Sagar <vidyas@...dia.com>, gustavo.pimentel@...opsys.com,
        robh@...nel.org, kw@...ux.com, bhelgaas@...gle.com,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        kthota@...dia.com, mmaddireddy@...dia.com, sagar.tv@...il.com
Subject: Re: [PATCH V1 2/2] PCI: designware-ep: Disable PTM capabilities for
 EP mode

On Thu, Oct 27, 2022 Lorenzo Pieralisi <lpieralisi@...nel.org> wrote:
>
> On Mon, Sep 19, 2022 at 08:03:40PM +0530, Vidya Sagar wrote:
> > Dual mode DesignWare PCIe IP has PTM capability enabled (if supported) even
> > in the EP mode. The PCIe compliance for the EP mode expects PTM
> > capabilities (ROOT_CAPABLE, RES_CAPABLE, CLK_GRAN) be disabled.
> > Hence disable PTM for the EP mode.
>
> "PCIe compliance" - what is this referring to ?

Hi Lorenzo,

You can refer to the following link:
https://pcisig.com/developers/compliance-program

PCIe compliance means 'PCIe Compliance test "Compliance tests allow
for product testing against PCI-SIG test modules". Usually, USB specs
and PCIe specs define compliance tests where product manufacturers
need to pass specific test procedures. For example, in USB cases,
USB.org says that "To qualify for the right to display the certified USB logo
in conjunction with a product, the product must pass USB-IF compliance
testing for product quality."

To Vidiya,
If my understanding is not correct, please let us know what you intended.

>
> Was this reported to Synopsys ?

To Vidiya,
Would you confirm that?

Thank you.

Best regards,
Jingoo Han
>
> Thanks,
> Lorenzo
>
> > Signed-off-by: Vidya Sagar <vidyas@...dia.com>
> > ---
> >  .../pci/controller/dwc/pcie-designware-ep.c   | 19 ++++++++++++++++++-
> >  1 file changed, 18 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
> > index 7e9529ae3824..dc3057b18f36 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware-ep.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
> > @@ -646,7 +646,7 @@ int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep)
> >       struct dw_pcie_ep_func *ep_func;
> >       struct device *dev = pci->dev;
> >       struct pci_epc *epc = ep->epc;
> > -     unsigned int offset;
> > +     unsigned int offset, ptm_cap_base;
> >       unsigned int nbars;
> >       u8 hdr_type;
> >       u8 func_no;
> > @@ -698,6 +698,7 @@ int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep)
> >       }
> >
> >       offset = dw_pcie_ep_find_ext_capability(pci, PCI_EXT_CAP_ID_REBAR);
> > +     ptm_cap_base = dw_pcie_ep_find_ext_capability(pci, PCI_EXT_CAP_ID_PTM);
> >
> >       dw_pcie_dbi_ro_wr_en(pci);
> >
> > @@ -710,6 +711,22 @@ int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep)
> >                       dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, 0x0);
> >       }
> >
> > +     /*
> > +      * PTM responder capability can be disabled only after disabling
> > +      * PTM root capability.
> > +      */
> > +     if (ptm_cap_base) {
> > +             dw_pcie_dbi_ro_wr_en(pci);
> > +             reg = dw_pcie_readl_dbi(pci, ptm_cap_base + PCI_PTM_CAP);
> > +             reg &= ~PCI_PTM_CAP_ROOT;
> > +             dw_pcie_writel_dbi(pci, ptm_cap_base + PCI_PTM_CAP, reg);
> > +
> > +             reg = dw_pcie_readl_dbi(pci, ptm_cap_base + PCI_PTM_CAP);
> > +             reg &= ~(PCI_PTM_CAP_RES | PCI_PTM_GRANULARITY_MASK);
> > +             dw_pcie_writel_dbi(pci, ptm_cap_base + PCI_PTM_CAP, reg);
> > +             dw_pcie_dbi_ro_wr_dis(pci);
> > +     }
> > +
> >       dw_pcie_setup(pci);
> >       dw_pcie_dbi_ro_wr_dis(pci);
> >
> > --
> > 2.17.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ