aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 237e8b1e7027..912ce62279a6 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -642,6 +642,9 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)
642 if (len % 4) /* 32bit alignment */ 642 if (len % 4) /* 32bit alignment */
643 goto usbhsf_pio_prepare_push; 643 goto usbhsf_pio_prepare_push;
644 644
645 if (((u32)pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */
646 goto usbhsf_pio_prepare_push;
647
645 /* get enable DMA fifo */ 648 /* get enable DMA fifo */
646 fifo = usbhsf_get_dma_fifo(priv, pkt); 649 fifo = usbhsf_get_dma_fifo(priv, pkt);
647 if (!fifo) 650 if (!fifo)
@@ -716,6 +719,9 @@ static int usbhsf_dma_try_pop(struct usbhs_pkt *pkt, int *is_done)
716 if (!fifo) 719 if (!fifo)
717 goto usbhsf_pio_prepare_pop; 720 goto usbhsf_pio_prepare_pop;
718 721
722 if (((u32)pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */
723 goto usbhsf_pio_prepare_pop;
724
719 ret = usbhsf_fifo_select(pipe, fifo, 0); 725 ret = usbhsf_fifo_select(pipe, fifo, 0);
720 if (ret < 0) 726 if (ret < 0)
721 goto usbhsf_pio_prepare_pop; 727 goto usbhsf_pio_prepare_pop;