linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Wei <wei.zhang@freescale.com>
To: paulus@samba.org, galak@kernel.crashing.org
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] Fix the PCI-Ex link training bug on MPC8641HPCN board.
Date: Tue, 10 Jul 2007 14:34:12 +0800	[thread overview]
Message-ID: <11840492523488-git-send-email-wei.zhang@freescale.com> (raw)

If the PCI-Ex hose link training is failed, the kernel will halt at the
PCI scan process on MPC8641HPCN board.

This patch will remove and free the hose from PCI host list if the
PCI hose link training is failed.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
 arch/powerpc/platforms/86xx/pci.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index 73cd5b0..0b7835c 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -210,8 +210,10 @@ int __init mpc86xx_add_bridge(struct device_node *dev)
 
 	/* Probe the hose link training status */
 	early_read_config_word(hose, 0, 0, PCIE_LTSSM, &val);
-	if (val < PCIE_LTSSM_L0)
+	if (val < PCIE_LTSSM_L0) {
+		pcibios_free_controller(hose);
 		return -ENXIO;
+	}
 
 	/* Setup the PCIE host controller. */
 	mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1);
-- 
1.5.1

             reply	other threads:[~2007-07-10  6:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10  6:34 Zhang Wei [this message]
2007-07-10 14:36 ` [PATCH] Fix the PCI-Ex link training bug on MPC8641HPCN board Kumar Gala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11840492523488-git-send-email-wei.zhang@freescale.com \
    --to=wei.zhang@freescale.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).