* [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility
@ 2014-11-03 19:59 Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware Iyappan Subramanian
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Iyappan Subramanian @ 2014-11-03 19:59 UTC (permalink / raw)
To: davem, netdev, devicetree
Cc: linux-arm-kernel, patches, kchudgar, Iyappan Subramanian
This patch set fixes the following issues that were reported during regression.
Patch 1,2 : Adds backward compatibility with the older firmware (<= 1.13.28).
Patch 3 : Use separate hardware resources (descriptor ring, prefetch buffer)
that are not shared with the firmware
---
Iyappan Subramanian (3):
dtb: xgene: fix: Backward compatibility with older firmware
drivers: net: xgene: Backward compatibility with older firmware
drivers: net: xgene: fix: Use separate resources
arch/arm64/boot/dts/apm-storm.dtsi | 10 +++++-----
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 18 +++++++++++++++++-
drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 4 ++++
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 11 +++++++----
drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 5 ++++-
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 7 ++++++-
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 7 ++++++-
7 files changed, 49 insertions(+), 13 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware
2014-11-03 19:59 [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility Iyappan Subramanian
@ 2014-11-03 19:59 ` Iyappan Subramanian
[not found] ` <1415044796-5081-2-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2014-11-03 19:59 ` [PATCH v2 2/3] drivers: net: xgene: " Iyappan Subramanian
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Iyappan Subramanian @ 2014-11-03 19:59 UTC (permalink / raw)
To: davem, netdev, devicetree
Cc: linux-arm-kernel, patches, kchudgar, Iyappan Subramanian
The following kernel crash was reported when using older firmware (<= 1.13.28).
[ 0.980000] libphy: APM X-Gene MDIO bus: probed
[ 1.130000] Unhandled fault: synchronous external abort (0x96000010) at 0xffffff800009a17c
[ 1.140000] Internal error: : 96000010 [#1] SMP
[ 1.140000] Modules linked in:
[ 1.140000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0+ #21
[ 1.140000] task: ffffffc3f0110000 ti: ffffffc3f0064000 task.ti: ffffffc3f0064000
[ 1.140000] PC is at ioread32+0x58/0x68
[ 1.140000] LR is at xgene_enet_setup_ring+0x18c/0x1cc
[ 1.140000] pc : [<ffffffc0003cec68>] lr : [<ffffffc00053dad8>] pstate: a0000045
[ 1.140000] sp : ffffffc3f0067b20
[ 1.140000] x29: ffffffc3f0067b20 x28: ffffffc000aa8ea0
[ 1.140000] x27: ffffffc000bb2000 x26: ffffffc000a64270
[ 1.140000] x25: ffffffc000b05ad8 x24: ffffffc0ff99ba58
[ 1.140000] x23: 0000000000004000 x22: 0000000000004000
[ 1.140000] x21: 0000000000000200 x20: 0000000000200000
[ 1.140000] x19: ffffffc0ff99ba18 x18: ffffffc0007a6000
[ 1.140000] x17: 0000000000000007 x16: 000000000000000e
[ 1.140000] x15: 0000000000000001 x14: 0000000000000000
[ 1.140000] x13: ffffffbeedb71320 x12: 00000000ffffff80
[ 1.140000] x11: 0000000000000002 x10: 0000000000000000
[ 1.140000] x9 : 0000000000000000 x8 : ffffffc3eb2a4000
[ 1.140000] x7 : 0000000000000000 x6 : 0000000000000000
[ 1.140000] x5 : 0000000001080000 x4 : 000000007d654010
[ 1.140000] x3 : ffffffffffffffff x2 : 000000000003ffff
[ 1.140000] x1 : ffffff800009a17c x0 : ffffff800009a17c
The issue was that the older firmware does not support 10GbE and
SGMII based 1GBE interfaces.
This patch changes the address length of the reg property of sgmii0 and xgmii
nodes and serves as preparatory patch for the fix.
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
Reported-by: Dann Frazier <dann.frazier@canonical.com>
---
arch/arm64/boot/dts/apm-storm.dtsi | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi
index 295c72d..f1ad9c2 100644
--- a/arch/arm64/boot/dts/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm-storm.dtsi
@@ -599,7 +599,7 @@
compatible = "apm,xgene-enet";
status = "disabled";
reg = <0x0 0x17020000 0x0 0xd100>,
- <0x0 0X17030000 0x0 0X400>,
+ <0x0 0X17030000 0x0 0Xc300>,
<0x0 0X10000000 0x0 0X200>;
reg-names = "enet_csr", "ring_csr", "ring_cmd";
interrupts = <0x0 0x3c 0x4>;
@@ -624,9 +624,9 @@
sgenet0: ethernet@1f210000 {
compatible = "apm,xgene-enet";
status = "disabled";
- reg = <0x0 0x1f210000 0x0 0x10000>,
- <0x0 0x1f200000 0x0 0X10000>,
- <0x0 0x1B000000 0x0 0X20000>;
+ reg = <0x0 0x1f210000 0x0 0xd100>,
+ <0x0 0x1f200000 0x0 0Xc300>,
+ <0x0 0x1B000000 0x0 0X200>;
reg-names = "enet_csr", "ring_csr", "ring_cmd";
interrupts = <0x0 0xA0 0x4>;
dma-coherent;
@@ -639,7 +639,7 @@
compatible = "apm,xgene-enet";
status = "disabled";
reg = <0x0 0x1f610000 0x0 0xd100>,
- <0x0 0x1f600000 0x0 0X400>,
+ <0x0 0x1f600000 0x0 0Xc300>,
<0x0 0x18000000 0x0 0X200>;
reg-names = "enet_csr", "ring_csr", "ring_cmd";
interrupts = <0x0 0x60 0x4>;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] drivers: net: xgene: Backward compatibility with older firmware
2014-11-03 19:59 [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware Iyappan Subramanian
@ 2014-11-03 19:59 ` Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 3/3] drivers: net: xgene: fix: Use separate resources Iyappan Subramanian
2014-11-04 22:09 ` [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility David Miller
3 siblings, 0 replies; 7+ messages in thread
From: Iyappan Subramanian @ 2014-11-03 19:59 UTC (permalink / raw)
To: davem, netdev, devicetree
Cc: linux-arm-kernel, patches, kchudgar, Iyappan Subramanian
This patch adds support when used with older firmware (<= 1.13.28).
- Added xgene_ring_mgr_init() to check whether ring manager is initialized
- Calling xgene_ring_mgr_init() from xgene_port_ops.reset()
- To handle errors, changed the return type of xgene_port_ops.reset()
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
---
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 18 +++++++++++++++++-
drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 4 ++++
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 5 ++++-
drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 2 +-
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 7 ++++++-
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 7 ++++++-
6 files changed, 38 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
index 63ea194..7ba83ff 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
@@ -575,10 +575,24 @@ static void xgene_gmac_tx_disable(struct xgene_enet_pdata *pdata)
xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, data & ~TX_EN);
}
-static void xgene_enet_reset(struct xgene_enet_pdata *pdata)
+bool xgene_ring_mgr_init(struct xgene_enet_pdata *p)
+{
+ if (!ioread32(p->ring_csr_addr + CLKEN_ADDR))
+ return false;
+
+ if (ioread32(p->ring_csr_addr + SRST_ADDR))
+ return false;
+
+ return true;
+}
+
+static int xgene_enet_reset(struct xgene_enet_pdata *pdata)
{
u32 val;
+ if (!xgene_ring_mgr_init(pdata))
+ return -ENODEV;
+
clk_prepare_enable(pdata->clk);
clk_disable_unprepare(pdata->clk);
clk_prepare_enable(pdata->clk);
@@ -590,6 +604,8 @@ static void xgene_enet_reset(struct xgene_enet_pdata *pdata)
val |= SCAN_AUTO_INCR;
MGMT_CLOCK_SEL_SET(&val, 1);
xgene_enet_wr_mcx_mac(pdata, MII_MGMT_CONFIG_ADDR, val);
+
+ return 0;
}
static void xgene_gport_shutdown(struct xgene_enet_pdata *pdata)
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
index 3855858..ec45f32 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
@@ -104,6 +104,9 @@ enum xgene_enet_rm {
#define BLOCK_ETH_MAC_OFFSET 0x0000
#define BLOCK_ETH_MAC_CSR_OFFSET 0x2800
+#define CLKEN_ADDR 0xc208
+#define SRST_ADDR 0xc200
+
#define MAC_ADDR_REG_OFFSET 0x00
#define MAC_COMMAND_REG_OFFSET 0x04
#define MAC_WRITE_REG_OFFSET 0x08
@@ -318,6 +321,7 @@ void xgene_enet_parse_error(struct xgene_enet_desc_ring *ring,
int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata);
void xgene_enet_mdio_remove(struct xgene_enet_pdata *pdata);
+bool xgene_ring_mgr_init(struct xgene_enet_pdata *p);
extern struct xgene_mac_ops xgene_gmac_ops;
extern struct xgene_port_ops xgene_gport_ops;
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 3c208cc..cc3f955 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -852,7 +852,9 @@ static int xgene_enet_init_hw(struct xgene_enet_pdata *pdata)
u16 dst_ring_num;
int ret;
- pdata->port_ops->reset(pdata);
+ ret = pdata->port_ops->reset(pdata);
+ if (ret)
+ return ret;
ret = xgene_enet_create_desc_rings(ndev);
if (ret) {
@@ -954,6 +956,7 @@ static int xgene_enet_probe(struct platform_device *pdev)
return ret;
err:
+ unregister_netdev(ndev);
free_netdev(ndev);
return ret;
}
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
index 874e5a0..dba647d 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
@@ -83,7 +83,7 @@ struct xgene_mac_ops {
};
struct xgene_port_ops {
- void (*reset)(struct xgene_enet_pdata *pdata);
+ int (*reset)(struct xgene_enet_pdata *pdata);
void (*cle_bypass)(struct xgene_enet_pdata *pdata,
u32 dst_ring_num, u16 bufpool_id);
void (*shutdown)(struct xgene_enet_pdata *pdata);
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
index c22f326..f5d4f68 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
@@ -311,14 +311,19 @@ static void xgene_sgmac_tx_disable(struct xgene_enet_pdata *p)
xgene_sgmac_rxtx(p, TX_EN, false);
}
-static void xgene_enet_reset(struct xgene_enet_pdata *p)
+static int xgene_enet_reset(struct xgene_enet_pdata *p)
{
+ if (!xgene_ring_mgr_init(p))
+ return -ENODEV;
+
clk_prepare_enable(p->clk);
clk_disable_unprepare(p->clk);
clk_prepare_enable(p->clk);
xgene_enet_ecc_init(p);
xgene_enet_config_ring_if_assoc(p);
+
+ return 0;
}
static void xgene_enet_cle_bypass(struct xgene_enet_pdata *p,
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
index 67d0720..a18a9d1 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
@@ -252,14 +252,19 @@ static void xgene_xgmac_tx_disable(struct xgene_enet_pdata *pdata)
xgene_enet_wr_mac(pdata, AXGMAC_CONFIG_1, data & ~HSTTFEN);
}
-static void xgene_enet_reset(struct xgene_enet_pdata *pdata)
+static int xgene_enet_reset(struct xgene_enet_pdata *pdata)
{
+ if (!xgene_ring_mgr_init(pdata))
+ return -ENODEV;
+
clk_prepare_enable(pdata->clk);
clk_disable_unprepare(pdata->clk);
clk_prepare_enable(pdata->clk);
xgene_enet_ecc_init(pdata);
xgene_enet_config_ring_if_assoc(pdata);
+
+ return 0;
}
static void xgene_enet_xgcle_bypass(struct xgene_enet_pdata *pdata,
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] drivers: net: xgene: fix: Use separate resources
2014-11-03 19:59 [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 2/3] drivers: net: xgene: " Iyappan Subramanian
@ 2014-11-03 19:59 ` Iyappan Subramanian
2014-11-04 22:09 ` [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility David Miller
3 siblings, 0 replies; 7+ messages in thread
From: Iyappan Subramanian @ 2014-11-03 19:59 UTC (permalink / raw)
To: davem, netdev, devicetree
Cc: linux-arm-kernel, patches, kchudgar, Iyappan Subramanian
This patch fixes the following kernel crash during SGMII based 1GbE probe.
BUG: Bad page state in process swapper/0 pfn:40fe6ad
page:ffffffbee37a75d8 count:-1 mapcount:0 mapping: (null) index:0x0
flags: 0x0()
page dumped because: nonzero _count
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.17.0+ #7
Call trace:
[<ffffffc000087fa0>] dump_backtrace+0x0/0x12c
[<ffffffc0000880dc>] show_stack+0x10/0x1c
[<ffffffc0004d981c>] dump_stack+0x74/0xc4
[<ffffffc00012fe70>] bad_page+0xd8/0x128
[<ffffffc000133000>] get_page_from_freelist+0x4b8/0x640
[<ffffffc000133260>] __alloc_pages_nodemask+0xd8/0x834
[<ffffffc0004194f8>] __netdev_alloc_frag+0x124/0x1b8
[<ffffffc00041bfdc>] __netdev_alloc_skb+0x90/0x10c
[<ffffffc00039ff30>] xgene_enet_refill_bufpool+0x11c/0x280
[<ffffffc0003a11a4>] xgene_enet_process_ring+0x168/0x340
[<ffffffc0003a1498>] xgene_enet_napi+0x1c/0x50
[<ffffffc00042b454>] net_rx_action+0xc8/0x18c
[<ffffffc0000b0880>] __do_softirq+0x114/0x24c
[<ffffffc0000b0c34>] irq_exit+0x94/0xc8
[<ffffffc0000e68a0>] __handle_domain_irq+0x8c/0xf4
[<ffffffc000081288>] gic_handle_irq+0x30/0x7c
This was due to hardware resource sharing conflict with the firmware. This
patch fixes this crash by using resources (descriptor ring, prefetch buffer)
that are not shared.
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
---
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 6 +++---
drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index cc3f955..1236696 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -639,9 +639,9 @@ static int xgene_enet_create_desc_rings(struct net_device *ndev)
struct device *dev = ndev_to_dev(ndev);
struct xgene_enet_desc_ring *rx_ring, *tx_ring, *cp_ring;
struct xgene_enet_desc_ring *buf_pool = NULL;
- u8 cpu_bufnum = 0, eth_bufnum = 0;
- u8 bp_bufnum = 0x20;
- u16 ring_id, ring_num = 0;
+ u8 cpu_bufnum = 0, eth_bufnum = START_ETH_BUFNUM;
+ u8 bp_bufnum = START_BP_BUFNUM;
+ u16 ring_id, ring_num = START_RING_NUM;
int ret;
/* allocate rx descriptor ring */
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
index dba647d..f9958fa 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
@@ -38,6 +38,9 @@
#define SKB_BUFFER_SIZE (XGENE_ENET_MAX_MTU - NET_IP_ALIGN)
#define NUM_PKT_BUF 64
#define NUM_BUFPOOL 32
+#define START_ETH_BUFNUM 2
+#define START_BP_BUFNUM 0x22
+#define START_RING_NUM 8
#define PHY_POLL_LINK_ON (10 * HZ)
#define PHY_POLL_LINK_OFF (PHY_POLL_LINK_ON / 5)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility
2014-11-03 19:59 [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility Iyappan Subramanian
` (2 preceding siblings ...)
2014-11-03 19:59 ` [PATCH v2 3/3] drivers: net: xgene: fix: Use separate resources Iyappan Subramanian
@ 2014-11-04 22:09 ` David Miller
3 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-11-04 22:09 UTC (permalink / raw)
To: isubramanian; +Cc: netdev, devicetree, linux-arm-kernel, patches, kchudgar
From: Iyappan Subramanian <isubramanian@apm.com>
Date: Mon, 3 Nov 2014 11:59:53 -0800
> This patch set fixes the following issues that were reported during regression.
>
> Patch 1,2 : Adds backward compatibility with the older firmware (<= 1.13.28).
> Patch 3 : Use separate hardware resources (descriptor ring, prefetch buffer)
> that are not shared with the firmware
Series applied, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware
[not found] ` <1415044796-5081-2-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
@ 2015-01-09 15:59 ` Ian Campbell
2015-01-09 17:36 ` Ian Campbell
0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-01-09 15:59 UTC (permalink / raw)
To: Iyappan Subramanian
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
patches-qTEPVZfXA3Y, kchudgar-qTEPVZfXA3Y
Hi Iyappan,
On Mon, 2014-11-03 at 11:59 -0800, Iyappan Subramanian wrote:
> The following kernel crash was reported when using older firmware (<= 1.13.28).
>
> [ 0.980000] libphy: APM X-Gene MDIO bus: probed
> [ 1.130000] Unhandled fault: synchronous external abort (0x96000010) at 0xffffff800009a17c
> [ 1.140000] Internal error: : 96000010 [#1] SMP
> [ 1.140000] Modules linked in:
> [ 1.140000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0+ #21
> [ 1.140000] task: ffffffc3f0110000 ti: ffffffc3f0064000 task.ti: ffffffc3f0064000
> [ 1.140000] PC is at ioread32+0x58/0x68
> [ 1.140000] LR is at xgene_enet_setup_ring+0x18c/0x1cc
I'm seeing what appears to be a similar crash (see the end) when booting
using UEFI firmware, which provides the DTB itself (as opposed to using
the kernel provided one like with u-boot).
Trying to boot using the kernel DTB instead of the firmware provided one
fails, I think because the UEFI firmware normally updates a bunch of
stuff at runtime in what it provides, but it can't in the external one.
(i.e. it has the wrong spintable stuff for cpu bringup)
This is running Debian's 3.16 kernel, which has the APM Ethernet related
stuff backported:
$ git log --oneline v3.16.7..debian/jessie/xgene
b2553d6 arm64: removed using of the mask attribute in the dts for reset bit.
2d209a4 arm64: add missing dts entry for X-Gene platform.
60651f8 dtb: Add SGMII based 1GbE node to APM X-Gene SoC device tree
3f3c3da dtb: Add 10GbE node to APM X-Gene SoC device tree
33b5408 drivers: net: xgene: fix: Use separate resources
092e35e drivers: net: xgene: Backward compatibility with older firmware
9f2bc2c drivers: net: xgene: Rewrite buggy loop in xgene_enet_ecc_init()
c566829 drivers: net: xgene: Add SGMII based 1GbE ethtool support
30bf224 drivers: net: xgene: Add SGMII based 1GbE support
0d03931 drivers: net: xgene: Preparing for adding SGMII based 1GbE
23a92cd drivers: net: xgene: Add 10GbE ethtool support
226068a drivers: net: xgene: Add 10GbE support
33f8dba drivers: net: xgene: Preparing for adding 10GbE support
a7b5fd0 dts: Add bindings for APM X-Gene SoC ethernet driver
82df3ba drivers: net: NET_XGENE should depend on HAS_DMA
0dcba55 net: xgene: fix possible NULL dereference in xgene_enet_free_desc_rings()
2aa3e0d net: xgene: Check negative return value of xgene_enet_get_ring_size()
589e045 drivers: net: Add APM X-Gene SoC ethernet driver support.
With the builtin DTB I see:
(initramfs) od -A x -t x4 /proc/device-tree/soc/ethernet@17020000/reg
000000 00000000 00000217 00000000 00d10000
000010 00000000 00000317 00000000 00040000
000020 00000000 00000010 00000000 00020000
Which seems to correspond to before your patch.
I'm running mustang_sw_1.13.29-beta, using the mustang_tianocore_ubt.fd
method to launch from u-boot.
Ian.
[ 7.662085] Unhandled fault: synchronous external abort (0x96000010) at 0xffffff800009a208
[ 7.670332] Internal error: : 96000010 [#1] SMP
[ 7.674839] Modules linked in: xgene_enet(+) of_mdio libphy dm_mod(+)
[ 7.681300] CPU: 0 PID: 97 Comm: systemd-udevd Not tainted 3.16.0-4-arm64 #1 Debian 3.16.7-ckt2-1
[ 7.690126] task: ffffffc3f9ca0c80 ti: ffffffc3f9d2c000 task.ti: ffffffc3f9d2c000
[ 7.697571] PC is at ioread32+0x58/0x68
[ 7.701388] LR is at xgene_ring_mgr_init+0x28/0x58 [xgene_enet]
[ 7.707276] pc : [<ffffffc0002e5318>] lr : [<ffffffbffc035d18>] pstate: a0000145
[ 7.714632] sp : ffffffc3f9d2f9c0
[ 7.717926] x29: ffffffc3f9d2f9c0 x28: 0000000000000001
[ 7.723229] x27: ffffffc0006fa000 x26: 0000000000000000
[ 7.728533] x25: ffffffc3f9ce9000 x24: ffffffc3f9ce9000
[ 7.733836] x23: ffffffc3eb876010 x22: ffffffc3eb876000
[ 7.739138] x21: ffffffc000763000 x20: ffffffc3f9ce98c0
[ 7.744443] x19: ffffffc3f9ce98c0 x18: 00000000c3663f63
[ 7.749745] x17: 00000000c14123be x16: 00000000ca92bd38
[ 7.755048] x15: 00000000d02a0bde x14: 0000000000000000
[ 7.760350] x13: 0000000000000000 x12: 0000000000000000
[ 7.765652] x11: 0000000000000000 x10: 0000000000000000
[ 7.770955] x9 : 0000000000000000 x8 : 0000000000000000
[ 7.776257] x7 : 0000000000000000 x6 : 0000000000000000
[ 7.781559] x5 : ffffffc00074b310 x4 : 0000000000000000
[ 7.786861] x3 : 0000000000000000 x2 : 000000000003ffff
[ 7.792165] x1 : ffffff800009a208 x0 : ffffff800009a208
[ 7.797467]
[ 7.798948] Process systemd-udevd (pid: 97, stack limit = 0xffffffc3f9d2c058)
[ 7.806046] Stack: (0xffffffc3f9d2f9c0 to 0xffffffc3f9d30000)
[ 7.811762] f9c0: f9d2f9d0 ffffffc3 fc035d18 ffffffbf f9d2f9f0 ffffffc3 fc035d6c ffffffbf
[ 7.819897] f9e0: f9ce98c0 ffffffc3 f9d2f9e0 ffffffc3 f9d2fa30 ffffffc3 fc038110 ffffffbf
[ 7.828032] fa00: f9ce98c0 ffffffc3 f9ce9000 ffffffc3 00763000 ffffffc0 f9ce9000 ffffffc3
[ 7.836167] fa20: 0000005c 00000000 00000000 00000000 f9d2fa80 ffffffc3 00343d24 ffffffc0
[ 7.844302] fa40: eb876010 ffffffc3 fc039f38 ffffffbf 0075d000 ffffffc0 00000000 00000000
[ 7.852436] fa60: fc039f60 ffffffbf 00000000 00000000 00000001 00000000 00000000 00000000
[ 7.860571] fa80: f9d2faa0 ffffffc3 00341ad0 ffffffc0 eb876010 ffffffc3 007cb000 ffffffc0
[ 7.868706] faa0: f9d2faf0 ffffffc3 00341edc ffffffc0 eb876010 ffffffc3 fc039f60 ffffffbf
[ 7.876840] fac0: eb876070 ffffffc3 00000000 00000000 0073d000 ffffffc0 00000000 00000000
[ 7.884974] fae0: fec449c0 ffffffc0 0033fa04 ffffffc0 f9d2fb20 ffffffc3 0033f9f8 ffffffc0
[ 7.893109] fb00: 00000000 00000000 fc039f60 ffffffbf 00341e30 ffffffc0 00000000 00000000
[ 7.901244] fb20: f9d2fb70 ffffffc3 003414f8 ffffffc0 fc039f60 ffffffbf f9c5d100 ffffffc3
[ 7.909378] fb40: 0073dd40 ffffffc0 ffffffe0 00000000 f9d2fb70 ffffffc3 00000000 00000000
[ 7.917512] fb60: eba48aa8 ffffffc3 ff4328e8 ffffffc3 f9d2fb90 ffffffc3 003410b4 ffffffc0
[ 7.925647] fb80: fc039f60 ffffffbf fc039f60 ffffffbf f9d2fbd0 ffffffc3 0034276c ffffffc0
[ 7.933781] fba0: fc039f60 ffffffbf fec4df00 ffffffc0 00000000 00000000 fc03d000 ffffffbf
[ 7.941916] fbc0: f9d2c000 ffffffc3 0073dd40 ffffffc0 f9d2fc00 ffffffc3 00343cec ffffffc0
[ 7.950050] fbe0: fc039f38 ffffffbf fec4df00 ffffffc0 006e07a0 ffffffc0 f9d2fc40 ffffffc3
[ 7.958185] fc00: f9d2fc30 ffffffc3 fc03d01c ffffffbf 006e07a0 ffffffc0 00081490 ffffffc0
[ 7.966319] fc20: 006e07a0 ffffffc0 fc03a240 ffffffbf f9d2fc40 ffffffc3 000814a0 ffffffc0
[ 7.974453] fc40: f9d2fcc0 ffffffc3 00109f30 ffffffc0 f9d2fe70 ffffffc3 00000001 00000000
[ 7.982588] fc60: fc03a258 ffffffbf f9d2c000 ffffffc3 fc03a290 ffffffbf fc03a240 ffffffbf
[ 7.990723] fc80: 0007d000 ffffff80 00000001 00000000 fc03a258 ffffffbf f9d2c000 ffffffc3
[ 7.998857] fca0: f9d2fcc0 ffffffc3 00109efc ffffffc0 f9d2fe70 ffffffc3 0010a264 ffffffc0
[ 8.006992] fcc0: f9d2fe40 ffffffc3 0010a8d8 ffffffc0 00000000 00000000 00000009 00000000
[ 8.015126] fce0: 94b29108 0000007f 94c78ee4 0000007f 60000000 00000000 00000015 00000000
[ 8.023261] fd00: 00000118 00000000 00000111 00000000 006e4000 ffffffc0 f9d2c000 ffffffc3
[ 8.031395] fd20: ff588500 ffffffc3 00106ad8 ffffffc0 fec449d0 ffffffc0 00000072 00000000
[ 8.039530] fd40: 0000006e 00000000 005e7140 ffffffc0 0000003f 00000000 0000feff 00000000
[ 8.047664] fd60: 0000fff1 00000000 0000001b 00000000 f9d2fde0 ffffffc3 0075a648 ffffffc0
[ 8.055799] fd80: 0075a3c8 ffffffc0 fc03d028 ffffffbf f9d2fec4 ffffffc3 000000f1 ffffff80
[ 8.063933] fda0: f9d2fe80 ffffffc3 94b29108 0000007f 006fa5b0 ffffffc0 007641a0 ffffffc0
[ 8.072068] fdc0: 60000000 00000000 00000015 00000000 00000010 00000000 0000138c 00000000
[ 8.080203] fde0: 00000001 ffff81a4 00000001 00000000 00000000 00000000 00000000 00000000
[ 8.088337] fe00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 8.096471] fe20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 8.104605] fe40: fb748da0 0000007f 0008421c ffffffc0 00000000 00000000 00000000 00000000
[ 8.112740] fe60: ffffffff ffffffff 00000009 00000000 0007d000 ffffff80 0000e3b8 00000000
[ 8.120874] fe80: 0008acb8 ffffff80 00083c8e ffffff80 00085428 ffffff80 00005478 00000000
[ 8.129009] fea0: 00005c40 00000000 fc03a178 ffffffbf 00000005 00000000 0000001a 0000001b
[ 8.137143] fec0: 00000012 0000000d 0000000c 00000000 00000009 00000000 94b29108 0000007f
[ 8.145278] fee0: 00000000 00000000 00000009 00000000 00000000 00000000 00000041 00000000
[ 8.153412] ff00: 00000001 00000000 00000001 00000000 00000111 00000000 6dff7364 644d3965
[ 8.161547] ff20: 00000000 00000000 0000000a 00000000 00000004 00000000 00000004 00000000
[ 8.169681] ff40: 67782f65 2d656e65 94cfa588 0000007f 94b3b290 0000007f 94c78ec0 0000007f
[ 8.177816] ff60: fb748b00 0000007f 74bd9070 00000055 00000000 00000000 94b29108 0000007f
[ 8.185950] ff80: 00020000 00000000 fb7493c8 0000007f 74bd9200 00000055 74be13e0 00000055
[ 8.194084] ffa0: 00000000 00000000 00000000 00000000 00020000 00000000 fb748da0 0000007f
[ 8.202219] ffc0: 94b22d44 0000007f fb748da0 0000007f 94c78ee4 0000007f 60000000 00000000
[ 8.210353] ffe0: 00000009 00000000 00000111 00000000 00000000 00000000 00000000 00000000
[ 8.218487] Call trace:
[ 8.220920] [<ffffffc0002e5318>] ioread32+0x58/0x68
[ 8.225773] [<ffffffbffc035d14>] xgene_ring_mgr_init+0x24/0x58 [xgene_enet]
[ 8.232699] [<ffffffbffc035d68>] xgene_enet_reset+0x20/0x17c [xgene_enet]
[ 8.239452] [<ffffffbffc03810c>] xgene_enet_probe+0x2c4/0x784 [xgene_enet]
[ 8.246292] [<ffffffc000343d20>] platform_drv_probe+0x28/0x60
[ 8.252008] [<ffffffc000341acc>] driver_probe_device+0xa4/0x3ac
[ 8.257896] [<ffffffc000341ed8>] __driver_attach+0xa8/0xb0
[ 8.263352] [<ffffffc00033f9f4>] bus_for_each_dev+0x68/0xac
[ 8.268895] [<ffffffc0003414f4>] driver_attach+0x2c/0x38
[ 8.274177] [<ffffffc0003410b0>] bus_add_driver+0x16c/0x248
[ 8.279720] [<ffffffc000342768>] driver_register+0x6c/0x138
[ 8.285262] [<ffffffc000343ce8>] __platform_driver_register+0x74/0x84
[ 8.291670] [<ffffffbffc03d018>] $x+0x18/0x24 [xgene_enet]
[ 8.297127] [<ffffffc00008149c>] do_one_initcall+0xcc/0x1bc
[ 8.302671] [<ffffffc000109f2c>] load_module+0x1a20/0x220c
[ 8.308127] [<ffffffc00010a8d4>] SyS_finit_module+0x94/0xc0
[ 8.313670] Code: 97ffffa5 12800000 a8c17bfd d65f03c0 (b9400000)
[ 8.319746] ---[ end trace f59ed15aa4f2049f ]---
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware
2015-01-09 15:59 ` Ian Campbell
@ 2015-01-09 17:36 ` Ian Campbell
0 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2015-01-09 17:36 UTC (permalink / raw)
To: Iyappan Subramanian
Cc: devicetree, netdev, patches, kchudgar, davem, linux-arm-kernel
On Fri, 2015-01-09 at 15:59 +0000, Ian Campbell wrote:
> I'm running mustang_sw_1.13.29-beta, using the mustang_tianocore_ubt.fd
> method to launch from u-boot.
I realised shortly after that I had downloaded 1.14.14 too, but it
behaves the same.
I rebuilt mustang_tianocore_ubt.fd with the first hunk of this patch and
things now work.
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-09 17:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 19:59 [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 1/3] dtb: xgene: fix: Backward compatibility with older firmware Iyappan Subramanian
[not found] ` <1415044796-5081-2-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2015-01-09 15:59 ` Ian Campbell
2015-01-09 17:36 ` Ian Campbell
2014-11-03 19:59 ` [PATCH v2 2/3] drivers: net: xgene: " Iyappan Subramanian
2014-11-03 19:59 ` [PATCH v2 3/3] drivers: net: xgene: fix: Use separate resources Iyappan Subramanian
2014-11-04 22:09 ` [PATCH v2 0/3] drivers: net: xgene: Fix crash for backward compatibility David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).