done head fixed; we poll edhead->headp until it is null, to get sure
[ppcskel.git] / usb / core / core.c
index 628e999602d555b4bb2fecf9635b9b8011845a4b..bf3fbf729658b9658e687244d15ea5d1b7bf3966 100644 (file)
@@ -116,11 +116,9 @@ usb_device *usb_add_device()
         * wIndex = 0
         * wLength = 64 // in fact just 8 bytes
         */
-       //usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 64, buf, 8, 0);
-       // length == 8 => no STALL?! :O
        usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE << 8, 0, 64, buf, 8, 0);
 
-       printf("===========\nafter usb control msg:\n");
+       printf("=============\nbuf: 0x%08X\nafter usb control msg:\n", buf);
        hexdump(buf, sizeof(buf));
 
 #if 0
@@ -130,11 +128,13 @@ usb_device *usb_add_device()
        devdescr_size = (u8) buf[0];    /* save real length of device descriptor */
 
        /* define new adress */
+       /*
        usb_control_msg(dev, 0x00, SET_ADDRESS, address << 8, 0, 0, buf, 8, 0);
        dev->address = address;
+       */
 
        /* get complete device descriptor */
-       usb_control_msg(dev, 0x80, GET_DESCRIPTOR, 1, 0, devdescr_size, buf, 8,
+       usb_control_msg(dev, 0x80, GET_DESCRIPTOR, DEVICE<<8, 0, devdescr_size, buf, 8,
                                                                        0);
 
        /* save only really neccessary values for this small usbstack */
@@ -279,7 +279,6 @@ u16 usb_submit_irp(usb_irp *irp)
 
                /* control message are always 8 bytes */
                td->actlen = 8;
-               memcpy(mybuf, td->buffer, td->actlen);
 
                togl = 0;
                /* start with data0 */