Add a check in the interrupt service routine to return quickly in
case there is nothing to do. This happens normally when the card shares the interrupt line with other devices. This code saves a couple of microseconds per interrupt even on a fast CPU. You normally would not care, except under heavy tinygram traffic where you can have some 50-100.000 interrupts per second... On passing, correct a spelling error.
This commit is contained in:
parent
c1b843c774
commit
d88a358c86
@ -2716,7 +2716,10 @@ static void dc_intr(arg)
|
||||
DC_LOCK(sc);
|
||||
ifp = &sc->arpcom.ac_if;
|
||||
|
||||
/* Supress unwanted interrupts */
|
||||
if ( (CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0)
|
||||
return ;
|
||||
|
||||
/* Suppress unwanted interrupts */
|
||||
if (!(ifp->if_flags & IFF_UP)) {
|
||||
if (CSR_READ_4(sc, DC_ISR) & DC_INTRS)
|
||||
dc_stop(sc);
|
||||
|
@ -2716,7 +2716,10 @@ static void dc_intr(arg)
|
||||
DC_LOCK(sc);
|
||||
ifp = &sc->arpcom.ac_if;
|
||||
|
||||
/* Supress unwanted interrupts */
|
||||
if ( (CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0)
|
||||
return ;
|
||||
|
||||
/* Suppress unwanted interrupts */
|
||||
if (!(ifp->if_flags & IFF_UP)) {
|
||||
if (CSR_READ_4(sc, DC_ISR) & DC_INTRS)
|
||||
dc_stop(sc);
|
||||
|
Loading…
Reference in New Issue
Block a user