File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,8 @@ func handleStandardSetup(setup usb.Setup) bool {
217
217
} else if setup .WValueL == 0 { // ENDPOINTHALT
218
218
if usbStallHandler [setup .WIndex & 0x7F ] != nil {
219
219
return usbStallHandler [setup .WIndex & 0x7F ](setup )
220
- } else {
221
- isEndpointHalt = false
222
220
}
221
+ isEndpointHalt = false
223
222
}
224
223
SendZlp ()
225
224
return true
@@ -230,9 +229,8 @@ func handleStandardSetup(setup usb.Setup) bool {
230
229
} else if setup .WValueL == 0 { // ENDPOINTHALT
231
230
if usbStallHandler [setup .WIndex & 0x7F ] != nil {
232
231
return usbStallHandler [setup .WIndex & 0x7F ](setup )
233
- } else {
234
- isEndpointHalt = true
235
232
}
233
+ isEndpointHalt = true
236
234
}
237
235
SendZlp ()
238
236
return true
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ func (m *msc) run(b []byte, isEpOut bool) {
204
204
m .state = mscStateNeedReset
205
205
m .stallEndpoint (usb .MSC_ENDPOINT_IN )
206
206
m .stallEndpoint (usb .MSC_ENDPOINT_OUT )
207
- m .stallEndpoint (0 )
207
+ m .stallEndpoint (usb . CONTROL_ENDPOINT )
208
208
return
209
209
}
210
210
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ func (m *msc) stallEndpoint(ep uint8) {
121
121
} else if ep == usb .MSC_ENDPOINT_OUT {
122
122
m .rxStalled = true
123
123
machine .SetStallEPOut (usb .MSC_ENDPOINT_OUT )
124
+ } else if ep == usb .CONTROL_ENDPOINT {
125
+ machine .SetStallEPIn (usb .CONTROL_ENDPOINT )
124
126
}
125
127
}
126
128
You can’t perform that action at this time.
0 commit comments