ChangeSet 1.1722.97.82, 2004/06/18 09:52:38-07:00, [EMAIL PROTECTED]

[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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 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",



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to