diff options
| author | Roger Quadros <[email protected]> | 2010-09-08 13:48:44 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2010-10-22 10:21:37 -0700 |
| commit | 5c836e4d583701a5eecb288b5f131da39115f5ec (patch) | |
| tree | 322bb97d9988b86bb29748a210798fc166f14f35 /scripts/objdiff | |
| parent | 3df7169e73fc1d71a39cffeacc969f6840cdf52b (diff) | |
usb gadget: composite: prevent OOPS for non-standard control request
The composite gadget will OOPS if the host sends a control request
targetted to an interface of an un-configured composite device. This patch
prevents this.
The OOPS was observed during WHQL USB CV tests. With this patch, the device
STALLs as per requirement.
Failing test case: From host do the following. I used libusb-1.0
1) Set configuration to zero.
libusb_control_transfer(device_handle,
0, /* standard OUT */
0x9, /* setConfiguration */
0, 0, NULL, 0, 0);
2) Query current configuratioan.
libusb_control_transfer(device_handle,
0x80, /* standard IN*/
0x8, /* getConfiguration */
0, 0, data, 1, 0);
3) Send the non-standard ctrl transfer targetted to interface
libusb_control_transfer(device_handle,
0x81, /* standard IN to interface*/
0x6, /* getDescriptor */
0x2300, 0, data, 0x12, 0);
Signed-off-by: Roger Quadros <[email protected]>
Cc: stable <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Michal Nazarewicz <[email protected]>
Cc: Robert Lukassen <[email protected]>
Cc: Kyungmin Park <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions