dev->epTogl[2] = 0;
char buf[64];
- u8 devdescr_size;
- u8 address = usb_next_address();
/* ask first 8 bytes of device descriptor with this special
* GET Descriptor Request, when device address = 0
hexdump(buf, sizeof(buf));
#if 0
+ u8 devdescr_size;
+ u8 address = usb_next_address();
dev->bMaxPacketSize0 = (u8) buf[7] ? (u8) buf[7] : 1; //dirty? /* setup real ep0 fifo size */
devdescr_size = (u8) buf[0]; /* save real length of device descriptor */
irp->epsize = dev->bMaxPacketSize0;
irp->type = USB_CTRL;
+#if 1
buf[0]=(char)requesttype;
buf[1]=(char)request;
buf[2]=(char)(value >> 8);
// lenght buf are the only where the order is inverted
buf[6]=(char)(length);
buf[7]=(char)(length >> 8);
+#endif
+ //stupid hack?
+#if 0
+ buf[0]=(char)requesttype;
+ buf[1]=(char)request;
+ buf[2]=(char)(value);
+ buf[3]=(char)(value >> 8);
+ buf[4]=(char)(index);
+ buf[5]=(char)(index >> 8);
+ // lenght buf are the only where the order is inverted
+ buf[6]=(char)(length >> 8);
+ buf[7]=(char)(length);
+#endif
irp->buffer = buf;
irp->len = length;
/**
* Enqueue a transfer descriptor.
*/
+u8 first = 0;
u8 hcdi_enqueue(usb_transfer_descriptor *td) {
control_quirk();
"done head (vor sync): 0x%08X\n", ACCESS_LE(hcca_oh0.done_head));
sync_before_read(&hcca_oh0, 256);
printf("done head (nach sync): 0x%08X\n", ACCESS_LE(hcca_oh0.done_head));
+ printf("HCCA->frame_no after %d seconds: %d\n", 0, ACCESS_LE(hcca_oh0.frame_no));
+ printf("HCCA->frame_no WITHOUT conversion macro: %d\n", hcca_oh0.frame_no);
+ if(!first) {
+ first = 1;
+ udelay(1000000);
+ sync_before_read(&hcca_oh0, 256);
+ printf("HCCA->frame_no after %d seconds: %d\n", 1, ACCESS_LE(hcca_oh0.frame_no));
+ printf("HCCA->frame_no WITHOUT conversion macro: %d\n", hcca_oh0.frame_no);
+ }
struct general_td *tmptd = allocate_general_td(td->actlen);
(void) memcpy((void*) (phys_to_virt(ACCESS_LE(tmptd->cbp))), td->buffer, td->actlen); /* throws dsi exception after some time :X */