diff options
Diffstat (limited to 'firmware/target/arm/as3525/usb-drv-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/usb-drv-as3525.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c index 2f6fa20af8..d41acc7f81 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525.c +++ b/firmware/target/arm/as3525/usb-drv-as3525.c | |||
@@ -150,15 +150,6 @@ static void dma_desc_init(int ep, int dir) | |||
150 | static void reset_endpoints(int init) | 150 | static void reset_endpoints(int init) |
151 | { | 151 | { |
152 | int i; | 152 | int i; |
153 | /* | ||
154 | * MPS sizes depending on speed: | ||
155 | * LS: 8 (control), no bulk available | ||
156 | * FS: 64 (control), 64 (bulk) | ||
157 | * HS: 64 (control), 512 (bulk) | ||
158 | * | ||
159 | * We don't need to handle LS since there is no low-speed only host AFAIK. | ||
160 | */ | ||
161 | int mps = i == 0 ? 64 : (usb_drv_port_speed() ? 512 : 64); | ||
162 | 153 | ||
163 | /* | 154 | /* |
164 | * OUT EP 2 is an alias for OUT EP 0 on this HW! | 155 | * OUT EP 2 is an alias for OUT EP 0 on this HW! |
@@ -171,6 +162,17 @@ static void reset_endpoints(int init) | |||
171 | endpoints[2][1].state |= EP_STATE_ALLOCATED; | 162 | endpoints[2][1].state |= EP_STATE_ALLOCATED; |
172 | 163 | ||
173 | for(i = 0; i < USB_NUM_EPS; i++) { | 164 | for(i = 0; i < USB_NUM_EPS; i++) { |
165 | /* | ||
166 | * MPS sizes depending on speed: | ||
167 | * LS: 8 (control), no bulk available | ||
168 | * FS: 64 (control), 64 (bulk) | ||
169 | * HS: 64 (control), 512 (bulk) | ||
170 | * | ||
171 | * We don't need to handle LS since there is no low-speed only | ||
172 | * host AFAIK. | ||
173 | */ | ||
174 | int mps = i == 0 ? 64 : (usb_drv_port_speed() ? 512 : 64); | ||
175 | |||
174 | if (init) { | 176 | if (init) { |
175 | endpoints[i][0].state = 0; | 177 | endpoints[i][0].state = 0; |
176 | wakeup_init(&endpoints[i][0].complete); | 178 | wakeup_init(&endpoints[i][0].complete); |