Commit a4e10b63 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: dummy_hcd shouldn't reject SET-ADDRESS requests

This patch for the dummy_hcd driver prevents it from rejecting SET-ADDRESS
requests when the address is already set.  The USB 2.0 spec states that if
a device is in the ADDRESS state, it should accept and start using the new
address.  Behavior in the CONFIGURED state is undefined, but since
dummy_hcd doesn't keep track of the difference between the two states we
might as well accept the new address in any case.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 311a4137
...@@ -1160,11 +1160,6 @@ static void dummy_timer (unsigned long _dum) ...@@ -1160,11 +1160,6 @@ static void dummy_timer (unsigned long _dum)
case USB_REQ_SET_ADDRESS: case USB_REQ_SET_ADDRESS:
if (setup.bRequestType != Dev_Request) if (setup.bRequestType != Dev_Request)
break; break;
if (dum->address != 0) {
maybe_set_status (urb, -ETIMEDOUT);
urb->actual_length = 0;
goto return_urb;
}
dum->address = setup.wValue; dum->address = setup.wValue;
maybe_set_status (urb, 0); maybe_set_status (urb, 0);
dev_dbg (hardware, "set_address = %d\n", dev_dbg (hardware, "set_address = %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment