From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f193.google.com ([209.85.220.193]:34729 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753824AbcJRQaw (ORCPT ); Tue, 18 Oct 2016 12:30:52 -0400 Received: by mail-qk0-f193.google.com with SMTP id n189so17262693qke.1 for ; Tue, 18 Oct 2016 09:30:51 -0700 (PDT) From: "Jingoo Han" To: "'Lucas Stach'" , "'Bjorn Helgaas'" Cc: "'Pratyush Anand'" , , "'Gary Bisson'" , , References: <20161018082549.10905-1-l.stach@pengutronix.de> In-Reply-To: <20161018082549.10905-1-l.stach@pengutronix.de> Subject: Re: [PATCH resend] PCI: designware: fix register access before host init Date: Tue, 18 Oct 2016 12:30:49 -0400 Message-ID: <000001d2295c$fcfdfec0$f6f9fc40$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-pci-owner@vger.kernel.org List-ID: On Tuesday, October 18, 2016 4:26 AM, Lucas Stach wrote: > > The function used to determine if iATU unroll is available will read a RC register. > This is not possible and will result in a system hang if the RC is still in reset, > so it is only safe to call this function after host_init() has been called. > > Fixes: a0601a470537 (PCI: designware: Add iATU Unroll feature) > Reported-by: Gary Bisson > Tested-by: Gary Bisson > Signed-off-by: Lucas Stach It looks good! Acked-by: Jingoo Han > --- > drivers/pci/host/pcie-designware.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c > index 035f50c03281..74510508fafc 100644 > --- a/drivers/pci/host/pcie-designware.c > +++ b/drivers/pci/host/pcie-designware.c > @@ -637,11 +637,11 @@ int dw_pcie_host_init(struct pcie_port *pp) > } > } > > - pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp); > - > if (pp->ops->host_init) > pp->ops->host_init(pp); > > + pp->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pp); > + > pp->root_bus_nr = pp->busn->start; > if (IS_ENABLED(CONFIG_PCI_MSI)) { > bus = pci_scan_root_bus_msi(pp->dev, pp->root_bus_nr, > -- > 2.9.3