1. 25 9月, 2020 10 次提交
  2. 22 7月, 2020 8 次提交
  3. 07 6月, 2020 1 次提交
  4. 28 5月, 2020 4 次提交
    • F
      mt76: only iterate over initialized rx queues · f473b42a
      Felix Fietkau 提交于
      Fixes the following reported crash:
      
      [    2.361127] BUG: spinlock bad magic on CPU#0, modprobe/456
      [    2.361583]  lock: 0xffffa1287525b3b8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
      [    2.362250] CPU: 0 PID: 456 Comm: modprobe Not tainted 4.14.177 #5
      [    2.362751] Hardware name: HP Meep/Meep, BIOS Google_Meep.11297.75.0 06/17/2019
      [    2.363343] Call Trace:
      [    2.363552]  dump_stack+0x97/0xdb
      [    2.363826]  ? spin_bug+0xa6/0xb3
      [    2.364096]  do_raw_spin_lock+0x6a/0x9a
      [    2.364417]  mt76_dma_rx_fill+0x44/0x1de [mt76]
      [    2.364787]  ? mt76_dma_kick_queue+0x18/0x18 [mt76]
      [    2.365184]  mt76_dma_init+0x53/0x85 [mt76]
      [    2.365532]  mt7615_dma_init+0x3d7/0x546 [mt7615e]
      [    2.365928]  mt7615_register_device+0xe6/0x1a0 [mt7615e]
      [    2.366364]  mt7615_mmio_probe+0x14b/0x171 [mt7615e]
      [    2.366771]  mt7615_pci_probe+0x118/0x13b [mt7615e]
      [    2.367169]  pci_device_probe+0xaf/0x13d
      [    2.367491]  driver_probe_device+0x284/0x2ca
      [    2.367840]  __driver_attach+0x7a/0x9e
      [    2.368146]  ? driver_attach+0x1f/0x1f
      [    2.368451]  bus_for_each_dev+0xa0/0xdb
      [    2.368765]  bus_add_driver+0x132/0x204
      [    2.369078]  driver_register+0x8e/0xcd
      [    2.369384]  do_one_initcall+0x160/0x257
      [    2.369706]  ? 0xffffffffc0240000
      [    2.369980]  do_init_module+0x60/0x1bb
      [    2.370286]  load_module+0x18c2/0x1a2b
      [    2.370596]  ? kernel_read_file+0x141/0x1b9
      [    2.370937]  ? kernel_read_file_from_fd+0x46/0x71
      [    2.371320]  SyS_finit_module+0xcc/0xf0
      [    2.371636]  do_syscall_64+0x6b/0xf7
      [    2.371930]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
      [    2.372344] RIP: 0033:0x7da218ae4199
      [    2.372637] RSP: 002b:00007fffd0608398 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [    2.373252] RAX: ffffffffffffffda RBX: 00005a705449df90 RCX: 00007da218ae4199
      [    2.373833] RDX: 0000000000000000 RSI: 00005a7052e73bd8 RDI: 0000000000000006
      [    2.374411] RBP: 00007fffd06083e0 R08: 0000000000000000 R09: 00005a705449d540
      [    2.374989] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000000
      [    2.375569] R13: 00005a705449def0 R14: 00005a7052e73bd8 R15: 0000000000000000
      Reported-by: NSean Wang <sean.wang@mediatek.com>
      Fixes: d3377b78 ("mt76: add HE phy modes and hardware queue")
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      f473b42a
    • F
      mt76: fix wcid allocation issues · 5e616ad2
      Felix Fietkau 提交于
      mt76 core uses ffs() to find the next free bit. This works well for 32 bit
      architectures where BITS_PER_LONG is 32. ffs only checks 32 bit values, so
      allocation fails on 64 bit architectures.
      Additionally, the wcid mask array was too small in cases where the array
      was not a multiple of BITS_PER_LONG.
      Fix this by making the wcid mask array u32 instead and use DIV_ROUND_UP
      for the size, just in case we ever bump it to a value that's not a multiple
      of 32.
      Reported-by: NRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      5e616ad2
    • L
      mt76: mt7615: switch to per-vif power_save support · a5e0aa78
      Lorenzo Bianconi 提交于
      switch to per-vif ps support since mt7615 offload firmware can handle it
      properly. This patch allows enabling/disabling power-save support on p2p
      interface
      Tested-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      a5e0aa78
    • L
      mt76: mt7615: introduce remain_on_channel support · 7307f296
      Lorenzo Bianconi 提交于
      Introduce remain_on_channel support to mt7615 driver if the device is
      running offload firmware
      Co-developed-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      7307f296
  5. 13 5月, 2020 14 次提交
  6. 18 3月, 2020 2 次提交
    • L
      mt76: mt7615: introduce mt7615_mcu_send_message routine · f4d45fe2
      Lorenzo Bianconi 提交于
      Introduce mt7615_mcu_send_message routine in order to allocate mcu skb
      out of mcu sending routine. This approach is useful when the mcu
      message is complicated and it is convenient to rely on skb buffer API
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      f4d45fe2
    • L
      mt76: mt76u: rely only on data buffer for usb control messagges · b2c4d95c
      Lorenzo Bianconi 提交于
      Starting from commit 'a6bfb6d1 ("mt76: usb: use max packet length
      for m76u_copy")' reg_val does not share memory with usb data buffer.
      On non-coherent devices this approach can corrupt data pointer since data
      and reg_val share the same cache-line, resulting in the following crash:
      
      [  371.544901] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 8042fbb0
      [  371.558521] CPU: 0 PID: 11 Comm: kworker/u2:2 Not tainted 4.14.160 #0
      [  371.565204] Workqueue: mt76u mt76u_deinit [mt76_usb]
      [  371.570331] task: 83823ac0 task.stack: 8386c000
      [  371.575004] $ 0   : 00000000 80590000 00000000 00000000
      [  371.580407] $ 4   : 82edaad0 00000002 83823ac0 fffffff8
      [  371.585810] $ 8   : fffffffd 0000fc00 8052da00 00000000
      [  371.591212] $12   : 000b2285 ae53a1a9 00108845 89da44c4
      [  371.596615] $16   : 82edaad0 82ed9d20 00001798 832edf00
      [  371.602019] $20   : 00000000 8386dda8 80530000 fffffffe
      [  371.607421] $24   : 8051d040 76274d1b
      [  371.612824] $28   : 8386c000 8386dd88 82edaad4 830d4d50
      [  371.618228] Hi    : 000000f7
      [  371.621203] Lo    : 33333371
      [  371.624196] epc   : 8042fbb0 __mutex_lock.isra.2+0x134/0x378
      [  371.630043] ra    : 830d4d50 mt76u_deinit+0x418/0xa6c [mt76_usb]
      [  371.636237] Status: 1000fc03KERNEL EXL IE
      [  371.640557] Cause : 0080000c (ExcCode 03)
      [  371.644696] BadVA : 00000000
      [  371.647671] PrId  : 00019374 (MIPS 24Kc)
      [  371.726123]  usbcore nls_base usb_common
      [  371.730180] Process kworker/u2:2 (pid: 11, threadinfo=8386c000, task=83823ac0, tls=00000000)
      [  371.738884] Stack : 833d009c 83210b4c 82ed8bc0 8386ddac 000001ff 8008ac50 8386ddac 83b74b00
      [  371.747519]         82edaad4 00000000 83b74b48 83210c38 82edaad0 82ed9d20 00001798 832edf00
      [  371.756157]         00000000 00000000 80530000 fffffffe 80530000 830d4d50 00000040 8389d850
      [  371.764794]         8052d9d8 8389d850 8386de30 82ed9d20 8386de5f 831c27bc 833d48ec 8052d9d8
      [  371.773431]         83823ac0 83823af0 82edab00 82ed9d20 8386de5f 831c5c30 00000000 8052d9a8
      [  371.782069]         ...
      [  371.784598] Call Trace:
      [  371.787130] [<8042fbb0>] __mutex_lock.isra.2+0x134/0x378
      [  371.792622] [<830d4d50>] mt76u_deinit+0x418/0xa6c [mt76_usb]
      [  371.808546]
      [  371.810920] ---[ end trace c62f0601f6730eb0 ]---
      [  371.818101] Kernel panic - not syncing: Fatal exception
      [  371.824420] Rebooting in 3 seconds..
      
      Fix the issue relying only on data buffer to send/receive usb control messages
      
      Fixes: a6bfb6d1 ("mt76: usb: use max packet length for m76u_copy")
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      b2c4d95c
  7. 14 2月, 2020 1 次提交