mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
usb: renesas_usbhs: care buff alignment when dma handler
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
8d48fdf689
commit
9a12d09765
@ -642,6 +642,9 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)
|
|||||||
if (len % 4) /* 32bit alignment */
|
if (len % 4) /* 32bit alignment */
|
||||||
goto usbhsf_pio_prepare_push;
|
goto usbhsf_pio_prepare_push;
|
||||||
|
|
||||||
|
if (((u32)pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */
|
||||||
|
goto usbhsf_pio_prepare_push;
|
||||||
|
|
||||||
/* get enable DMA fifo */
|
/* get enable DMA fifo */
|
||||||
fifo = usbhsf_get_dma_fifo(priv, pkt);
|
fifo = usbhsf_get_dma_fifo(priv, pkt);
|
||||||
if (!fifo)
|
if (!fifo)
|
||||||
@ -716,6 +719,9 @@ static int usbhsf_dma_try_pop(struct usbhs_pkt *pkt, int *is_done)
|
|||||||
if (!fifo)
|
if (!fifo)
|
||||||
goto usbhsf_pio_prepare_pop;
|
goto usbhsf_pio_prepare_pop;
|
||||||
|
|
||||||
|
if (((u32)pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */
|
||||||
|
goto usbhsf_pio_prepare_pop;
|
||||||
|
|
||||||
ret = usbhsf_fifo_select(pipe, fifo, 0);
|
ret = usbhsf_fifo_select(pipe, fifo, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto usbhsf_pio_prepare_pop;
|
goto usbhsf_pio_prepare_pop;
|
||||||
|
Loading…
Reference in New Issue
Block a user