1. 19 8月, 2022 2 次提交
  2. 14 7月, 2022 1 次提交
  3. 21 6月, 2022 3 次提交
  4. 12 6月, 2022 1 次提交
  5. 10 6月, 2022 3 次提交
  6. 20 5月, 2022 1 次提交
  7. 12 5月, 2022 1 次提交
  8. 06 5月, 2022 1 次提交
  9. 22 4月, 2022 5 次提交
  10. 18 3月, 2022 1 次提交
  11. 15 3月, 2022 1 次提交
  12. 08 2月, 2022 3 次提交
  13. 17 11月, 2021 1 次提交
  14. 14 9月, 2021 2 次提交
  15. 18 8月, 2021 1 次提交
  16. 12 7月, 2021 1 次提交
  17. 21 6月, 2021 1 次提交
  18. 15 6月, 2021 1 次提交
    • P
      usb: dwc3: core: fix kernel panic when do reboot · 4bf584a0
      Peter Chen 提交于
      When do system reboot, it calls dwc3_shutdown and the whole debugfs
      for dwc3 has removed first, when the gadget tries to do deinit, and
      remove debugfs for its endpoints, it meets NULL pointer dereference
      issue when call debugfs_lookup. Fix it by removing the whole dwc3
      debugfs later than dwc3_drd_exit.
      
      [ 2924.958838] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000002
      ....
      [ 2925.030994] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
      [ 2925.037005] pc : inode_permission+0x2c/0x198
      [ 2925.041281] lr : lookup_one_len_common+0xb0/0xf8
      [ 2925.045903] sp : ffff80001276ba70
      [ 2925.049218] x29: ffff80001276ba70 x28: ffff0000c01f0000 x27: 0000000000000000
      [ 2925.056364] x26: ffff800011791e70 x25: 0000000000000008 x24: dead000000000100
      [ 2925.063510] x23: dead000000000122 x22: 0000000000000000 x21: 0000000000000001
      [ 2925.070652] x20: ffff8000122c6188 x19: 0000000000000000 x18: 0000000000000000
      [ 2925.077797] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000004
      [ 2925.084943] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000030
      [ 2925.092087] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : ffff8000102b2420
      [ 2925.099232] x8 : 7f7f7f7f7f7f7f7f x7 : feff73746e2f6f64 x6 : 0000000000008080
      [ 2925.106378] x5 : 61c8864680b583eb x4 : 209e6ec2d263dbb7 x3 : 000074756f307065
      [ 2925.113523] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff8000122c6188
      [ 2925.120671] Call trace:
      [ 2925.123119]  inode_permission+0x2c/0x198
      [ 2925.127042]  lookup_one_len_common+0xb0/0xf8
      [ 2925.131315]  lookup_one_len_unlocked+0x34/0xb0
      [ 2925.135764]  lookup_positive_unlocked+0x14/0x50
      [ 2925.140296]  debugfs_lookup+0x68/0xa0
      [ 2925.143964]  dwc3_gadget_free_endpoints+0x84/0xb0
      [ 2925.148675]  dwc3_gadget_exit+0x28/0x78
      [ 2925.152518]  dwc3_drd_exit+0x100/0x1f8
      [ 2925.156267]  dwc3_remove+0x11c/0x120
      [ 2925.159851]  dwc3_shutdown+0x14/0x20
      [ 2925.163432]  platform_shutdown+0x28/0x38
      [ 2925.167360]  device_shutdown+0x15c/0x378
      [ 2925.171291]  kernel_restart_prepare+0x3c/0x48
      [ 2925.175650]  kernel_restart+0x1c/0x68
      [ 2925.179316]  __do_sys_reboot+0x218/0x240
      [ 2925.183247]  __arm64_sys_reboot+0x28/0x30
      [ 2925.187262]  invoke_syscall+0x48/0x100
      [ 2925.191017]  el0_svc_common.constprop.0+0x48/0xc8
      [ 2925.195726]  do_el0_svc+0x28/0x88
      [ 2925.199045]  el0_svc+0x20/0x30
      [ 2925.202104]  el0_sync_handler+0xa8/0xb0
      [ 2925.205942]  el0_sync+0x148/0x180
      [ 2925.209270] Code: a9025bf5 2a0203f5 121f0056 370802b5 (79400660)
      [ 2925.215372] ---[ end trace 124254d8e485a58b ]---
      [ 2925.220012] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      [ 2925.227676] Kernel Offset: disabled
      [ 2925.231164] CPU features: 0x00001001,20000846
      [ 2925.235521] Memory Limit: none
      [ 2925.238580] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
      
      Fixes: 8d396bb0 ("usb: dwc3: debugfs: Add and remove endpoint dirs dynamically")
      Cc: Jack Pham <jackp@codeaurora.org>
      Tested-by: NJack Pham <jackp@codeaurora.org>
      Signed-off-by: NPeter Chen <peter.chen@kernel.org>
      Link: https://lore.kernel.org/r/20210608105656.10795-1-peter.chen@kernel.org
      (cherry picked from commit 2a042767)
      Link: https://lore.kernel.org/r/20210615080847.GA10432@jackp-linux.qualcomm.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bf584a0
  19. 09 6月, 2021 2 次提交
    • S
      usb: dwc3: support 64 bit DMA in platform driver · 45d39448
      Sven Peter 提交于
      Currently, the dwc3 platform driver does not explicitly ask for
      a DMA mask. This makes it fall back to the default 32-bit mask which
      breaks the driver on systems that only have RAM starting above the
      first 4G like the Apple M1 SoC.
      
      Fix this by calling dma_set_mask_and_coherent with a 64bit mask.
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NSven Peter <sven@svenpeter.dev>
      Link: https://lore.kernel.org/r/20210607061751.89752-1-sven@svenpeter.devSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      45d39448
    • P
      usb: dwc3: core: fix kernel panic when do reboot · 2a042767
      Peter Chen 提交于
      When do system reboot, it calls dwc3_shutdown and the whole debugfs
      for dwc3 has removed first, when the gadget tries to do deinit, and
      remove debugfs for its endpoints, it meets NULL pointer dereference
      issue when call debugfs_lookup. Fix it by removing the whole dwc3
      debugfs later than dwc3_drd_exit.
      
      [ 2924.958838] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000002
      ....
      [ 2925.030994] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
      [ 2925.037005] pc : inode_permission+0x2c/0x198
      [ 2925.041281] lr : lookup_one_len_common+0xb0/0xf8
      [ 2925.045903] sp : ffff80001276ba70
      [ 2925.049218] x29: ffff80001276ba70 x28: ffff0000c01f0000 x27: 0000000000000000
      [ 2925.056364] x26: ffff800011791e70 x25: 0000000000000008 x24: dead000000000100
      [ 2925.063510] x23: dead000000000122 x22: 0000000000000000 x21: 0000000000000001
      [ 2925.070652] x20: ffff8000122c6188 x19: 0000000000000000 x18: 0000000000000000
      [ 2925.077797] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000004
      [ 2925.084943] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000030
      [ 2925.092087] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : ffff8000102b2420
      [ 2925.099232] x8 : 7f7f7f7f7f7f7f7f x7 : feff73746e2f6f64 x6 : 0000000000008080
      [ 2925.106378] x5 : 61c8864680b583eb x4 : 209e6ec2d263dbb7 x3 : 000074756f307065
      [ 2925.113523] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff8000122c6188
      [ 2925.120671] Call trace:
      [ 2925.123119]  inode_permission+0x2c/0x198
      [ 2925.127042]  lookup_one_len_common+0xb0/0xf8
      [ 2925.131315]  lookup_one_len_unlocked+0x34/0xb0
      [ 2925.135764]  lookup_positive_unlocked+0x14/0x50
      [ 2925.140296]  debugfs_lookup+0x68/0xa0
      [ 2925.143964]  dwc3_gadget_free_endpoints+0x84/0xb0
      [ 2925.148675]  dwc3_gadget_exit+0x28/0x78
      [ 2925.152518]  dwc3_drd_exit+0x100/0x1f8
      [ 2925.156267]  dwc3_remove+0x11c/0x120
      [ 2925.159851]  dwc3_shutdown+0x14/0x20
      [ 2925.163432]  platform_shutdown+0x28/0x38
      [ 2925.167360]  device_shutdown+0x15c/0x378
      [ 2925.171291]  kernel_restart_prepare+0x3c/0x48
      [ 2925.175650]  kernel_restart+0x1c/0x68
      [ 2925.179316]  __do_sys_reboot+0x218/0x240
      [ 2925.183247]  __arm64_sys_reboot+0x28/0x30
      [ 2925.187262]  invoke_syscall+0x48/0x100
      [ 2925.191017]  el0_svc_common.constprop.0+0x48/0xc8
      [ 2925.195726]  do_el0_svc+0x28/0x88
      [ 2925.199045]  el0_svc+0x20/0x30
      [ 2925.202104]  el0_sync_handler+0xa8/0xb0
      [ 2925.205942]  el0_sync+0x148/0x180
      [ 2925.209270] Code: a9025bf5 2a0203f5 121f0056 370802b5 (79400660)
      [ 2925.215372] ---[ end trace 124254d8e485a58b ]---
      [ 2925.220012] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      [ 2925.227676] Kernel Offset: disabled
      [ 2925.231164] CPU features: 0x00001001,20000846
      [ 2925.235521] Memory Limit: none
      [ 2925.238580] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
      
      Fixes: 5ff90af9 ("usb: dwc3: debugfs: Add and remove endpoint dirs dynamically")
      Cc: Jack Pham <jackp@codeaurora.org>
      Tested-by: NJack Pham <jackp@codeaurora.org>
      Signed-off-by: NPeter Chen <peter.chen@kernel.org>
      Link: https://lore.kernel.org/r/20210608105656.10795-1-peter.chen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2a042767
  20. 04 6月, 2021 1 次提交
    • A
      Revert "usb: dwc3: core: Add shutdown callback for dwc3" · 8f11fe7e
      Alexandru Elisei 提交于
      This reverts commit 568262bf.
      
      The commit causes the following panic when shutting down a rockpro64-v2
      board:
      
      [..]
      [   41.684569] xhci-hcd xhci-hcd.2.auto: USB bus 1 deregistered
      [   41.686301] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a0
      [   41.687096] Mem abort info:
      [   41.687345]   ESR = 0x96000004
      [   41.687615]   EC = 0x25: DABT (current EL), IL = 32 bits
      [   41.688082]   SET = 0, FnV = 0
      [   41.688352]   EA = 0, S1PTW = 0
      [   41.688628] Data abort info:
      [   41.688882]   ISV = 0, ISS = 0x00000004
      [   41.689219]   CM = 0, WnR = 0
      [   41.689481] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000073b2000
      [   41.690046] [00000000000000a0] pgd=0000000000000000, p4d=0000000000000000
      [   41.690654] Internal error: Oops: 96000004 [#1] PREEMPT SMP
      [   41.691143] Modules linked in:
      [   41.691416] CPU: 5 PID: 1 Comm: shutdown Not tainted 5.13.0-rc4 #43
      [   41.691966] Hardware name: Pine64 RockPro64 v2.0 (DT)
      [   41.692409] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
      [   41.692937] pc : down_read_interruptible+0xec/0x200
      [   41.693373] lr : simple_recursive_removal+0x48/0x280
      [   41.693815] sp : ffff800011fab910
      [   41.694107] x29: ffff800011fab910 x28: ffff0000008fe480 x27: ffff0000008fe4d8
      [   41.694736] x26: ffff800011529a90 x25: 00000000000000a0 x24: ffff800011edd030
      [   41.695364] x23: 0000000000000080 x22: 0000000000000000 x21: ffff800011f23994
      [   41.695992] x20: ffff800011f23998 x19: ffff0000008fe480 x18: ffffffffffffffff
      [   41.696620] x17: 000c0400bb44ffff x16: 0000000000000009 x15: ffff800091faba3d
      [   41.697248] x14: 0000000000000004 x13: 0000000000000000 x12: 0000000000000020
      [   41.697875] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : 6f6c746364716e62
      [   41.698502] x8 : 7f7f7f7f7f7f7f7f x7 : fefefeff6364626d x6 : 0000000000000440
      [   41.699130] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000000000a0
      [   41.699758] x2 : 0000000000000001 x1 : 0000000000000000 x0 : 00000000000000a0
      [   41.700386] Call trace:
      [   41.700602]  down_read_interruptible+0xec/0x200
      [   41.701003]  debugfs_remove+0x5c/0x80
      [   41.701328]  dwc3_debugfs_exit+0x1c/0x6c
      [   41.701676]  dwc3_remove+0x34/0x1a0
      [   41.701988]  platform_remove+0x28/0x60
      [   41.702322]  __device_release_driver+0x188/0x22c
      [   41.702730]  device_release_driver+0x2c/0x44
      [   41.703106]  bus_remove_device+0x124/0x130
      [   41.703468]  device_del+0x16c/0x424
      [   41.703777]  platform_device_del.part.0+0x1c/0x90
      [   41.704193]  platform_device_unregister+0x28/0x44
      [   41.704608]  of_platform_device_destroy+0xe8/0x100
      [   41.705031]  device_for_each_child_reverse+0x64/0xb4
      [   41.705470]  of_platform_depopulate+0x40/0x84
      [   41.705853]  __dwc3_of_simple_teardown+0x20/0xd4
      [   41.706260]  dwc3_of_simple_shutdown+0x14/0x20
      [   41.706652]  platform_shutdown+0x28/0x40
      [   41.706998]  device_shutdown+0x158/0x330
      [   41.707344]  kernel_power_off+0x38/0x7c
      [   41.707684]  __do_sys_reboot+0x16c/0x2a0
      [   41.708029]  __arm64_sys_reboot+0x28/0x34
      [   41.708383]  invoke_syscall+0x48/0x114
      [   41.708716]  el0_svc_common.constprop.0+0x44/0xdc
      [   41.709131]  do_el0_svc+0x28/0x90
      [   41.709426]  el0_svc+0x2c/0x54
      [   41.709698]  el0_sync_handler+0xa4/0x130
      [   41.710045]  el0_sync+0x198/0x1c0
      [   41.710342] Code: c8047c62 35ffff84 17fffe5f f9800071 (c85ffc60)
      [   41.710881] ---[ end trace 406377df5178f75c ]---
      [   41.711299] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      [   41.712084] Kernel Offset: disabled
      [   41.712391] CPU features: 0x10001031,20000846
      [   41.712775] Memory Limit: none
      [   41.713049] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
      
      As Felipe explained: "dwc3_shutdown() is just called dwc3_remove()
      directly, then we end up calling debugfs_remove_recursive() twice."
      
      Reverting the commit fixes the panic.
      
      Fixes: 568262bf ("usb: dwc3: core: Add shutdown callback for dwc3")
      Acked-by: NFelipe Balbi <balbi@kernel.org>
      Signed-off-by: NAlexandru Elisei <alexandru.elisei@arm.com>
      Link: https://lore.kernel.org/r/20210603151742.298243-1-alexandru.elisei@arm.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8f11fe7e
  21. 23 4月, 2021 1 次提交
  22. 22 4月, 2021 1 次提交
  23. 14 4月, 2021 2 次提交
  24. 23 3月, 2021 1 次提交
  25. 10 3月, 2021 2 次提交