Commit Graph
109 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau f408a2b756 mt76: Introduce mt76_mcu data structure
Introduce mt76_mcu data structure to contain common fields between
mt76u_mcu and mt76e_mcu.
Initialize mcu common fields in mt76_alloc_device().
Rely on mt76_mcu in mt76_mcu_rx_event and in mt76_mcu_get_response
in order to reuse them in usb code

Signed-off-by: Lorenzo Bianconi <[email protected]>
2020-02-14 10:16:16 +01:00
Lorenzo BianconiandFelix Fietkau dfc24bc504 mt76: mt76u: rename stat_wq in wq
Rename usb stat_wq in wq in order to be reused not just for gathering hw
tx statistics

Signed-off-by: Lorenzo Bianconi <[email protected]>
2020-02-14 10:16:16 +01:00
Lorenzo BianconiandFelix Fietkau 82bedb2945 mt76: mt76u: introduce MT_DRV_RX_DMA_HDR flag
Define MT_DRV_RX_DMA_HDR flag in drv_flag in order to not skip rx frame
dma header since new devices (e.g. mt7663u) reports rx frame info in the
usb dma header

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau e742618fc5 mt76: mt76u: introduce mt76u_skb_dma_info routine
Introduce mt76u_skb_dma_info utility routine in mt76-usb module in order
to be reused adding mt7663u support

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 8c6cf328eb mt76: mt76u: take into account different queue mapping for 7663
7663u devices rely on a different endpoint mapping. Take it into account
in mt76u_alloc_tx routine

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 39fb59ce92 mt76: mt76u: add {read/write}_extended utility routines
Introduce extended utility routines to read/write data o usb bus. New
devices (e.g. mt7663u) will rely on both upper and lower part of the
register address. Add ext parameter to mt76u_init signature in order to
reuse the code adding mt7663u support.

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau e2a39697fb mt76: mt76u: introduce mt76u_alloc_mcu_queue utility routine
Add mt76u_alloc_mcu_queue  utility routine to allocate mcu hw rx queue.
This is a preliminary patch to support new devices (e.g. mt7663u) that
rely on a hw queue for mcu messages

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau ca79916991 mt76: mt76u: resume all rx queue in mt76u_resume_rx
Resume all possible rx queues after suspend. This is a preliminary patch
to support mt7663u devices

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau c85dec8483 mt76: mt76u: add queue parameter to mt76u_rx_urb_alloc
Add mt76_queue parameter to mt76u_rx_urb_alloc signature since this
routine will be used to allocate urbs for mcu hw queue used by new
chipset generation (e.g. mt7663u). Check sg_max_size in in
mt76u_urb_alloc in order to use linear urb for mcu queue

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 885fe4a29b mt76: mt76u: add mt76u_alloc_rx_queue utility routine
Introduce mt76u_alloc_rx_queue routine to allocate rx hw queue.
This is a preliminary patch to support new devices (e.g. mt7663u) that
rely on a hw queue for mcu messages

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau aa28404bf2 mt76: mt76u: stop/free all possible rx queues
Stop/free all configured rx queues (data/mcu) in
mt76u_stop_rx/mt76u_free_rx. This is a preliminary patch to support new
devices (e.g. mt7663u) that rely on a hw queue for mcu messages

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau acc227e14d mt76: mt76u: introduce mt76u_free_rx_queue utility routine
Introduce mt76u_free_rx_queue utility routine to free rx hw queue.
This is a preliminary patch to support new devices (e.g. mt7663u) that
rely on a hw queue for mcu messages

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 580ddd175e mt76: mt76u: move mcu buffer allocation in mt76x02u drivers
Move mcu buffer allocation in mt76x2u/mt76x0u drivers since newer
chipsets (e.g. mt7663u) does not rely on synchronous mcu communication

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 06d466b869 mt76: mt76u: add queue id parameter to mt76u_submit_rx_buffers
Add queue_id parameter to mt76u_submit_rx_buffers in order to reuse it
adding mt7663u support

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 0077b30ce2 mt76: mt76u: use mt76_queue as mt76u_complete_rx context
In order to reuse mt76u_complete_rx for both data and mcu rx queue, rely
on mt76_queue as urb context in mt76u_complete_rx. Moreover set usb rx
endoint according to rx queue in mt76u_submit_rx_buf. This is a
preliminary patch to add mt7663u support

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau cf8e2590e4 mt76: mt76u: add mt76_queue to mt76u_refill_rx signature
Introduce mt76_queue parameter to mt76u_refill_rx signature in order to
reuse it for mcu hw rx queue

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau 06caaf0d33 mt76: mt76u: add mt76_queue to mt76u_get_next_rx_entry signature
Rely on mt76_queue pointer in mt76u_get_next_rx_entry in order to add
support for new devices (e.g 7663u) that reports fw events through hw rx
mcu queue

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau a5dca118bf mt76: mt76u: add mt76u_process_rx_queue utility routine
Introduce mt76u_process_rx_queue routine to process rx hw queue.
This is a preliminary patch to support new devices (e.g. mt7663u) that
rely on a hw queue for mcu messages

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Lorenzo BianconiandFelix Fietkau a0f1ff0473 mt76: mt76u: check tx_status_data pointer in mt76u_tx_tasklet
New devices (e.g. mt7663u) do not rely on stats workqueue to load tx
statistics but will be reported by the firmware. Check tx_status_data
pointer in mt76u_tx_tasklet in order to reuse tx tasklet for new devices

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2020-01-27 17:48:38 +01:00
Stanislaw GruszkaandFelix Fietkau 09fcbc214b mt76: usb: use max packet length for m76u_copy
For transferring data over USB the optimal size is endpoint maxpacket.
For my hardware maxpaket for control endpoint is 64 bytes and changing
to this value from 128 bytes further shorten TBTT work time from
3ms to 1ms.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-12-22 15:17:42 +01:00
Markus TheilandFelix Fietkau fa24aba4c2 mt76: speed up usb bulk copy
Use larger batches for usb copy to speed this operation up. Otherwise it
would be too slow for copying new beacons or broadcast frames over usb.
Assure, that always a multiple of 4 Bytes is copied, as outlined in
850e8f6fbd "mt76: round up length on mt76_wr_copy" from Felix Fietkau.

