diff mbox

[U-Boot,09/16] usb: ohci: Fix ctrl in messages with a data-len of 0

Message ID 1430862979-4684-10-git-send-email-hdegoede@redhat.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Hans de Goede May 5, 2015, 9:56 p.m. UTC
Fix taken from the Linux kernel ohci driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/host/ohci-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut May 5, 2015, 10:59 p.m. UTC | #1
On Tuesday, May 05, 2015 at 11:56:12 PM, Hans de Goede wrote:
> Fix taken from the Linux kernel ohci driver.

Commit ID from Linux where this came from would be nice to have
in the commit message, but that's a minor thing.

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Hans de Goede May 5, 2015, 11:25 p.m. UTC | #2
Hi,

On 05/06/2015 12:59 AM, Marek Vasut wrote:
> On Tuesday, May 05, 2015 at 11:56:12 PM, Hans de Goede wrote:
>> Fix taken from the Linux kernel ohci driver.
>
> Commit ID from Linux where this came from would be nice to have
> in the commit message, but that's a minor thing.

I did not take this from a specific commit, I noticed this
when comparing bits of the u-boot and linux code.

Regards,

Hans

>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Acked-by: Marek Vasut <marex@denx.de>
>
> Best regards,
> Marek Vasut
>
Marek Vasut May 5, 2015, 11:38 p.m. UTC | #3
On Wednesday, May 06, 2015 at 01:25:29 AM, Hans de Goede wrote:
> Hi,
> 
> On 05/06/2015 12:59 AM, Marek Vasut wrote:
> > On Tuesday, May 05, 2015 at 11:56:12 PM, Hans de Goede wrote:
> >> Fix taken from the Linux kernel ohci driver.
> > 
> > Commit ID from Linux where this came from would be nice to have
> > in the commit message, but that's a minor thing.
> 
> I did not take this from a specific commit, I noticed this
> when comparing bits of the u-boot and linux code.

Then that's also ok. Thanks !

Best regards,
Marek Vasut
Simon Glass May 6, 2015, 9:44 p.m. UTC | #4
On 5 May 2015 at 17:38, Marek Vasut <marex@denx.de> wrote:
> On Wednesday, May 06, 2015 at 01:25:29 AM, Hans de Goede wrote:
>> Hi,
>>
>> On 05/06/2015 12:59 AM, Marek Vasut wrote:
>> > On Tuesday, May 05, 2015 at 11:56:12 PM, Hans de Goede wrote:
>> >> Fix taken from the Linux kernel ohci driver.
>> >
>> > Commit ID from Linux where this came from would be nice to have
>> > in the commit message, but that's a minor thing.
>>
>> I did not take this from a specific commit, I noticed this
>> when comparing bits of the u-boot and linux code.
>
> Then that's also ok. Thanks !

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 15aea98..02aa7f3 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);