ChangeSet 1.1722.97.82, 2004/06/18 09:52:38-07:00, stern@rowland.harvard.edu

[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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/usb/gadget/dummy_hcd.c |    5 -----
 1 files changed, 5 deletions(-)


diff -Nru a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
--- a/drivers/usb/gadget/dummy_hcd.c	Fri Jun 18 10:51:38 2004
+++ b/drivers/usb/gadget/dummy_hcd.c	Fri Jun 18 10:51:38 2004
@@ -1160,11 +1160,6 @@
 			case USB_REQ_SET_ADDRESS:
 				if (setup.bRequestType != Dev_Request)
 					break;
-				if (dum->address != 0) {
-					maybe_set_status (urb, -ETIMEDOUT);
-					urb->actual_length = 0;
-					goto return_urb;
-				}
 				dum->address = setup.wValue;
 				maybe_set_status (urb, 0);
 				dev_dbg (hardware, "set_address = %d\n",