Signed-off-by: Markus Theil <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-12-22 15:17:42 +01:00
Felix Fietkau a3e88bcf17 mt76: move state from struct mt76_dev to mt76_phy
Allows keeping per-wiphy state separate

Signed-off-by: Felix Fietkau <[email protected]>
2019-11-20 12:54:55 +01:00
Felix Fietkau d246beb233 mt76: keep a set of software tx queues per phy
Allows tracking tx scheduling separately per phy

Signed-off-by: Felix Fietkau <[email protected]>
2019-11-20 12:54:17 +01:00
Felix Fietkau c5f1e83e30 mt76: add support for an extra wiphy in the main tx path
This is preparation for supporting multiple wiphys per device to support the
concurrent dual-band feature of MT7615D

Signed-off-by: Felix Fietkau <[email protected]>
2019-11-20 12:54:17 +01:00
Felix Fietkau af83ee8de9 mt76: move initialization of some struct members to mt76_alloc_device
Reduces duplication and prepares for further rework

Signed-off-by: Felix Fietkau <[email protected]>
2019-11-20 12:54:17 +01:00
Lorenzo BianconiandFelix Fietkau 3cbaf81a18 mt76: mt76u: rely on a dedicated stats workqueue
rate controller and throughput are very sensitive to tx status timing.
In order to improve performances when the system is heavily loaded,
substitute stat_work delayed_work with a regular work_struct and create
a mt76u dedicated workqueue for tx status reporting

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-11-20 12:26:32 +01:00
Lorenzo BianconiandFelix Fietkau 20f0589787 mt76: mt76u: rely on usb_interface instead of usb_dev
usb drivers are supposed to communicate using usb_interface instead
mt76x{0,2}u is now registering through usb_device. Fix it by passing
usb_intf device to mt76_alloc_device routine.

