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 {
217217 } else if setup .WValueL == 0 { // ENDPOINTHALT
218218 if usbStallHandler [setup .WIndex & 0x7F ] != nil {
219219 return usbStallHandler [setup .WIndex & 0x7F ](setup )
220- } else {
221- isEndpointHalt = false
222220 }
221+ isEndpointHalt = false
223222 }
224223 SendZlp ()
225224 return true
@@ -230,9 +229,8 @@ func handleStandardSetup(setup usb.Setup) bool {
230229 } else if setup .WValueL == 0 { // ENDPOINTHALT
231230 if usbStallHandler [setup .WIndex & 0x7F ] != nil {
232231 return usbStallHandler [setup .WIndex & 0x7F ](setup )
233- } else {
234- isEndpointHalt = true
235232 }
233+ isEndpointHalt = true
236234 }
237235 SendZlp ()
238236 return true
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ func (m *msc) run(b []byte, isEpOut bool) {
204204 m .state = mscStateNeedReset
205205 m .stallEndpoint (usb .MSC_ENDPOINT_IN )
206206 m .stallEndpoint (usb .MSC_ENDPOINT_OUT )
207- m .stallEndpoint (0 )
207+ m .stallEndpoint (usb . CONTROL_ENDPOINT )
208208 return
209209 }
210210
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ func (m *msc) stallEndpoint(ep uint8) {
121121 } else if ep == usb .MSC_ENDPOINT_OUT {
122122 m .rxStalled = true
123123 machine .SetStallEPOut (usb .MSC_ENDPOINT_OUT )
124+ } else if ep == usb .CONTROL_ENDPOINT {
125+ machine .SetStallEPIn (usb .CONTROL_ENDPOINT )
124126 }
125127}
126128
You can’t perform that action at this time.
0 commit comments