diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-02-14 11:37:21 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-14 13:44:53 +0200 |
commit | 6e4b74e4690dd03b5664fa4895c3db0607d64742 (patch) | |
tree | 607c5bd1c23be029b589971e512458fde91ed0fa /drivers/usb/renesas_usbhs/fifo.h | |
parent | d5261286949fc9ada701c7e30bf89e08a6dbf4de (diff) | |
download | linux-6e4b74e4690dd03b5664fa4895c3db0607d64742.tar.bz2 |
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>
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.h')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.h b/drivers/usb/renesas_usbhs/fifo.h index f68609c0f489..c31731a843d1 100644 --- a/drivers/usb/renesas_usbhs/fifo.h +++ b/drivers/usb/renesas_usbhs/fifo.h @@ -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; |