Fixes: 112f980ac8926 ("mt76usb: use usb_dev private data")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Tested-By: Zero_Chaos <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-11-20 12:26:32 +01:00
Lorenzo BianconiandFelix Fietkau a20c20bbe8 mt76: usb: add lockdep_assert_held in __mt76u_vendor_request
Introduce lockdep_assert_held macro in __mt76u_vendor_request routine
and remove comments regarding usb_ctrl_mtx lock

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-09-26 12:04:20 +02:00
Ryder LeeandFelix Fietkau 37673a4181 mt76: fix some checkpatch warnings
This fixes the following checkpatch warnings:
CHECK: Alignment should match open parenthesis
CHECK: No space is necessary after a cast

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-22 09:26:30 +02:00
Ryder LeeandFelix Fietkau f625afcedc mt76: switch to SPDX tag instead of verbose boilerplate text
No functional change intended.

Add SPDX identifiers to all remaining files in /mt76.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-20 15:22:20 +02:00
Lorenzo BianconiandFelix Fietkau 4947ad4eab mt76: introduce mt76_mmio_read_copy routine
Add mt76_mmio_read_copy routine and the related function pointer in
mt76_bus_ops data structure. mt76_mmio_read_copy will be used to add
BIP_CMAC_128 cipher hw support to mt7615 driver

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-20 15:21:27 +02:00
Stanislaw GruszkaandFelix Fietkau 307be50cc5 mt76: usb: remove unneeded {put,get}_unaligned
Compiler give us guarantees on variables alignment, so use
an variable as buffer when read/write registers and remove
unneeded {put,get}_unaligned.

Signed-off-by: Stanislaw Gruszka <[email protected]>
2019-07-12 15:56:23 +02:00
Stanislaw GruszkaandFelix Fietkau 8c1da9367b mt76: usb: fix endian in mt76u_copy
In contrast to mt76_wr() which we use to program registers,
on mt76_wr_copy() we should not change endian of the data.

Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
Signed-off-by: Stanislaw Gruszka <[email protected]>
2019-07-12 15:56:23 +02:00
Felix Fietkau 439354d540 Revert "mt76: usb: fix endian in mt76u_copy"
This reverts commit edbe88ec7c.
2019-07-12 15:52:03 +02:00
Felix Fietkau 48800e7b60 Revert "mt76: usb: remove unneeded {put,get}_unaligned"
This reverts commit f43b6228fa.
2019-07-12 15:52:02 +02:00
Felix Fietkau 3b08966d99 Revert "mt76: usb: use full intermediate buffer in mt76u_copy"
This reverts commit 5e1e5b75d6.
2019-07-12 15:51:58 +02:00
Lorenzo BianconiandFelix Fietkau 017d0ff097 mt76: mt76u: fix typo in mt76u_fill_rx_sg
Fix typo setting urb->transfer_buffer_length in mt76u_fill_rx_sg

Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:03:00 +02:00
Stanislaw GruszkaandFelix Fietkau 5e1e5b75d6 mt76: usb: use full intermediate buffer in mt76u_copy
Instead of use several 4 bytes usb requests, use full 32 bytes buffer
to copy data to device. With the change we use less requests and copy
exact data size to the device regardless size is multiple of 4 or not.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:02:16 +02:00
Stanislaw GruszkaandFelix Fietkau f43b6228fa mt76: usb: remove unneeded {put,get}_unaligned
Compiler give us guaranties on variables alignment, so use
an variable as buffer when read/write registers and remove
unneeded {put,get}_unaligned.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:02:16 +02:00
Stanislaw GruszkaandFelix Fietkau edbe88ec7c mt76: usb: fix endian in mt76u_copy
In contrast to mt76_wr() which we use to program registers,
on mt76_wr_copy() we should not change endian of the data.

