]> git.sur5r.net Git - u-boot/commit
fix USB devices with multiple configurations
authorHarald Welte <laforge@gnumonks.org>
Sun, 6 Jul 2008 16:58:05 +0000 (00:58 +0800)
committerJohn Rigby <jrigby@freescale.com>
Thu, 10 Jul 2008 16:53:04 +0000 (10:53 -0600)
commitcc83b27217f7380041fea386ddb6d6d9b261617d
tree65f62ae3860b2d2b449447a5c22e2e6ad9872fcf
parent06c53beae1a726e707971c555613f09b270a2461
fix USB devices with multiple configurations

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>
Acked-by: Markus Klotzbuecher <mk@denx.de>
drivers/usb/usbdcore.c
drivers/usb/usbdcore_ep0.c