From cae01cb2a9f9a1c4df315e53b063f846d3b364a3 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 5 May 2015 23:56:12 +0200 Subject: [PATCH] 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 --- drivers/usb/host/ohci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);