aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/fifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.c')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index c021b202c0f3..9538f0feafe2 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -163,7 +163,7 @@ static int usbhsf_pkt_handler(struct usbhs_pipe *pipe, int type)
163 func = pkt->handler->dma_done; 163 func = pkt->handler->dma_done;
164 break; 164 break;
165 default: 165 default:
166 dev_err(dev, "unknown pkt hander\n"); 166 dev_err(dev, "unknown pkt handler\n");
167 goto __usbhs_pkt_handler_end; 167 goto __usbhs_pkt_handler_end;
168 } 168 }
169 169
@@ -192,8 +192,8 @@ void usbhs_pkt_start(struct usbhs_pipe *pipe)
192/* 192/*
193 * irq enable/disable function 193 * irq enable/disable function
194 */ 194 */
195#define usbhsf_irq_empty_ctrl(p, e) usbhsf_irq_callback_ctrl(p, bempsts, e) 195#define usbhsf_irq_empty_ctrl(p, e) usbhsf_irq_callback_ctrl(p, irq_bempsts, e)
196#define usbhsf_irq_ready_ctrl(p, e) usbhsf_irq_callback_ctrl(p, brdysts, e) 196#define usbhsf_irq_ready_ctrl(p, e) usbhsf_irq_callback_ctrl(p, irq_brdysts, e)
197#define usbhsf_irq_callback_ctrl(pipe, status, enable) \ 197#define usbhsf_irq_callback_ctrl(pipe, status, enable) \
198 ({ \ 198 ({ \
199 struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); \ 199 struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); \
@@ -202,9 +202,9 @@ void usbhs_pkt_start(struct usbhs_pipe *pipe)
202 if (!mod) \ 202 if (!mod) \
203 return; \ 203 return; \
204 if (enable) \ 204 if (enable) \
205 mod->irq_##status |= status; \ 205 mod->status |= status; \
206 else \ 206 else \
207 mod->irq_##status &= ~status; \ 207 mod->status &= ~status; \
208 usbhs_irq_callback_update(priv, mod); \ 208 usbhs_irq_callback_update(priv, mod); \
209 }) 209 })
210 210
@@ -488,6 +488,8 @@ static int usbhsf_pio_try_push(struct usbhs_pkt *pkt, int *is_done)
488 usbhs_pipe_data_sequence(pipe, pkt->sequence); 488 usbhs_pipe_data_sequence(pipe, pkt->sequence);
489 pkt->sequence = -1; /* -1 sequence will be ignored */ 489 pkt->sequence = -1; /* -1 sequence will be ignored */
490 490
491 usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->length);
492
491 ret = usbhsf_fifo_select(pipe, fifo, 1); 493 ret = usbhsf_fifo_select(pipe, fifo, 1);
492 if (ret < 0) 494 if (ret < 0)
493 return 0; 495 return 0;
@@ -594,6 +596,7 @@ static int usbhsf_prepare_pop(struct usbhs_pkt *pkt, int *is_done)
594 usbhs_pipe_data_sequence(pipe, pkt->sequence); 596 usbhs_pipe_data_sequence(pipe, pkt->sequence);
595 pkt->sequence = -1; /* -1 sequence will be ignored */ 597 pkt->sequence = -1; /* -1 sequence will be ignored */
596 598
599 usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->length);
597 usbhs_pipe_enable(pipe); 600 usbhs_pipe_enable(pipe);
598 usbhsf_rx_irq_ctrl(pipe, 1); 601 usbhsf_rx_irq_ctrl(pipe, 1);
599 602
@@ -795,6 +798,7 @@ static void xfer_work(struct work_struct *work)
795 dev_dbg(dev, " %s %d (%d/ %d)\n", 798 dev_dbg(dev, " %s %d (%d/ %d)\n",
796 fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero); 799 fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero);
797 800
801 usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
798 usbhs_pipe_enable(pipe); 802 usbhs_pipe_enable(pipe);
799 usbhsf_dma_start(pipe, fifo); 803 usbhsf_dma_start(pipe, fifo);
800 dma_async_issue_pending(chan); 804 dma_async_issue_pending(chan);