linux-mips
[Top] [All Lists]

Re: [PATCH v2 2/2] MIPS: cavium-octeon: fix early boot hang on EBH5600 b

To: Aaro Koskinen <aaro.koskinen@nsn.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH v2 2/2] MIPS: cavium-octeon: fix early boot hang on EBH5600 board
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 08 Nov 2013 13:46:14 -0800
Cc: David Daney <david.daney@cavium.com>, linux-mips@linux-mips.org, Aaro Koskinen <aaro.koskinen@iki.fi>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=X51N5pxR8VdEoAVORhcR/FuPoKLJa/HmHyk4Bz5bhKQ=; b=ftxqI1Lrs6Yzf+AqUTqW34wDNkvi4A2IeJHSg93IAOK4KCRFL/lnnXpTr/eUPicJlF w44qmZ9DMdNzHjmpH7gzcfv0lD19MyCOPepnLCgg3FF/lMN0a+SHowXZsNGRain9yZJg v2vj4DbfhmksNP0+Xu5LylRVfEyYvAAdF8zJrdsF1CwNKxaRyATK+ZdSOL8DZdPxtN2d /h+I3i6tfWETPDMyo2dXWOnWlI1kKOMn6m4J/jEhkOZvxyZkdbl7rxX4ZjRYqOb620et +X7olv4zjdPm+ZXzGtRWFKRiudLaQYA8IRHkOec5D4jx9nj9pMLIwlJgfgF/ayouqAUM XK/g==
In-reply-to: <1383318364-30312-2-git-send-email-aaro.koskinen@nsn.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1383318364-30312-1-git-send-email-aaro.koskinen@nsn.com> <1383318364-30312-2-git-send-email-aaro.koskinen@nsn.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
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);
  }



<Prev in Thread] Current Thread [Next in Thread>