Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

USB HOST2 port not working on ROC-RK3399-PC Target #10

Open
sunielmahesh opened this issue Feb 24, 2020 · 0 comments
Open

USB HOST2 port not working on ROC-RK3399-PC Target #10

sunielmahesh opened this issue Feb 24, 2020 · 0 comments

Comments

@sunielmahesh
Copy link

ROC-RK3399-PC has 3 USB ports (HOST0, HOST1, HOST2).
HOST0 and HOST1 ports are working but HOST2 is not.
(I have tested with firefly rk3399 BSP, linux-rockchip and linux-next kernel)

Any kind of help is appreciated.

SquallATF pushed a commit to SquallATF/kernel that referenced this issue May 14, 2020
commit cf3591e upstream.

Revert the commit bd293d0. The proper
fix has been made available with commit d0a255e ("loop: set
PF_MEMALLOC_NOIO for the worker thread").

Note that the fix offered by commit bd293d0 doesn't really prevent
the deadlock from occuring - if we look at the stacktrace reported by
Junxiao Bi, we see that it hangs in bit_wait_io and not on the mutex -
i.e. it has already successfully taken the mutex. Changing the mutex
from mutex_lock to mutex_trylock won't help with deadlocks that happen
afterwards.

PID: 474    TASK: ffff8813e11f4600  CPU: 10  COMMAND: "kswapd0"
   #0 [ffff8813dedfb938] __schedule at ffffffff8173f405
   FireflyTeam#1 [ffff8813dedfb990] schedule at ffffffff8173fa27
   FireflyTeam#2 [ffff8813dedfb9b0] schedule_timeout at ffffffff81742fec
   FireflyTeam#3 [ffff8813dedfba60] io_schedule_timeout at ffffffff8173f186
   FireflyTeam#4 [ffff8813dedfbaa0] bit_wait_io at ffffffff8174034f
   FireflyTeam#5 [ffff8813dedfbac0] __wait_on_bit at ffffffff8173fec8
   FireflyTeam#6 [ffff8813dedfbb10] out_of_line_wait_on_bit at ffffffff8173ff81
   FireflyTeam#7 [ffff8813dedfbb90] __make_buffer_clean at ffffffffa038736f [dm_bufio]
   FireflyTeam#8 [ffff8813dedfbbb0] __try_evict_buffer at ffffffffa0387bb8 [dm_bufio]
   FireflyTeam#9 [ffff8813dedfbbd0] dm_bufio_shrink_scan at ffffffffa0387cc3 [dm_bufio]
  FireflyTeam#10 [ffff8813dedfbc40] shrink_slab at ffffffff811a87ce
  FireflyTeam#11 [ffff8813dedfbd30] shrink_zone at ffffffff811ad778
  FireflyTeam#12 [ffff8813dedfbdc0] kswapd at ffffffff811ae92f
  FireflyTeam#13 [ffff8813dedfbec0] kthread at ffffffff810a8428
  FireflyTeam#14 [ffff8813dedfbf50] ret_from_fork at ffffffff81745242

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Fixes: bd293d0 ("dm bufio: fix deadlock with loop device")
Depends-on: d0a255e ("loop: set PF_MEMALLOC_NOIO for the worker thread")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
SquallATF pushed a commit to SquallATF/kernel that referenced this issue Aug 8, 2022
rtk_btusb: RTKBT_RELEASE_NAME: 20200318_BT_ANDROID_9.0
rtk_btusb: Realtek Bluetooth USB driver module init, version 5.2.1
rtk_btusb: Register usb char device interface for BT driver
BUG: spinlock bad magic on CPU#0, swapper/0/1
 lock: running_flag_lock+0x0/0x38, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.194 FireflyTeam#10
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<ffffff800808a8c0>] dump_backtrace+0x0/0x1f4
[<ffffff800808aac8>] show_stack+0x14/0x1c
[<ffffff8008416248>] dump_stack+0xb4/0xf4
[<ffffff800810b1c0>] spin_dump+0x70/0x8c
[<ffffff800810b204>] spin_bug+0x28/0x34
[<ffffff800810b2a0>] do_raw_spin_lock+0x34/0x158
[<ffffff8008d68650>] _raw_spin_lock+0x48/0x54
[<ffffff80093b996c>] btusb_init+0x200/0x21c
[<ffffff80080834a8>] do_one_initcall+0x84/0x1a8
[<ffffff8009380f10>] kernel_init_freeable+0x278/0x27c
[<ffffff8008d61d3c>] kernel_init+0x10/0xf8
[<ffffff80080832d0>] ret_from_fork+0x10/0x40

Fixes: 4c267a4 ("Bluetooth: rtk_btusb: update rtk_btusb to version 5.2.1")
Change-Id: I6ea6c46a5abccc5848ec6e1538c4d7109135b725
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant