Commit b4c25261 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Jiri Slaby

usb: renesas_usbhs: Don't disable the pipe if Control write status stage

commit 93fb9127 upstream.

This patch fixes an issue that sometimes this controller is not able
to complete the Control write status stage.

This driver should enable DCPCTR.CCPL and PID_BUF to complete the status
stage. However, if this driver detects the ctrl_stage interruption first
before the control write data is received, this driver will clear the
PID_BUF wrongly in the usbhsf_pio_try_pop(). To avoid this issue, this
patch doesn't clear the PID_BUF in the usbhsf_pio_try_pop().
(Since also the privious code doesn't disable the PID_BUF after a control
 transfer was finished, this patch doesn't have any side efforts.)
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 0df0329a
...@@ -647,7 +647,14 @@ static int usbhsf_pio_try_pop(struct usbhs_pkt *pkt, int *is_done) ...@@ -647,7 +647,14 @@ static int usbhsf_pio_try_pop(struct usbhs_pkt *pkt, int *is_done)
(total_len < maxp)) { /* short packet */ (total_len < maxp)) { /* short packet */
*is_done = 1; *is_done = 1;
usbhsf_rx_irq_ctrl(pipe, 0); usbhsf_rx_irq_ctrl(pipe, 0);
usbhs_pipe_disable(pipe); /* disable pipe first */ /*
* If function mode, since this controller is possible to enter
* Control Write status stage at this timing, this driver
* should not disable the pipe. If such a case happens, this
* controller is not able to complete the status stage.
*/
if (!usbhs_mod_is_host(priv) && !usbhs_pipe_is_dcp(pipe))
usbhs_pipe_disable(pipe); /* disable pipe first */
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment