]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/usb.c
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
[karo-tx-uboot.git] / common / usb.c
index 44a435af6e67ed7de122a55e770c3d09f7ec95c5..a401c0919878b5801a947c8992b60ae331e799b0 100644 (file)
@@ -145,10 +145,14 @@ int usb_stop(void)
 /*
  * disables the asynch behaviour of the control message. This is used for data
  * transfers that uses the exclusiv access to the control and bulk messages.
+ * Returns the old value so it can be restored later.
  */
-void usb_disable_asynch(int disable)
+int usb_disable_asynch(int disable)
 {
+       int old_value = asynch_allowed;
+
        asynch_allowed = !disable;
+       return old_value;
 }
 
 
@@ -953,8 +957,8 @@ void usb_scan_devices(void)
        /* insert "driver" if possible */
 #ifdef CONFIG_USB_KEYBOARD
        drv_usb_kbd_init();
-       USB_PRINTF("scan end\n");
 #endif
+       USB_PRINTF("scan end\n");
 }
 
 
@@ -1162,6 +1166,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port)
 
        dev->children[port] = usb;
        usb->parent = dev;
+       usb->portnr = port + 1;
        /* Run it through the hoops (find a driver, etc) */
        if (usb_new_device(usb)) {
                /* Woops, disable the port */