From: Hans de Goede Date: Tue, 5 May 2015 21:56:12 +0000 (+0200) Subject: usb: ohci: Fix ctrl in messages with a data-len of 0 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=cae01cb2a9f9a1c4df315e53b063f846d3b364a3;p=u-boot.git 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 Acked-by: Marek Vasut --- 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);