diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-12-03 09:44:31 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 11:55:27 -0800 |
commit | 06df572909080786e128eabdb2e39a12bce239de (patch) | |
tree | a00ea73a802b3a7d6f70f4cdc81b264a357913d3 /include/linux/usb.h | |
parent | 74f9fe21e0440066eb337b9f644238cb3050b91c (diff) | |
download | kernel_samsung_smdk4412-06df572909080786e128eabdb2e39a12bce239de.tar.gz kernel_samsung_smdk4412-06df572909080786e128eabdb2e39a12bce239de.tar.bz2 kernel_samsung_smdk4412-06df572909080786e128eabdb2e39a12bce239de.zip |
USB: xhci: Fix command completion after a drop endpoint.
The xHCI driver issues a Configure Endpoint command for two reasons:
- a new configuration or alternate interface setting is selected
- a quirky Fresco Logic prototype requires the command after a Reset
Endpoint command.
The xHCI driver only waits on the command in the first case.
When a configure endpoint command completes, the driver needs to know why
the command was generated. When the driver only supported selecting an
initial configuration, the check was simple. Unfortunately that check
doesn't work now that the driver supports alternate interfaces. If an
endpoint must be dropped (because it's not in the new alternate setting)
and no new endpoints are added, the math involving
xhci_last_valid_endpoint() will assign -1 to an unsigned integer and cause
an out-of-bounds array access.
Move the check for the quirky hardware sooner and avoid the bad array
access.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb.h')
0 files changed, 0 insertions, 0 deletions