usb: renesas: fix scheduling in atomic context bug
The current renesas_usbhs driver triggers BUG: scheduling while atomic: ksoftirqd/0/3/0x00000102 with enabled CONFIG_DEBUG_ATOMIC_SLEEP, by submitting DMA transfers from an atomic (tasklet) context, which is not supported by the shdma dmaengine driver. Fix it by switching to a work. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
此提交包含在:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/sh_dma.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <asm/dma.h>
|
||||
#include "pipe.h"
|
||||
|
||||
@@ -31,7 +32,6 @@ struct usbhs_fifo {
|
||||
u32 ctr; /* xFIFOCTR */
|
||||
|
||||
struct usbhs_pipe *pipe;
|
||||
struct tasklet_struct tasklet;
|
||||
|
||||
struct dma_chan *tx_chan;
|
||||
struct dma_chan *rx_chan;
|
||||
@@ -53,6 +53,7 @@ struct usbhs_pkt {
|
||||
struct usbhs_pkt_handle *handler;
|
||||
void (*done)(struct usbhs_priv *priv,
|
||||
struct usbhs_pkt *pkt);
|
||||
struct work_struct work;
|
||||
dma_addr_t dma;
|
||||
void *buf;
|
||||
int length;
|
||||
|
新增問題並參考
封鎖使用者