All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Faidon Liambotis <paravoid@debian.org>,
	Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH] MIPS: octeon: fix DT pruning bug with pip ports
Date: Thu, 18 Jul 2013 10:45:21 -0700	[thread overview]
Message-ID: <51E829B1.40406@gmail.com> (raw)
In-Reply-To: <1373580489-23142-1-git-send-email-paravoid@debian.org>

On 07/11/2013 03:08 PM, Faidon Liambotis wrote:
> During the pruning of the device tree octeon_fdt_pip_iface() is called
> for each PIP interface and every port up to the port count is removed
> from the device tree. However, the count was set to the return value of
> cvmx_helper_interface_enumerate() which doesn't actually return the
> count but just returns zero on success. This effectively removed *all*
> ports from the tree.
>
> Use cvmx_helper_ports_on_interface() instead to fix this. This
> successfully restores the 3 ports of my ERLite-3 and fixes the "kernel
> assigns random MAC addresses" issue.
>
> Signed-off-by: Faidon Liambotis <paravoid@debian.org>

Yes, this seems to be correct.  It doesn't seem to break my ebt3000 
board so...

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

Ralf, please try to get it merged for 3.11, thanks.



> ---
>   arch/mips/cavium-octeon/octeon-platform.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
> index 389512e..250eb20 100644
> --- a/arch/mips/cavium-octeon/octeon-platform.c
> +++ b/arch/mips/cavium-octeon/octeon-platform.c
> @@ -334,9 +334,10 @@ static void __init octeon_fdt_pip_iface(int pip, int idx, u64 *pmac)
>   	char name_buffer[20];
>   	int iface;
>   	int p;
> -	int count;
> +	int count = 0;
>
> -	count = cvmx_helper_interface_enumerate(idx);
> +	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);
>

      parent reply	other threads:[~2013-07-18 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 22:08 [PATCH] MIPS: octeon: fix DT pruning bug with pip ports Faidon Liambotis
2013-07-14 19:09 ` Aaro Koskinen
2013-07-18 17:45 ` David Daney [this message]

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=51E829B1.40406@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=linux-mips@linux-mips.org \
    --cc=paravoid@debian.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 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.