[BPI-R2] linux 5.0-rc1


(Frank W.) #1

Hi,

linus released first 5.0-rc, i have added it to my repo and made basic changes for r2.

currently there is a warning at bootup (drivers/net/phy/phy.c:548 phy_start_aneg+0x110/0x144)

Seems to caused by https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/mediatek/mtk_eth_soc.c#L359

but this specific line exists more than a half year. differences to 4.20 where no error appears is this commit:

i cannot revert it and also not changing back mtk_eth_soc.c

network works so far on quick test. wrote to david miller (net maintainer) about this issue

@Ryder.Lee: can you please ask sean about his email-account (i get still reject-errors)?

regards Frank


#2

You can send to Sean Wang [sean.wang@kernel.org]


(Frank W.) #3

got response from sean, he gave me a Patch, i will try this afternoon (17:00 GMT+1)

Patch from Sean fixed the issue, have integrated in my repo and send to mailing-lists/maintainer

boot_5.0.0-rc1-bpi-r2-5.0-rc.log (32,1 KB)

after Patch:

5.0-rc-netfix.log (27,9 KB)


(Frank W.) #4

Sent out v2 this morning which fixes the issue a different way depending on comments on v1…

https://patchwork.kernel.org/patch/10753537/


(Frank W.) #5

Patch for this warning (version of heiner kallweit) is merged to upcoming rc3.

I have now poweroff and wifi working on 5.0 (separate branches),hdmi crashes…currently i don’t know why

mtk_drm_init only calls platform_register_drivers with a struct defined above function…currently i don’t know which functions are called to initialize these pointers

https://github.com/frank-w/BPI-R2-4.14/blob/5.0-hdmi/drivers/base/platform.c#L790 calls __platform_driver_register https://github.com/frank-w/BPI-R2-4.14/blob/5.0-hdmi/drivers/base/platform.c#L627 (first access to substrucure) calls driver_register

i guess crash happens in arch_setup_dma_ops, of_dma_configure or platform_dma_configure

[    5.363509] Backtrace:                                                                      
[    5.365946] [<c05a6010>] (mtk_iommu_domain_free) from [<c05a1544>] (iommu_domain_free+0x20/)
[    5.374670]  r4:decd57a0                                                                    
[    5.377192] [<c05a1524>] (iommu_domain_free) from [<c011b85c>] (release_iommu_mapping+0x24/)
[    5.385922] [<c011b838>] (release_iommu_mapping) from [<c011b8cc>] (arm_iommu_release_mappi)
[    5.395943]  r7:00000000 r6:decd5780 r5:00000000 r4:decd57a0                                
[    5.401567] [<c011b89c>] (arm_iommu_release_mapping.part.0) from [<c011cb4c>] (arch_setup_d)
[    5.411412]  r5:00000000 r4:dead1410                                                        
[    5.414968] [<c011ca7c>] (arch_setup_dma_ops) from [<c07d2764>] (of_dma_configure+0x27c/0x3)
[    5.423521]  r6:c0b58e20 r5:00000000 r4:00000000                                            
[    5.428109] [<c07d24e8>] (of_dma_configure) from [<c060a63c>] (platform_dma_configure+0x28/)
[    5.436838]  r10:c107efdc r9:00000000 r8:c10c0008 r7:00000000 r6:c1117b34 r5:dead1410       
[    5.444612]  r4:c1117b30                                                                    
[    5.447131] [<c060a614>] (platform_dma_configure) from [<c06079ec>] (really_probe+0xc4/0x42)
[    5.455602] [<c0607928>] (really_probe) from [<c0607f70>] (driver_probe_device+0x88/0x1e0)  
[    5.463814]  r10:00000000 r9:c060a25c r8:00000000 r7:c1008c48 r6:c107efdc r5:c107efdc       
[    5.471588]  r4:dead1410                                                                    
[    5.474107] [<c0607ee8>] (driver_probe_device) from [<c06081fc>] (__driver_attach+0x134/0x1)
[    5.482663]  r9:c060a25c r8:00000000 r7:c1008c48 r6:c107efdc r5:dead1444 r4:dead1410        
[    5.490358] [<c06080c8>] (__driver_attach) from [<c0605510>] (bus_for_each_dev+0x84/0xc4)   
[    5.498480]  r7:c1008c48 r6:c06080c8 r5:c107efdc r4:00000000                                
[    5.504102] [<c060548c>] (bus_for_each_dev) from [<c0607344>] (driver_attach+0x2c/0x30)     
[    5.512052]  r7:c10bff30 r6:c107fad8 r5:decde780 r4:c107efdc                                
[    5.517675] [<c0607318>] (driver_attach) from [<c0606c68>] (bus_add_driver+0x1d0/0x274)     
[    5.525629] [<c0606a98>] (bus_add_driver) from [<c0608fa8>] (driver_register+0x84/0x118)    
[    5.533666]  r8:c060a20c r7:c0609c60 r6:c10c0230 r5:00000002 r4:c107efdc                    
[    5.540323] [<c0608f24>] (driver_register) from [<c060a538>] (__platform_register_drivers+0)

#6

We will try to find the root cause of crash.


(Frank W.) #7

maybe this fixes it…i’ll try today afternoon CET (in ~8 hours)

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52e60b754438f34d23348698534e9ca63cd751d7

unfortunately not ;( same crash, have kdbg running, but no idea how to get more info…

as the crash seems to be in iommu-subsystem it is maybe caused by this commit https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e143b90e4d45cca3dc53760d3cfab988bc74571, " iommu/mediatek: Use helper functions to access dev->iommu_fwspec" in drivers/iommu/mtk_iommu_v1.c

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/iommu/mtk_iommu_v1.c?id=a9bf2eec5a6fc01a0a5250eaf0bf61dfd382a78a


(Frank W.) #8

without this commit, no crash occours, and i got the xorg running (fbcon not working)

git revert a9bf2eec5a6fc01a0a5250eaf0bf61dfd382a78a

got Patch from author of the reverted Patch, and used this instead of the revert

xserver works, fbcon still not

Patch has arrived 5.0 (mtk_iommu_v1.c): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1c0490ce902206f4685f812fa81304fd1adf4e35


(Cioby23) #9

What are the BPI-R2 current features supported in this kernel 5.0 release ?

I looked on your github page and I see information up to kernel 4.19.


(Frank W.) #10

I have wifi and poweroff working in 5.0 but imho not yet merged because of start of 5.1.

Currently i have no clue how to get fbcon working and without help on this i do not merge hdmi-driver…in 5.1 no hdmi does work