* Only acknowledge the interrupt in the service thread, so that no new one will be triggered.
* Also, loop as long as new interrupts are coming in. * This fixes the high CPU usage and low throughput of the 3com driver; it now works just fine; dunno why it worked for me that well last time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23084 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a5d8db5d76
commit
f79121dacb
@ -41,7 +41,6 @@ __haiku_disable_interrupts(device_t dev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
atomic_or((int32 *)&sc->xl_intr_status, status);
|
atomic_or((int32 *)&sc->xl_intr_status, status);
|
||||||
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK | (status & XL_INTRS));
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2289,12 +2289,12 @@ xl_intr(void *arg)
|
|||||||
#ifndef __HAIKU__
|
#ifndef __HAIKU__
|
||||||
while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS &&
|
while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS &&
|
||||||
status != 0xFFFF) {
|
status != 0xFFFF) {
|
||||||
CSR_WRITE_2(sc, XL_COMMAND,
|
|
||||||
XL_CMD_INTR_ACK|(status & XL_INTRS));
|
|
||||||
#else
|
#else
|
||||||
status = atomic_and((int32 *)&sc->xl_intr_status, 0);
|
status = atomic_and((int32 *)&sc->xl_intr_status, 0);
|
||||||
if ((status & XL_INTRS) != 0 && status != 0xFFFF) {
|
do {
|
||||||
#endif
|
#endif
|
||||||
|
CSR_WRITE_2(sc, XL_COMMAND,
|
||||||
|
XL_CMD_INTR_ACK|(status & XL_INTRS));
|
||||||
|
|
||||||
if (status & XL_STAT_UP_COMPLETE) {
|
if (status & XL_STAT_UP_COMPLETE) {
|
||||||
int curpkts;
|
int curpkts;
|
||||||
@ -2329,7 +2329,12 @@ xl_intr(void *arg)
|
|||||||
xl_stats_update_locked(sc);
|
xl_stats_update_locked(sc);
|
||||||
sc->xl_stats_no_timeout = 0;
|
sc->xl_stats_no_timeout = 0;
|
||||||
}
|
}
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
status = CSR_READ_2(sc, XL_STATUS);
|
||||||
|
} while ((status & XL_INTRS) != 0 && status != 0xFFFF);
|
||||||
|
#else
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
|
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
|
||||||
if (sc->xl_type == XL_TYPE_905B)
|
if (sc->xl_type == XL_TYPE_905B)
|
||||||
|
Loading…
Reference in New Issue
Block a user