From d1cba441ac7e5fe718de986a3404085cecdc2e1a Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Sat, 19 Sep 2009 22:31:54 +0200 Subject: [PATCH] control_quirk seems to be evil and our buf must be "80 06 00 01 00 00 40 00" for setup! --- usb/core/core.c | 5 +++-- usb/core/usb.c | 4 ++-- usb/host/ohci.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usb/core/core.c b/usb/core/core.c index d9ede11..95b8091 100644 --- a/usb/core/core.c +++ b/usb/core/core.c @@ -116,7 +116,8 @@ usb_device *usb_add_device() * wIndex = 0 * wLength = 8 (in Bytes!?) */ - usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE, 0, 64, buf, 8, 0); + usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 64, buf, 8, 0); + //usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE, 0, 64, buf, 8, 0); /* * length (here =64) should be "number of byte to transfer", not @@ -297,8 +298,8 @@ u16 usb_submit_irp(usb_irp *irp) /**** send token ****/ printf("togl: %d\n", togl); hcdi_enqueue(td); - break; #if 0 + break; memcpy(td->buffer, mybuf, td->actlen); #endif diff --git a/usb/core/usb.c b/usb/core/usb.c index 1665abf..bfb37a6 100644 --- a/usb/core/usb.c +++ b/usb/core/usb.c @@ -143,7 +143,7 @@ u8 usb_control_msg(usb_device *dev, u8 requesttype, u8 request, u16 value, u16 i irp->epsize = dev->bMaxPacketSize0; irp->type = USB_CTRL; -#if 1 +#if 0 buf[0]=(char)requesttype; buf[1]=(char)request; buf[2]=(char)(value >> 8); @@ -154,7 +154,7 @@ u8 usb_control_msg(usb_device *dev, u8 requesttype, u8 request, u16 value, u16 i buf[6]=(char)(length); buf[7]=(char)(length >> 8); #endif -#if 0 +#if 1 //should be the right way around? :O buf[0]=(char)requesttype; buf[1]=(char)request; diff --git a/usb/host/ohci.c b/usb/host/ohci.c index bf1bc62..d78c672 100644 --- a/usb/host/ohci.c +++ b/usb/host/ohci.c @@ -178,7 +178,7 @@ static void dbg_td_flag(u32 flag) * Enqueue a transfer descriptor. */ u8 hcdi_enqueue(usb_transfer_descriptor *td) { - control_quirk(); //required? YES! :O ... erm... or no? :/ + //control_quirk(); //required? YES! :O ... erm... or no? :/ u32 tmptdbuffer; static struct endpoint_descriptor dummyconfig; -- 2.25.1