Commit d25a65e
USB: dummy-hcd: fix connection failures (wrong speed)
commit fe659bcc9b173bcfdd958ce2aec75e47651e74e1 upstream.
The dummy-hcd UDC driver is not careful about the way it handles
connection speeds. It ignores the module parameter that is supposed
to govern the maximum connection speed and it doesn't set the HCD
flags properly for the case where it ends up running at full speed.
The result is that in many cases, gadget enumeration over dummy-hcd
fails because the bMaxPacketSize byte in the device descriptor is set
incorrectly. For example, the default settings call for a high-speed
connection, but the maxpacket value for ep0 ends up being set for a
Super-Speed connection.
This patch fixes the problem by initializing the gadget's max_speed
and the HCD flags correctly.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent da35816 commit d25a65e
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1036 | 1041 | | |
1037 | 1042 | | |
1038 | 1043 | | |
| |||
2564 | 2569 | | |
2565 | 2570 | | |
2566 | 2571 | | |
2567 | | - | |
2568 | | - | |
2569 | 2572 | | |
2570 | 2573 | | |
2571 | 2574 | | |
| |||
2594 | 2597 | | |
2595 | 2598 | | |
2596 | 2599 | | |
2597 | | - | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
2598 | 2603 | | |
| 2604 | + | |
| 2605 | + | |
2599 | 2606 | | |
2600 | 2607 | | |
2601 | 2608 | | |
| |||
0 commit comments