]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: ohci: Fix ctrl in messages with a data-len of 0
authorHans de Goede <hdegoede@redhat.com>
Tue, 5 May 2015 21:56:12 +0000 (23:56 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 6 May 2015 18:48:35 +0000 (12:48 -0600)
Fix taken from the Linux kernel ohci driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Vasut <marex@denx.de>
drivers/usb/host/ohci-hcd.c

index 15aea98591e227a3ed16365c097339149409701e..02aa7f39278d38f81ed481375248ae430090183b 100644 (file)
@@ -988,7 +988,7 @@ static void td_submit_job(ohci_t *ohci, struct usb_device *dev,
                }
 
                /* Status phase */
-               info = usb_pipeout(pipe)?
+               info = (usb_pipeout(pipe) || data_len == 0) ?
                        TD_CC | TD_DP_IN | TD_T_DATA1:
                        TD_CC | TD_DP_OUT | TD_T_DATA1;
                td_fill(ohci, info, data, 0, dev, cnt++, urb);