usbdcore-multiple_configs.patch
commite011e239adc0e784497e3fa5dce0bbce8a34c844
authorHarald Welte <laforge@openmoko.org>
Fri, 11 Apr 2008 13:27:09 +0000 (11 14:27 +0100)
committerwarmcat <andy@warmcat.com>
Fri, 11 Apr 2008 13:27:09 +0000 (11 14:27 +0100)
tree42f81f08998622e0b8c99a48286d9871184e35b7
parent017c3945f1fd75199fa7c269dd8fff7980d4bce8
usbdcore-multiple_configs.patch
This patch fixes bugs in usbdcore*.c related to the use of devices
with multiple configurations.

The original code made mistakes about the meaning of configuration value and
configuration index, and the resulting off-by-one errors resulted in:

* SET_CONFIGURATION always selected the first configuration, no matter what
  wValue is being passed.
* GET_DESCRIPTOR/CONFIGURATION always returned the descriptor for the first
  configuration (index 0).

Signed-off-by: Harald Welte <laforge@openmoko.org>
drivers/usb/usbdcore.c
drivers/usb/usbdcore_ep0.c