summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-05-05 23:56:12 +0200
committerSimon Glass <sjg@chromium.org>2015-05-06 12:48:35 -0600
commitcae01cb2a9f9a1c4df315e53b063f846d3b364a3 (patch)
tree5e3949830449a9aa50180cf57142576e8612865d /drivers/usb
parent6651c140659a300fa2bebf0de1c58832c123b1f2 (diff)
downloadu-boot-cae01cb2a9f9a1c4df315e53b063f846d3b364a3.tar.gz
u-boot-cae01cb2a9f9a1c4df315e53b063f846d3b364a3.tar.xz
u-boot-cae01cb2a9f9a1c4df315e53b063f846d3b364a3.zip
usb: ohci: Fix ctrl in messages with a data-len of 0
Fix taken from the Linux kernel ohci driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ohci-hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 15aea98591..02aa7f3927 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -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);