Skip to contentSkip to conversation

Machine check in 4xx ethernet driver

DISCUSSION Felix Radensky 2 participants 6 messages Mar 9, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

I'm getting machine check exception when trying to dump emac registers on 405EX Kilauea board. The kernel is 2.6.29-rc7 The problem seems not new, I can reproduce it on 2.6.25 Denx kernel

-bash-3.2# ethtool -d eth0
Data machine check in kernel mode.

Oops: Machine check, sig: 7 [#1]
Kilauea
Modules linked in:
NIP: c000e240 LR: c0158358 CTR: 00000004
REGS: cfffdf50 TRAP: 0202   Not tainted  (2.6.29-rc7)
MSR: 00029030 <EE,ME,CE,IR,DR>  CR: 22002044  XER: 2000005f

TASK = cfa79740[1011] 'ethtool' THREAD: cfa82000
GPR00: 00000001 cfa83d10 cfa79740 cf8d7a34 d105696c 00000004 cfa83d40 00000000
GPR08: 00000000 0000001b 00000004 00000004 22002022 1005f4d0 10010000 1000d9c4
GPR16: 1000d9bc 1000d9b4 1000fbec 10057650 100118a4 10010000 1000da10 100570ec
GPR24: bf90f790 00000000 cfa83d38 cf8d7800 10058008 cf8d7800 cf8d79c0 cf811360
NIP [c000e240] _memcpy_fromio+0x9c/0xc4
LR [c0158358] emac_ethtool_get_regs+0x68/0xc4

Call Trace:
[cfa83d10] [c015831c] emac_ethtool_get_regs+0x2c/0xc4 (unreliable)
[cfa83d30] [c017ed00] ethtool_get_regs+0xf8/0x1f8
[cfa83d60] [c018036c] dev_ethtool+0x10f4/0x13ac
[cfa83df0] [c017d7dc] dev_ioctl+0x430/0x700
[cfa83e70] [c016ad80] sock_ioctl+0x80/0x2ec
[cfa83e90] [c0088104] vfs_ioctl+0x34/0x98
[cfa83ea0] [c0088550] do_vfs_ioctl+0x3c0/0x734
[cfa83f10] [c0088904] sys_ioctl+0x40/0x74
[cfa83f40] [c000eb60] ret_from_syscall+0x0/0x3c
Instruction dump:
419c004c 80040000 90030000 7c0006ac 38840004 38630004 38a5fffc 4200ffe8
2f050000 41baffb4 7ca903a6 88040000 <98030000> 7c0006ac 38840001 38630001
---[ end trace 075752cbf5bce2a1 ]---

Bus error

Felix.

Signature · 2 lines
View this message in context: http://www.nabble.com/Machine-check-in-4xx-ethernet-driver-tp22408005p22408005.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.
#1 lore raw
Quoted 6 lines · Felix Radensky

Hi,

I'm getting machine check exception when trying to dump emac registers on 405EX Kilauea board. The kernel is 2.6.29-rc7 The problem seems not new, I can reproduce it on 2.6.25 Denx kernel

I've not looked at what that code path does, but the EMAC regs are in DCR space, not MMIO. Using memcpy_fromio there seems odd.

josh

#2 lore raw
Quoted 13 lines · Josh Boyer-4 wrote:
Quoted 6 lines · Felix Radensky

Hi,

I'm getting machine check exception when trying to dump emac registers on 405EX Kilauea board. The kernel is 2.6.29-rc7 The problem seems not new, I can reproduce it on 2.6.25 Denx kernel

I've not looked at what that code path does, but the EMAC regs are in DCR space, not MMIO. Using memcpy_fromio there seems odd.

At least on 405EX MAL registers are in DCR space, but EMAC and RGMII ones are in MMIO space.

Signature · 2 lines
View this message in context: http://www.nabble.com/Machine-check-in-4xx-ethernet-driver-tp22408005p22410889.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.
#3 lore raw
Quoted 13 lines · Felix Radensky
Quoted 9 lines · Josh Boyer-4 wrote:
Quoted 6 lines · Felix Radensky

Hi,

I'm getting machine check exception when trying to dump emac registers on 405EX Kilauea board. The kernel is 2.6.29-rc7 The problem seems not new, I can reproduce it on 2.6.25 Denx kernel

Quoted 7 lines
Quoted 4 lines

I've not looked at what that code path does, but the EMAC regs are in DCR space, not MMIO. Using memcpy_fromio there seems odd.

At least on 405EX MAL registers are in DCR space, but EMAC and RGMII ones are in MMIO space.

Ah, quite right. No coffee yet this morning.

You'll need to look at the code path ethtool is forcing. Perhaps it's doing something stupid.

josh

#4 lore raw
Quoted 33 lines · Josh Boyer-4 wrote:
Quoted 13 lines · Felix Radensky
Quoted 9 lines · Josh Boyer-4 wrote:
Quoted 6 lines · Felix Radensky

Hi,

I'm getting machine check exception when trying to dump emac registers on 405EX Kilauea board. The kernel is 2.6.29-rc7 The problem seems not new, I can reproduce it on 2.6.25 Denx kernel

Quoted 7 lines
Quoted 4 lines

I've not looked at what that code path does, but the EMAC regs are in DCR space, not MMIO. Using memcpy_fromio there seems odd.

At least on 405EX MAL registers are in DCR space, but EMAC and RGMII ones are in MMIO space.

Ah, quite right. No coffee yet this morning.

You'll need to look at the code path ethtool is forcing. Perhaps it's doing
something stupid.

The problem goes away if I replace memcpy_fromio() by memcpy(). Is memcpy_fromio() really necessary in this case ?

Signature · 2 lines
View this message in context: http://www.nabble.com/Machine-check-in-4xx-ethernet-driver-tp22408005p22412825.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.
#5 lore raw
In reply to Josh Boyer
Quoted 20 lines · Josh Boyer-4 wrote:
Quoted 18 lines · Felix Radensky
Quoted 13 lines · Josh Boyer-4 wrote:
Quoted 6 lines · Felix Radensky

Hi,

I'm getting machine check exception when trying to dump emac registers on 405EX Kilauea board. The kernel is 2.6.29-rc7 The problem seems not new, I can reproduce it on 2.6.25 Denx kernel

I've not looked at what that code path does, but the EMAC regs are in DCR space, not MMIO. Using memcpy_fromio there seems odd.

Quoted 10 lines
Quoted 2 lines

At least on 405EX MAL registers are in DCR space, but EMAC and RGMII ones are in MMIO space.

Ah, quite right. No coffee yet this morning.

You'll need to look at the code path ethtool is forcing. Perhaps it's doing
something stupid.

Bad quoting in previous message, sorry.

The problem goes away if I replace memcpy_fromio() by memcpy()., but register values seem wrong. Why would memcpy() work when memcpy_fromio() doesn't ?

Signature · 2 lines
View this message in context: http://www.nabble.com/Machine-check-in-4xx-ethernet-driver-tp22408005p22413434.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.