Rev 4302 | Rev 4418 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4302 | Rev 4305 | ||
---|---|---|---|
Line 220... | Line 220... | ||
220 | .interface dd ? ; pointer to usb_interface_descr |
220 | .interface dd ? ; pointer to usb_interface_descr |
221 | end virtual |
221 | end virtual |
222 | ; 1. Check that the maximal nesting is not exceeded: |
222 | ; 1. Check that the maximal nesting is not exceeded: |
223 | ; 5 non-root hubs is the maximum according to the spec. |
223 | ; 5 non-root hubs is the maximum according to the spec. |
224 | mov ebx, [.pipe] |
224 | mov ebx, [.pipe] |
225 | movi ecx, 5 |
225 | push 5 |
226 | mov eax, ebx |
226 | mov eax, ebx |
227 | .count_parents: |
227 | .count_parents: |
228 | mov eax, [eax+usb_pipe.DeviceData] |
228 | mov eax, [eax+usb_pipe.DeviceData] |
229 | mov eax, [eax+usb_device_data.Hub] |
229 | mov eax, [eax+usb_device_data.Hub] |
230 | test eax, eax |
230 | test eax, eax |
231 | jz .depth_ok |
231 | jz .depth_ok |
232 | mov eax, [eax+usb_hub.ConfigPipe] |
232 | mov eax, [eax+usb_hub.ConfigPipe] |
233 | dec ecx |
233 | dec dword [esp] |
234 | jnz .count_parents |
234 | jnz .count_parents |
- | 235 | pop eax |
|
235 | dbgstr 'Hub chain is too long' |
236 | dbgstr 'Hub chain is too long' |
236 | jmp .return0 |
237 | jmp .return0 |
237 | .depth_ok: |
238 | .depth_ok: |
- | 239 | pop eax |
|
238 | ; Hubs use one IN interrupt endpoint for polling the device |
240 | ; Hubs use one IN interrupt endpoint for polling the device |
239 | ; 2. Locate the descriptor of the interrupt endpoint. |
241 | ; 2. Locate the descriptor of the interrupt endpoint. |
240 | ; Loop over all descriptors owned by this interface. |
242 | ; Loop over all descriptors owned by this interface. |
241 | .lookep: |
243 | .lookep: |
242 | ; 2a. Skip the current descriptor. |
244 | ; 2a. Skip the current descriptor. |