Revision d2bd525f hw/usb-ehci.c
b/hw/usb-ehci.c | ||
---|---|---|
1114 | 1114 |
|
1115 | 1115 |
switch(q->usb_status) { |
1116 | 1116 |
case USB_RET_NODEV: |
1117 |
fprintf(stderr, "USB no device\n"); |
|
1117 |
q->qh.token |= (QTD_TOKEN_HALT | QTD_TOKEN_XACTERR); |
|
1118 |
ehci_record_interrupt(q->ehci, USBSTS_ERRINT); |
|
1118 | 1119 |
break; |
1119 | 1120 |
case USB_RET_STALL: |
1120 |
fprintf(stderr, "USB stall\n"); |
|
1121 | 1121 |
q->qh.token |= QTD_TOKEN_HALT; |
1122 | 1122 |
ehci_record_interrupt(q->ehci, USBSTS_ERRINT); |
1123 | 1123 |
break; |
... | ... | |
1133 | 1133 |
} |
1134 | 1134 |
break; |
1135 | 1135 |
case USB_RET_BABBLE: |
1136 |
fprintf(stderr, "USB babble TODO\n"); |
|
1137 |
q->qh.token |= QTD_TOKEN_BABBLE; |
|
1136 |
q->qh.token |= (QTD_TOKEN_HALT | QTD_TOKEN_BABBLE); |
|
1138 | 1137 |
ehci_record_interrupt(q->ehci, USBSTS_ERRINT); |
1139 | 1138 |
break; |
1140 | 1139 |
default: |
... | ... | |
1792 | 1791 |
put_dwords(NLPTR_GET(q->qtdaddr),(uint32_t *) &q->qh.next_qtd, |
1793 | 1792 |
sizeof(EHCIqtd) >> 2); |
1794 | 1793 |
|
1795 |
/* TODO confirm next state. For now, keep going if async |
|
1796 |
* but stop after one qtd if periodic |
|
1794 |
/* |
|
1795 |
* EHCI specs say go horizontal here. |
|
1796 |
* |
|
1797 |
* We can also advance the queue here for performance reasons. We |
|
1798 |
* need to take care to only take that shortcut in case we've |
|
1799 |
* processed the qtd just written back without errors, i.e. halt |
|
1800 |
* bit is clear. |
|
1797 | 1801 |
*/ |
1798 |
//if (async) { |
|
1802 |
if (q->qh.token & QTD_TOKEN_HALT) { |
|
1803 |
ehci_set_state(q->ehci, async, EST_HORIZONTALQH); |
|
1804 |
again = 1; |
|
1805 |
} else { |
|
1799 | 1806 |
ehci_set_state(q->ehci, async, EST_ADVANCEQUEUE); |
1800 | 1807 |
again = 1; |
1801 |
//} else { |
|
1802 |
// ehci_set_state(ehci, async, EST_ACTIVE); |
|
1803 |
//} |
|
1808 |
} |
|
1804 | 1809 |
return again; |
1805 | 1810 |
} |
1806 | 1811 |
|
Also available in: Unified diff