Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1581103
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | songxiaowei <songxiaowei@huawei.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] PCI-DW: ARM64: check the result of hos_init |
| Date | Wed, 15 Feb 2017 09:00:02 +0100 |
| Message-ID | <tb2Fk-5kr-7@gated-at.bofh.it> (permalink) |
| X-Original-To | <jingoohan1@gmail.com>, <Joao.Pinto@synopsys.com>, <bhelgaas@google.com>, <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org> |
| X-Mailer | git-send-email 2.11.GIT |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-Originating-IP | [100.107.55.164] |
| X-Cfilter-Loop | Reflected |
| X-Mirapoint-Virus-Rapid-Raw | score=unknown(0), refid=str=0001.0A090202.58A408B1.0079,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 |
| X-Mirapoint-Loop-ID | 9e703dca812e7a50bfa977cb1fe27dbe |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <songxiaowei@hisilicon.com>, <wangbinghui@hisilicon.com> |
| X-Original-Date | Wed, 15 Feb 2017 15:52:04 +0800 |
| X-Original-Message-ID | <20170215075204.114925-1-songxiaowei@huawei.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1581103 |
Show key headers only | View raw
Enumeration should be prevented
when Host initialization fails.
Only one device link with Host escpecially,
if host initialization fails or
establishling link-up is not successful,
there may no need for the Enumeration.
Signed-off-by: songxiaowei <songxiaowei@huawei.com>
---
drivers/pci/host/pcie-designware.c | 7 +++++--
drivers/pci/host/pcie-designware.h | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index bed19994c1e9..561a2edaf06f 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -637,8 +637,11 @@ int dw_pcie_host_init(struct pcie_port *pp)
}
}
- if (pp->ops->host_init)
- pp->ops->host_init(pp);
+ if (pp->ops->host_init) {
+ ret = pp->ops->host_init(pp);
+ if (ret)
+ return ret;
+ }
pp->root_bus_nr = pp->busn->start;
if (IS_ENABLED(CONFIG_PCI_MSI)) {
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
index a567ea288ee2..eacf18f9fc79 100644
--- a/drivers/pci/host/pcie-designware.h
+++ b/drivers/pci/host/pcie-designware.h
@@ -63,7 +63,7 @@ struct pcie_host_ops {
int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus,
unsigned int devfn, int where, int size, u32 val);
int (*link_up)(struct pcie_port *pp);
- void (*host_init)(struct pcie_port *pp);
+ int (*host_init)(struct pcie_port *pp);
void (*msi_set_irq)(struct pcie_port *pp, int irq);
void (*msi_clear_irq)(struct pcie_port *pp, int irq);
phys_addr_t (*get_msi_addr)(struct pcie_port *pp);
--
2.11.GIT
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] PCI-DW: ARM64: check the result of hos_init songxiaowei <songxiaowei@huawei.com> - 2017-02-15 09:00 +0100 Re: [PATCH] PCI-DW: ARM64: check the result of hos_init kbuild test robot <lkp@intel.com> - 2017-02-15 09:50 +0100
csiph-web