All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] fix: mvebu: pcie_dw: Allow probing empty PCIe slots
Date: Thu, 30 Mar 2017 15:39:03 +0200	[thread overview]
Message-ID: <c6b5701d-b8ed-4f9e-c13b-25de101b7bb6@denx.de> (raw)
In-Reply-To: <1490715395-24751-3-git-send-email-kostap@marvell.com>

On 28.03.2017 17:36, kostap at marvell.com wrote:
> From: Konstantin Porotchkin <kostap@marvell.com>
>
> This patch allows probing all PCIe nodes defined in DTS
> even if there no device connected to such node (no link).
> Without this fix the driver returns -ENODEV when the PCIe
> link is down. As result the pci_init function stops
> scanning bus on first empty PCIe slot and all devices
> located in higher numbered buses are not discovered.
>
> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Igal Liberman <igall@marvell.com>
> Cc: Nadav Haklai <nadavh@marvell.com>
> ---
>  drivers/pci/pcie_dw_mvebu.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
> index d4776a9..05a0660 100644
> --- a/drivers/pci/pcie_dw_mvebu.c
> +++ b/drivers/pci/pcie_dw_mvebu.c
> @@ -487,13 +487,13 @@ static int pcie_dw_mvebu_probe(struct udevice *dev)
>  	/* Don't register host if link is down */
>  	if (!pcie_dw_mvebu_pcie_link_up(pcie->ctrl_base, LINK_SPEED_GEN_3)) {
>  		printf("PCIE-%d: Link down\n", dev->seq);
> -		return -ENODEV;
> +	} else {
> +		printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
> +		       pcie_dw_get_link_speed(pcie->ctrl_base),
> +		       pcie_dw_get_link_width(pcie->ctrl_base),
> +		       hose->first_busno);
>  	}
>
> -	printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
> -	       pcie_dw_get_link_speed(pcie->ctrl_base),
> -	       pcie_dw_get_link_width(pcie->ctrl_base), hose->first_busno);
> -
>  	pcie_dw_regions_setup(pcie);
>
>  	/* Set the CLASS_REV of RC CFG header to PCI_CLASS_BRIDGE_PCI */
>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

  reply	other threads:[~2017-03-30 13:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 15:36 [U-Boot] [PATCH 0/3] Marvell A7K/A8K PCIe fixes and extensions kostap at marvell.com
2017-03-28 15:36 ` [U-Boot] [PATCH 1/3] arm64: mvebu: Trigger PCI devices scan at early init stage kostap at marvell.com
2017-03-30 13:31   ` Stefan Roese
2017-03-30 13:58     ` Konstantin Porotchkin
2017-04-01  4:23       ` Simon Glass
2017-04-02 11:50         ` [U-Boot] [EXT] " Konstantin Porotchkin
2017-04-09 19:27           ` Simon Glass
2017-03-28 15:36 ` [U-Boot] [PATCH 2/3] fix: mvebu: pcie_dw: Allow probing empty PCIe slots kostap at marvell.com
2017-03-30 13:39   ` Stefan Roese [this message]
2017-05-09 14:42   ` Stefan Roese
2017-03-28 15:36 ` [U-Boot] [PATCH 3/3] mvebu: dts: a80x0: Sync the DB DTS with standard config A kostap at marvell.com
2017-03-30 13:40   ` Stefan Roese

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=c6b5701d-b8ed-4f9e-c13b-25de101b7bb6@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.