summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/hcd_ddma.c
diff options
context:
space:
mode:
authorTang, Jianqiang <jianqiang.tang@intel.com>2016-02-16 15:02:07 -0800
committerFelipe Balbi <balbi@kernel.org>2016-02-17 10:32:09 +0200
commit62943b7dfa35887a40f71f698deec4488bf73036 (patch)
tree2fa89d1d3842c58033fcd72d8b4df924ed5fe7b6 /drivers/usb/dwc2/hcd_ddma.c
parent3142a16b9816c24501103a92010a283eb6e2766c (diff)
downloadlinux-62943b7dfa35887a40f71f698deec4488bf73036.tar.gz
linux-62943b7dfa35887a40f71f698deec4488bf73036.tar.bz2
linux-62943b7dfa35887a40f71f698deec4488bf73036.zip
usb: dwc2: host: fix the data toggle error in full speed descriptor dma
There will be data toggle error happen for full speed buld-out transfer. The data toggle bit is saved in qh for non-control transfers, it is wrong to check the qtd for that case. Also fix one static analysis tool issue after fix the data toggle error. John Youn: * Added WARN() to warn on improper usage of the dwc2_hcd_save_data_toggle() function. Signed-off-by: Dyson Lee <dyson.lee@intel.com> Signed-off-by: Tang, Jianqiang <jianqiang.tang@intel.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/dwc2/hcd_ddma.c')
-rw-r--r--drivers/usb/dwc2/hcd_ddma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c
index 89db47a1ffed..a41274aa52ad 100644
--- a/drivers/usb/dwc2/hcd_ddma.c
+++ b/drivers/usb/dwc2/hcd_ddma.c
@@ -1257,7 +1257,7 @@ stop_scan:
*/
if (halt_status == DWC2_HC_XFER_STALL)
qh->data_toggle = DWC2_HC_PID_DATA0;
- else if (qtd)
+ else
dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
}