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
| ||
|
Date: Thu, 30 May 2019 16:54:53 +0100 From: Lorenzo Pieralisi <lorenzo.pieralisi@....com> To: Niklas Cassel <niklas.cassel@...aro.org> Cc: Stanimir Varbanov <svarbanov@...sol.com>, Andy Gross <agross@...nel.org>, David Brown <david.brown@...aro.org>, Bjorn Helgaas <bhelgaas@...gle.com>, stable@...r.kernel.org, linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v2] PCI: qcom: Ensure that PERST is asserted for at least 100 ms On Wed, May 29, 2019 at 11:43:52AM +0200, Niklas Cassel wrote: > Currently, there is only a 1 ms sleep after asserting PERST. > > Reading the datasheets for different endpoints, some require PERST to be > asserted for 10 ms in order for the endpoint to perform a reset, others > require it to be asserted for 50 ms. > > Several SoCs using this driver uses PCIe Mini Card, where we don't know > what endpoint will be plugged in. > > The PCI Express Card Electromechanical Specification specifies: > "On power up, the deassertion of PERST# is delayed 100 ms (TPVPERL) from > the power rails achieving specified operating limits." > > Add a sleep of 100 ms before deasserting PERST, in order to ensure that > we are compliant with the spec. > > Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") > Signed-off-by: Niklas Cassel <niklas.cassel@...aro.org> > Acked-by: Stanimir Varbanov <svarbanov@...sol.com> > Cc: stable@...r.kernel.org # 4.5+ > --- > Changes since v1: > Move the sleep into qcom_ep_reset_deassert() > > drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ > 1 file changed, 2 insertions(+) Applied to pci/qcom for v5.3, thanks. Lorenzo > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index 0ed235d560e3..5d1713069d14 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -178,6 +178,8 @@ static void qcom_ep_reset_assert(struct qcom_pcie *pcie) > > static void qcom_ep_reset_deassert(struct qcom_pcie *pcie) > { > + /* Ensure that PERST has been asserted for at least 100 ms */ > + msleep(100); > gpiod_set_value_cansleep(pcie->reset, 0); > usleep_range(PERST_DELAY_US, PERST_DELAY_US + 500); > } > -- > 2.21.0 >
Powered by blists - more mailing lists