Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c529cdc authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez Committed by Greg Kroah-Hartman
Browse files

wusb: devices dont use a set address



A WUSB device gets his address during the connection phase; later on,
during the authenthication phase (driven from user space) we assign
the final address. So we need to skip in hub_port_init() the actual
setting of the address for WUSB devices.

Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8af548dc
Loading
Loading
Loading
Loading
+27 −20
Original line number Diff line number Diff line
@@ -2419,6 +2419,12 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
#undef GET_DESCRIPTOR_BUFSIZE
		}

 		/*
 		 * If device is WUSB, we already assigned an
 		 * unauthorized address in the Connect Ack sequence;
 		 * authorization will assign the final address.
 		 */
 		if (udev->wusb == 0) {
			for (j = 0; j < SET_ADDRESS_TRIES; ++j) {
				retval = hub_set_address(udev, devnum);
				if (retval >= 0)
@@ -2439,6 +2445,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
			msleep(10);
			if (USE_NEW_SCHEME(retry_counter))
				break;
  		}

		retval = usb_get_device_descriptor(udev, 8);
		if (retval < 8) {
@@ -2455,7 +2462,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
	if (retval)
		goto fail;

	i = udev->descriptor.bMaxPacketSize0 == 0xff?
	i = udev->descriptor.bMaxPacketSize0 == 0xff?	/* wusb device? */
	    512 : udev->descriptor.bMaxPacketSize0;
	if (le16_to_cpu(udev->ep0.desc.wMaxPacketSize) != i) {
		if (udev->speed != USB_SPEED_FULL ||