Fixes: b40b15e1521f ("mt76: add usb support to mt76 layer")
Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-04 20:02:16 +02:00
Felix Fietkau 9e2e0b8577 mt76: round up length on mt76_wr_copy
When beacon length is not a multiple of 4, the beacon could be sent with
the last 1-3 bytes corrupted. The skb data is guaranteed to have enough
room for reading beyond the end, because it is always followed by
skb_shared_info, so rounding up is safe.
All other callers of mt76_wr_copy have multiple-of-4 length already.

Cc: [email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2019-07-01 13:18:54 +02:00
Lorenzo BianconiandFelix Fietkau d680ab01cd mt76: usb: fix rx A-MSDU support
Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes
for rx") breaks A-MSDU support. When A-MSDU is enable the device can
receive frames up to q->buf_size but they will be discarded in
mt76u_process_rx_entry since there is no enough room for
skb_shared_info. Fix the issue reallocating the skb and copying in the
linear area the first 128B of the received frames and in the frag_list
the remaining part

Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-06-25 13:21:19 +02:00
Lorenzo BianconiandFelix Fietkau 3386ccf784 mt76: mt76u: get rid of {out,in}_max_packet
Remove {out,in}_max_packet from mt76_usb data structure since
they just track last usb endpoint and they are not actually used

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Lorenzo BianconiandFelix Fietkau 9dd1089a29 mt76: mt76u: reduce rx memory footprint
Reduce rx memory footprint allocating just one SG buffer since for the
moment we support just 3839B as maximal size of an A-MSDU.
Introduce different SG_MAX_SIZE definitions for TX and RX sides.
Moreover set q->buf_size to PAGE_SIZE even for SG case.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-06-25 13:19:51 +02:00
Felix Fietkau 335e8c6baf Revert "mt76: usb: fix rx A-MSDU support"
This reverts commit 2bfae5a252.
To be replaced with a fixed version

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-24 23:53:37 +02:00
Felix Fietkau 0d5caead97 Revert "mt76: usb: do not always copy the first part of received frames"
This reverts commit b0335320fc.

Signed-off-by: Felix Fietkau <[email protected]>
2019-06-24 23:53:37 +02:00
Lorenzo BianconiandFelix Fietkau b0335320fc mt76: usb: do not always copy the first part of received frames
Set usb buffer size taking into account skb_shared_info in order to
not always copy the first part of received frames if A-MSDU is enabled
for SG capable devices

Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-06-07 19:04:04 +02:00
Lorenzo BianconiandFelix Fietkau 2bfae5a252 mt76: usb: fix rx A-MSDU support
Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes
for rx") breaks A-MSDU support. When A-MSDU is enable the device can
receive frames up to q->buf_size but they will be discarded in
mt76u_process_rx_entry since there is no enough room for
skb_shared_info. Fix the issue reallocating the skb and copying in the
linear area the first 128B of the received frames and in the frag_list
the remaining part.

Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-06-07 19:03:54 +02:00
Stanislaw GruszkaandFelix Fietkau f06647efbd mt76: usb: use EP max packet aligned buffer sizes for rx
If buffer size is not usb_endpoint_maxp (512 or 1024 bytes) multiple,
usb host driver has to use bounce buffer and copy data. For RX we can
avoid that since we alreay allocate q->buf_size (2kB) buffers and
mt76usb hardware will not fill more data as rx packet size is limited
by network protocol. However add error message if this assumption
somehow will be not true.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-04-30 11:37:13 +02:00
Stanislaw GruszkaandFelix Fietkau 6c1cab9aba mt76usb: fix tx/rx stop
Disabling tasklets on stopping rx/tx is wrong. If blocked tasklet
is scheduled and we remove device we will get 100% cpu usage:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    9 root      20   0       0      0      0 R  93.8   0.0   1:47.19 ksoftirqd/0

by infinite loop in tasklet_action_common() and eventuall crash on next
mt76usb module load:

[ 2068.591964] RIP: 0010:tasklet_action_common.isra.17+0x66/0x100
[ 2068.591966] Code: 41 89 f5 eb 25 f0 48 0f ba 33 00 0f 83 b1 00 00 00 48 8b 7a 20 48 8b 42 18 e8 56 a3 b5 00 f0 80 23 fd 48 89 ea 48 85 ed 74 53 <48> 8b 2a 48 8d 5a 08 f0 48 0f ba 6a 08 01 72 0b 8b 42 10 85 c0 74
[ 2068.591968] RSP: 0018:ffff98758c34be58 EFLAGS: 00010206
[ 2068.591969] RAX: ffff98758e6966d0 RBX: ffff98756e69aef8 RCX: 0000000000000006
[ 2068.591970] RDX: 01060a053d060305 RSI: 0000000000000006 RDI: ffff98758e6966d0
[ 2068.591971] RBP: 01060a053d060305 R08: 0000000000000000 R09: 00000000000203c0
[ 2068.591971] R10: 000003ff65b34f08 R11: 0000000000000001 R12: ffff98758e6966d0
[ 2068.591972] R13: 0000000000000006 R14: 0000000000000040 R15: 0000000000000006
[ 2068.591974] FS:  0000000000000000(0000) GS:ffff98758e680000(0000) knlGS:0000000000000000
[ 2068.591975] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2068.591975] CR2: 00002c5f73a6cc20 CR3: 00000002f920a001 CR4: 00000000003606e0
[ 2068.591977] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2068.591978] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2068.591978] Call Trace:
[ 2068.591985]  __do_softirq+0xe3/0x30a
[ 2068.591989]  ? sort_range+0x20/0x20
[ 2068.591990]  run_ksoftirqd+0x26/0x40
[ 2068.591992]  smpboot_thread_fn+0xc5/0x160
[ 2068.591995]  kthread+0x112/0x130
[ 2068.591997]  ? kthread_create_on_node+0x40/0x40
[ 2068.591998]  ret_from_fork+0x35/0x40
[ 2068.591999] Modules linked in: ccm arc4 fuse rfcomm cmac bnep sunrpc snd_hda_codec_hdmi snd_soc_skl snd_soc_core snd_soc_acpi_intel_match snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core iTCO_wdt snd_hda_intel intel_rapl iTCO_vendor_support x86_pkg_temp_thermal intel_powerclamp btusb mei_wdt coretemp btrtl snd_hda_codec btbcm btintel intel_cstate snd_hwdep intel_uncore uvcvideo snd_hda_core videobuf2_vmalloc videobuf2_memops intel_rapl_perf wmi_bmof videobuf2_v4l2 intel_wmi_thunderbolt snd_seq bluetooth joydev videobuf2_common snd_seq_device snd_pcm videodev media i2c_i801 snd_timer idma64 ecdh_generic intel_lpss_pci intel_lpss mei_me mei ucsi_acpi typec_ucsi processor_thermal_device intel_soc_dts_iosf intel_pch_thermal typec thinkpad_acpi wmi snd soundcore rfkill int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad pcc_cpufreq uas usb_storage crc32c_intel i915 i2c_algo_bit nvme serio_raw
[ 2068.592033]  drm_kms_helper e1000e nvme_core drm video ipv6 [last unloaded: cfg80211]

Fortunate thing is that this not happen frequently, as scheduling
tasklet on blocked state is very exceptional, though might happen.

Due to different RX/TX tasklet processing fix is different for those.

For RX we have to assure rx_tasklet do fail to resubmit buffers
by poisoning urb's and kill the tasklet.

For TX we need to handle all stop cases properly (suspend, module
unload, device removal).

Signed-off-by: Stanislaw Gruszka <[email protected]>
2019-04-29 13:37:59 +02:00