usb-ehci: remove hack

To answer the question in the comment removed by this patch:  I think
this was needed because several places in the ehci emulation did not
check the T bit of link entries correctly and thus might have followed
invalid references.  See commit 2a5ff735dc

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2012-04-17 12:33:58 +02:00
parent ec4a804792
commit e59a8cf1eb

View File

@ -133,7 +133,6 @@
#define NB_MAXINTRATE 8 // Max rate at which controller issues ints #define NB_MAXINTRATE 8 // Max rate at which controller issues ints
#define NB_PORTS 6 // Number of downstream ports #define NB_PORTS 6 // Number of downstream ports
#define BUFF_SIZE 5*4096 // Max bytes to transfer per transaction #define BUFF_SIZE 5*4096 // Max bytes to transfer per transaction
#define MAX_ITERATIONS 20 // Max number of QH before we break the loop
#define MAX_QH 100 // Max allowable queue heads in a chain #define MAX_QH 100 // Max allowable queue heads in a chain
/* Internal periodic / asynchronous schedule state machine states /* Internal periodic / asynchronous schedule state machine states
@ -1931,24 +1930,8 @@ static void ehci_advance_state(EHCIState *ehci,
{ {
EHCIQueue *q = NULL; EHCIQueue *q = NULL;
int again; int again;
int iter = 0;
do { do {
if (ehci_get_state(ehci, async) == EST_FETCHQH) {
iter++;
/* if we are roaming a lot of QH without executing a qTD
* something is wrong with the linked list. TO-DO: why is
* this hack needed?
*/
assert(iter < MAX_ITERATIONS);
#if 0
if (iter > MAX_ITERATIONS) {
DPRINTF("\n*** advance_state: bailing on MAX ITERATIONS***\n");
ehci_set_state(ehci, async, EST_ACTIVE);
break;
}
#endif
}
switch(ehci_get_state(ehci, async)) { switch(ehci_get_state(ehci, async)) {
case EST_WAITLISTHEAD: case EST_WAITLISTHEAD:
again = ehci_state_waitlisthead(ehci, async); again = ehci_state_waitlisthead(ehci, async);
@ -1984,7 +1967,6 @@ static void ehci_advance_state(EHCIState *ehci,
break; break;
case EST_EXECUTE: case EST_EXECUTE:
iter = 0;
again = ehci_state_execute(q, async); again = ehci_state_execute(q, async);
break; break;