Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Aaro Koskinen <aaro.koskinen@nsn.com>,
	Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <david.daney@cavium.com>,
	linux-mips@linux-mips.org, Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH v2 2/2] MIPS: cavium-octeon: fix early boot hang on EBH5600 board
Date: Fri, 08 Nov 2013 13:46:14 -0800	[thread overview]
Message-ID: <527D5BA6.3070300@gmail.com> (raw)
In-Reply-To: <1383318364-30312-2-git-send-email-aaro.koskinen@nsn.com>

On 11/01/2013 08:06 AM, Aaro Koskinen wrote:
> The boot hangs early on EBH5600 board when octeon_fdt_pip_iface() is
> trying enumerate a non-existant interface. The actual hang happens in
> cvmx_helper_interface_get_mode():
>
> 	mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
>
> when interface == 4. We can avoid this situation by first checking that
> the interface exists in the DTB.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>

Thanks for finding this,  tested and ...

Acked-by: David Daney <david.daney@cavium.com>


Ralf:  Please apply.

Aaro: Suggest stable branches that this is a candidate for.


> ---
>
> 	v2: Provide more detailed problem description.
>
>   arch/mips/cavium-octeon/octeon-platform.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
> index 1830874..f68c75a 100644
> --- a/arch/mips/cavium-octeon/octeon-platform.c
> +++ b/arch/mips/cavium-octeon/octeon-platform.c
> @@ -336,14 +336,14 @@ static void __init octeon_fdt_pip_iface(int pip, int idx, u64 *pmac)
>   	int p;
>   	int count = 0;
>
> -	if (cvmx_helper_interface_enumerate(idx) == 0)
> -		count = cvmx_helper_ports_on_interface(idx);
> -
>   	snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx);
>   	iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer);
>   	if (iface < 0)
>   		return;
>
> +	if (cvmx_helper_interface_enumerate(idx) == 0)
> +		count = cvmx_helper_ports_on_interface(idx);
> +
>   	for (p = 0; p < 16; p++)
>   		octeon_fdt_pip_port(iface, idx, p, count - 1, pmac);
>   }
>

  reply	other threads:[~2013-11-08 21:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 15:06 [PATCH v2 1/2] MIPS: cavium-octeon: fix out-of-bounds array access Aaro Koskinen
2013-11-01 15:06 ` [PATCH v2 2/2] MIPS: cavium-octeon: fix early boot hang on EBH5600 board Aaro Koskinen
2013-11-08 21:46   ` David Daney [this message]
2013-11-08 21:45 ` [PATCH v2 1/2] MIPS: cavium-octeon: fix out-of-bounds array access David Daney
2013-11-08 23:27   ` Aaro Koskinen

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=527D5BA6.3070300@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=aaro.koskinen@nsn.com \
    --cc=david.daney@cavium.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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