Bluetooth power management seems broken
While testing with crust (postmarketOS/pmaports!1163 (merged)), along with the pine64-kernel-5.7.y branch, I sometimes get a kernel oops (log below) when resuming from suspend (about 1 in 5 resumes). Removing the bluetooth node from the pinephone device tree fixes this particular issue.
I know that rtl8723cs power management is broken, so I applied disable-power-save.patch, but it does not seem to help.
Is anyone else able to reproduce this issue?
[ 45.520485] OOM killer enabled.
[ 45.523791] Restarting tasks ...
[ 45.524610] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[ 45.527961] done.
[ 45.528135] Mem abort info:
[ 45.542046] ESR = 0x96000044
[ 45.542055] EC = 0x25: DABT (current EL), IL = 32 bits
[ 45.542057] SET = 0, FnV = 0
[ 45.542060] EA = 0, S1PTW = 0
[ 45.542069] Data abort info:
[ 45.560009] ISV = 0, ISS = 0x00000044
[ 45.560013] CM = 0, WnR = 1
[ 45.560020] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000ab9e1000
[ 45.560023] [0000000000000008] pgd=0000000000000000
[ 45.560032] Internal error: Oops: 96000044 [#1] SMP
[ 45.560035] Modules linked in: bnep ov5640 hci_uart 8723cs(C) btrtl btbcm bluetooth gpio_vibra crct10dif_ce sun6i_csi st_magn_i2c st_sensors_i2c inv_mpu6050_i2c st_magn v4l2_fwnode snd_soc_simple_card st_sensors inv_mpu6050 ecdh_generic snd_soc_simple_card_utils sun50i_codec_analog sun8i_adda_pr_regmap ecc industrialio_triggered_buffer anx7688 kfifo_buf stk3310 sun4i_lradc_keys sun8i_codec sun4i_i2s snd_soc_simple_amplifier snd_soc_ec25 snd_soc_bt_sco snd_soc_core ipv6 snd_pcm_dmaengine snd_pcm snd_timer snd i2c_gpio soundcore
[ 45.560125] CPU: 0 PID: 1366 Comm: kworker/0:2 Tainted: G C 5.7.0 #19
[ 45.560128] Hardware name: Pine64 PinePhone (1.2) (DT)
[ 45.560158] Workqueue: events_long h5_btrtl_reprobe_worker [hci_uart]
[ 45.560165] pstate: 00000005 (nzcv daif -PAN -UAO)
[ 45.560234] pc : hci_unregister_dev+0x60/0x268 [bluetooth]
[ 45.560248] lr : hci_uart_unregister_device+0x44/0x80 [hci_uart]
[ 45.560251] sp : ffff800013b33ca0
[ 45.560253] x29: ffff800013b33ca0 x28: 0000000000000000
[ 45.560259] x27: ffff00006cb22700 x26: ffff800010faeea8
[ 45.560264] x25: 0000000000000000 x24: ffff00006b90df10
[ 45.560270] x23: ffff00006fb7a800 x22: 0000000000000000
[ 45.560275] x21: ffff800008d430b0 x20: ffff800008d27000
[ 45.560280] x19: ffff00006b8a6000 x18: 0000000000000010
[ 45.560285] x17: 0000000000000000 x16: 0000000000000000
[ 45.560290] x15: 0000000000000004 x14: 000000000000009a
[ 45.560295] x13: 0000000000000000 x12: ffff00006f0acce0
[ 45.560300] x11: ffff00006f0acb68 x10: 0000000000000000
[ 45.560305] x9 : 0000000000000001 x8 : 0000000000210d00
[ 45.560310] x7 : 0000000000000000 x6 : ffff00006cadc790
[ 45.560315] x5 : ffff00006cae30f4 x4 : ffff800008d27b18
[ 45.560320] x3 : 0000000000000000 x2 : 00000000000000ff
[ 45.560325] x1 : 0000000000000000 x0 : 0000000000000000
[ 45.560330] Call trace:
[ 45.560376] hci_unregister_dev+0x60/0x268 [bluetooth]
[ 45.560390] hci_uart_unregister_device+0x44/0x80 [hci_uart]
[ 45.560402] h5_serdev_remove+0x14/0x20 [hci_uart]
[ 45.560415] serdev_drv_remove+0x24/0x48
[ 45.560424] device_release_driver_internal+0xfc/0x1d0
[ 45.560429] device_driver_detach+0x18/0x28
[ 45.560433] device_reprobe+0x20/0x40
[ 45.560446] h5_btrtl_reprobe_worker+0x20/0x78 [hci_uart]
[ 45.560455] process_one_work+0x1c4/0x388
[ 45.560459] worker_thread+0x14c/0x4d0
[ 45.560465] kthread+0xf4/0x120
[ 45.560471] ret_from_fork+0x10/0x18
[ 45.560481] Code: 88e47c02 2a0403e0 35000e40 a9400261 (f9000420)
[ 45.560488] ---[ end trace a83d9524a6dc93f1 ]---
[ 45.577191] PM: suspend exit
Edited by György Kurucz