From: Greg KH To: torvalds@transmeta.com Cc: linux-usb-devel@lists.sourceforge.net Subject: [BK PATCH] USB changes Pull from: bk://linuxusb.bkbits.net/linus-2.5 drivers/usb/hid-core.c | 11 ++++++----- drivers/usb/usb.c | 29 ++++++++++++++++++++++++++--- include/linux/usb.h | 8 ++++---- 3 files changed, 36 insertions(+), 12 deletions(-) ------ ChangeSet@1.296, 2002-02-12 22:48:06-08:00, vojtech@suse.cz usb hid driver: - patch to fix bug where urbs were freed too soon. drivers/usb/hid-core.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) ------ ChangeSet@1.297, 2002-02-12 22:55:33-08:00, mdiehl@mdiehl.de [PATCH] usb_set_interface: correct toggle reset this is a patch to prevent usb_set_interface() from erroneously resetting the toggles for all endpoints instead of only the affected ones from the requested interface/altsetting. I've also added some missing parentheses to related macros in usb.h as I prefered not to take special care for nasty side-effects ;-) Patch below was created against 2.4.18-pre9 (with some lines of offset it applies to 2.5.4-pre5 as well). Tested in multi-interface configuration to provide evidence it: * correctly identifies the affected endpoints and resets the toggles * doesn't touch endpoints from other interfaces * provides correct handling of shared EP0 * solves an issue I had with 2.4.18-pre9 where setting one interface occasionally caused transfers on other interface to hang due to lost toggle synchronisation Despite being a pure bugfix, well localized and (IMHO) pretty obviously correct wrt. USB-spec, I'd like to suggest including this in early 2.4.19-pre. Just in case some existing driver would somehow workaround the currently wrong behavior and might break with this fix. And it's not very urgent right now, as we are probably close to 2.4.18-rc1. Regards, Martin drivers/usb/usb.c | 29 ++++++++++++++++++++++++++--- include/linux/usb.h | 8 ++++---- 2 files changed, 30 insertions(+), 7 deletions(-)