mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: ledphilippe@gmail.com
To: barebox@lists.infradead.org, ledphilippe@gmail.com
Subject: [PATCH] net: cpsw: Fix crashes on beaglebone black
Date: Sat, 27 Dec 2014 15:39:26 +0100	[thread overview]
Message-ID: <3444471.6ba7DjKbWe@laroq> (raw)

Hello,

The current version (2014.12.0-00116-ge91702b) crashes on the beaglebone black 
if the ethernet driver is enabled. Here is the trace:

barebox 2014.12.0-00116-ge91702b #15 Sat Dec 27 15:30:25 CET 2014


Board: TI AM335x BeagleBone black
detected 'BeagleBone Black'
cpsw 4a100000.ethernet: detected phy mask 0x1
mdio_bus: miibus0: probed
eth0: got preset MAC address: d0:39:72:41:0a:26
cpsw 4a100000.ethernet: probe failed: I/O error
unable to handle paging request at address 0x6e6f62f2
pc : [<9fe24e4a>]    lr : [<9fe0751f>]
sp : 9ffffe60  ip : ffffffff  fp : 00000000
r10: 8ff1d8b8  r9 : 8ff12534  r8 : 8ff1d974
r7 : ffffffff  r6 : 8ff1d8e0  r5 : 9fe55220  r4 : 6e6f62f2
r3 : 00000000  r2 : 00000000  r1 : 8ff1d8e0  r0 : 6e6f62f2
Flags: nZCV  IRQs off  FIQs on  Mode SVC_32
[<9fe24e4a>] (strcmp+0xc/0x1a) from [<9fe0751f>] 
(get_device_by_name_id+0x1f/0x38)
[<9fe0751f>] (get_device_by_name_id+0x1f/0x38) from [<9fe07837>] 
(register_device+0x17/0xc8)
[<9fe07837>] (register_device+0x17/0xc8) from [<9fe1dcb3>] 
(of_platform_device_create+0x17b/0x1b0)
[<9fe1dcb3>] (of_platform_device_create+0x17b/0x1b0) from [<9fe1dd13>] 
(of_platform_bus_create+0x2b/0x68)
[<9fe1dd13>] (of_platform_bus_create+0x2b/0x68) from [<9fe1dda7>] 
(of_platform_populate+0x2f/0x44)
[<9fe1dda7>] (of_platform_populate+0x2f/0x44) from [<9fe07967>] 
(platform_probe+0x9/0xa)
[<9fe07967>] (platform_probe+0x9/0xa) from [<9fe07561>] 
(device_probe+0x11/0x44)
[<9fe07561>] (device_probe+0x11/0x44) from [<9fe075bb>] 
(match.part.2+0x27/0x2e)
[<9fe075bb>] (match.part.2+0x27/0x2e) from [<9fe076d5>] 
(register_driver+0x59/0x74)
[<9fe076d5>] (register_driver+0x59/0x74) from [<9fe00827>] 
(start_barebox+0x1b/0xb8)
[<9fe00827>] (start_barebox+0x1b/0xb8) from [<9fe3291f>] (__start+0xa3/0xb8)
[<9fe3291f>] (__start+0xa3/0xb8) from [<9fe00005>] (__bare_init_start+0x1/0xc)

[<9fe32349>] (unwind_backtrace+0x1/0x58) from [<9fe258e9>] (panic+0x1d/0x34)
[<9fe258e9>] (panic+0x1d/0x34) from [<9fe327e1>] (do_exception+0xd/0x10)
[<9fe327e1>] (do_exception+0xd/0x10) from [<9fe32849>] 
(do_data_abort+0x21/0x2c)
[<9fe32849>] (do_data_abort+0x21/0x2c) from [<9fe32508>] 
(data_abort+0x48/0x60)



The following patch resolves the problem on my board. Please review it and 
check if it is fine.

Regards,


Signed-off-by: Philippe Leduc <ledphilippe@gmail.com>
---
 drivers/net/cpsw.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index b6618ad..311cd44 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -1202,10 +1202,8 @@ int cpsw_probe(struct device_d *dev)
                struct phy_device *phy;
 
                phy = mdiobus_scan(&priv->miibus, priv->slaves[i].phy_id);
-               if (IS_ERR(phy)) {
-                       ret = PTR_ERR(phy);
-                       goto out;
-               }
+               if (IS_ERR(phy))
+                       continue;
 
                phy->dev.device_node = priv->slaves[i].dev.device_node;
                ret = phy_register_device(phy);
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2014-12-27 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 14:39 ledphilippe [this message]
2015-01-05 12:35 ` Teresa Gámez
2015-01-06 14:16   ` Sascha Hauer

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=3444471.6ba7DjKbWe@laroq \
    --to=ledphilippe@gmail.com \
    --cc=barebox@lists.infradead.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