diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-01-31 23:43:04 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-01-31 23:43:04 +0100 |
commit | 5a93a2a9837e98ebbce8de81f8d933d213134e8d (patch) | |
tree | 512e9b3028122329214a71b953b93ef801bad6a5 | |
parent | a2b83a5aea0a5c1c4fbd4a12bdb14def9354ea2e (diff) |
usbehci: remove panic() calls from interrupts if stuff isnt ready (spurious interrupts?)
-rw-r--r-- | sys/src/9/port/usbehci.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/src/9/port/usbehci.c b/sys/src/9/port/usbehci.c index f27ff7567..6d1b6d2bd 100644 --- a/sys/src/9/port/usbehci.c +++ b/sys/src/9/port/usbehci.c @@ -1338,8 +1338,7 @@ isohsinterrupt(Ctlr *ctlr, Isoio *iso) Itd *tdi; tdi = iso->tdi; - assert(tdi != nil); - if(itdactive(tdi)) /* not all tds are done */ + if(tdi == nil || itdactive(tdi)) /* not all tds are done */ return 0; ctlr->nisointr++; ddiprint("isohsintr: iso %#p: tdi %#p tdu %#p\n", iso, tdi, iso->tdu); @@ -1409,8 +1408,7 @@ isofsinterrupt(Ctlr *ctlr, Isoio *iso) Sitd *stdi; stdi = iso->stdi; - assert(stdi != nil); - if((stdi->csw & Stdactive) != 0) /* nothing new done */ + if(stdi == nil || (stdi->csw & Stdactive) != 0) /* nothing new done */ return 0; ctlr->nisointr++; ddiprint("isofsintr: iso %#p: tdi %#p tdu %#p\n", iso, stdi, iso->stdu); @@ -1479,7 +1477,7 @@ qhinterrupt(Ctlr *ctlr, Qh *qh) panic("qhinterrupt: qh state"); td = qh->tds; if(td == nil) - panic("qhinterrupt: no tds"); + return 0; if((td->csw & Tdactive) == 0) ddqprint("qhinterrupt port %#p qh %#p\n", ctlr->capio, qh); for(; td != nil; td = td->next){ @@ -1583,8 +1581,8 @@ ehciintr(Hci *hp) qh = ctlr->qhs; i = 0; do{ - if (qh == nil) - panic("ehciintr: nil qh"); + if(qh == nil) + break; if(qh->state == Qrun) some += qhinterrupt(ctlr, qh); qh = qh->next; @@ -1592,8 +1590,6 @@ ehciintr(Hci *hp) if(i > 100) print("echi: interrupt: qh loop?\n"); } -// if (some == 0) -// panic("ehciintr: no work"); iunlock(ctlr); return some; } |