Miouyouyou / RockMyy

Build scripts and patches used to cross-compile 5.6-rcX kernels for RK3288 boards
MIT License
32 stars 8 forks source link

Crash with 4.13.0-rc6 kernels #1

Closed Miouyouyou closed 7 years ago

Miouyouyou commented 7 years ago

So, a little change in the logging functions of the stmmac ethernet drivers crashes MiQi boards on boot. I fixed the issue by commenting the logging function, and submitted the patch that does that in my repository.

That said, I still have to report the bug to the Rockchip guys, so here it is :

[    3.116394] [drm] Initialized rockchip 1.0.0 20140818 for display-subsystem on minor 0
[    3.125712] rk_gmac-dwmac ff290000.ethernet: PTP uses main clock
[    3.132481] rk_gmac-dwmac ff290000.ethernet: clock input or output? (input).
[    3.140376] rk_gmac-dwmac ff290000.ethernet: TX delay(0x30).
[    3.146711] rk_gmac-dwmac ff290000.ethernet: RX delay(0x10).
[    3.153079] rk_gmac-dwmac ff290000.ethernet: clock input from PHY
[    3.164900] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[    3.171270] stmmac - user ID: 0x10, Synopsys ID: 0x35
[    3.176928] rk_gmac-dwmac ff290000.ethernet: Ring mode enabled
[    3.183451] rk_gmac-dwmac ff290000.ethernet: DMA HW capability register supported
[    3.191820] rk_gmac-dwmac ff290000.ethernet: Normal descriptors
[    3.198437] rk_gmac-dwmac ff290000.ethernet: RX Checksum Offload Engine supported
[    3.206800] rk_gmac-dwmac ff290000.ethernet: COE Type 2
[    3.212642] rk_gmac-dwmac ff290000.ethernet: TX Checksum insertion supported
[    3.220521] rk_gmac-dwmac ff290000.ethernet: Wake-Up On Lan supported
[    3.227739] rk_gmac-dwmac ff290000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    4.269762] libphy: stmmac: probed
[    4.273578] Unable to handle kernel NULL pointer dereference at virtual address 00000048
[    4.282639] pgd = c0004000
[    4.285662] [00000048] *pgd=00000000
[    4.289667] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    4.295597] Modules linked in:
[    4.299005] CPU: 0 PID: 30 Comm: kworker/0:1 Not tainted 4.13.0-rc6-RockMyy-XIII #1
[    4.307555] Hardware name: Rockchip (Device Tree)
[    4.312809] Workqueue: events deferred_probe_work_func
[    4.318545] task: ee90cb00 task.stack: eea16000
[    4.323602] PC is at phy_attached_print+0x20/0x7c
[    4.328853] LR is at stmmac_mdio_register+0x180/0x1f4
[    4.334482] pc : [<c075aaa8>]    lr : [<c0769f48>]    psr: 60000013
[    4.341480] sp : eea17dd8  ip : c133ebe0  fp : ed89dc00
[    4.347312] r10: ed89dad0  r9 : eea20010  r8 : ed8a3000
[    4.353143] r7 : 00000000  r6 : 00000001  r5 : ed8c5158  r4 : 00000000
[    4.360432] r3 : 00000000  r2 : 00000000  r1 : ffffffff  r0 : ed89dc00
[    4.367720] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    4.375688] Control: 10c5387d  Table: 0000406a  DAC: 00000051
[    4.382102] Process kworker/0:1 (pid: 30, stack limit = 0xeea16218)
[    4.389099] Stack: (0xeea17dd8 to 0xeea18000)
[    4.393960] 7dc0:                                                       00000000 00000002
[    4.403095] 7de0: eea20010 ed89d800 ed8c5158 ed89d800 c0769f48 00000000 ffffffff 00000001
[    4.412231] 7e00: 00000000 c017979c c12c7f74 ed8a2688 c12e7e14 ed8a2000 00000001 ed8a2680
[    4.421358] 7e20: ed8a2780 c176d318 ed8a2580 ed8a3000 c12e7e14 c0765410 00000000 eea20010
[    4.430493] 7e40: 00000000 eea20000 ed8d5818 ed8c5300 00000000 c07715b8 00000000 00000001
[    4.439628] 7e60: eded9960 dfff570c 00000010 f0f60000 00000000 00000028 fffffffa 00000027
[    4.448755] 7e80: eea20010 c0771244 eea20010 c129c634 00000000 c129c634 00000004 c070a944
[    4.457890] 7ea0: eea20010 c176bd90 00000000 c0708e5c 00000000 00000000 eea17ee8 c07090b8
[    4.467025] 7ec0: eea20044 eef9e000 c1203900 c070776c ee894e90 eded8244 eea20010 c1295c40
[    4.476159] 7ee0: 00000001 c0708c74 eea20010 00000001 00000000 eea20010 c1295c40 eea20010
[    4.485295] 7f00: 00000000 c0708360 eea20010 c12959dc c1295a04 c07087b4 ee9c9500 c1295a0c
[    4.494422] 7f20: eef9adc0 c01367b4 ee9c9500 c1295a0c 00000000 ee9c9500 ee9c9518 eef9adc0
[    4.503557] 7f40: eea16000 eef9ade4 c1203900 ee9c9518 00000008 c0136a00 eef9ade0 ee9c9500
[    4.512693] 7f60: eef9adc0 c0136fa0 ee90cb00 ee92e200 ee9cc940 00000000 ee9c9500 c0136ccc
[    4.521820] 7f80: ee8dbee4 ee92e228 00000000 c013b258 ee9cc940 c013b120 00000000 00000000
[    4.530946] 7fa0: 00000000 00000000 00000000 c0106f58 00000000 00000000 00000000 00000000
[    4.540080] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    4.549214] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 20001010 08002004
[    4.558354] [<c075aaa8>] (phy_attached_print) from [<c0769f48>] (stmmac_mdio_register+0x180/0x1f4)
[    4.568364] [<c0769f48>] (stmmac_mdio_register) from [<c0765410>] (stmmac_dvr_probe+0x7b8/0x908)
[    4.578172] [<c0765410>] (stmmac_dvr_probe) from [<c07715b8>] (rk_gmac_probe+0x374/0x458)
[    4.587309] [<c07715b8>] (rk_gmac_probe) from [<c070a944>] (platform_drv_probe+0x50/0xa0)
[    4.596445] [<c070a944>] (platform_drv_probe) from [<c0708e5c>] (driver_probe_device+0x150/0x2d0)
[    4.606358] [<c0708e5c>] (driver_probe_device) from [<c070776c>] (bus_for_each_drv+0x84/0x94)
[    4.615873] [<c070776c>] (bus_for_each_drv) from [<c0708c74>] (__device_attach+0x88/0xfc)
[    4.625000] [<c0708c74>] (__device_attach) from [<c0708360>] (bus_probe_device+0x28/0x80)
[    4.634135] [<c0708360>] (bus_probe_device) from [<c07087b4>] (deferred_probe_work_func+0x60/0x84)
[    4.644147] [<c07087b4>] (deferred_probe_work_func) from [<c01367b4>] (process_one_work+0x244/0x468)
[    4.654351] [<c01367b4>] (process_one_work) from [<c0136a00>] (process_scheduled_works+0x28/0x30)
[    4.664265] [<c0136a00>] (process_scheduled_works) from [<c0136fa0>] (worker_thread+0x2d4/0x3d4)
[    4.674082] [<c0136fa0>] (worker_thread) from [<c013b258>] (kthread+0x138/0x154)
[    4.682345] [<c013b258>] (kthread) from [<c0106f58>] (ret_from_fork+0x14/0x3c)
[    4.690413] Code: e59d401c e590302c e3540000 e5901284 (e5922048) 
[    4.697244] ---[ end trace 7b3d4f1ce28bf8e6 ]---
Miouyouyou commented 7 years ago

The "commenting" patch :

https://github.com/Miouyouyou/RockMyy/blob/master/patches/kernel/v4.13/0012-net-stmmac-Reverting-a-part-of-Use-the-right-logging.patch

Miouyouyou commented 7 years ago

Fixed using https://github.com/Miouyouyou/RockMyy/blob/334b3357ca95e7081b2a6e3c67896a066a035ad8/patches/kernel/v4.13/0012-net-phy-Deal-with-unbound-phy-driver-in-phy_attached.patch which is a copy of https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fcd03e362b1cd17de487953aac34f2d4574895cf .