diff options
author | phk <phk@FreeBSD.org> | 2005-01-07 00:01:43 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-07 00:01:43 +0000 |
commit | edf2752b8237628a2cced5d286191dc18de332d1 (patch) | |
tree | 5f801135bb12fd33ad5cf3c5e3c039666936ec65 | |
parent | 2d73390de208369e5a94798d3ddbcec2866d365b (diff) | |
download | FreeBSD-src-edf2752b8237628a2cced5d286191dc18de332d1.zip FreeBSD-src-edf2752b8237628a2cced5d286191dc18de332d1.tar.gz |
If we get an interrupt and the interface is down, return before we
grab the lock. This should help a tiny bit on machines where unused
if_sis interfaces share IRQ.
-rw-r--r-- | sys/pci/if_sis.c | 13 | ||||
-rw-r--r-- | sys/pci/if_sisreg.h | 1 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index d88cd1d..cce619a 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1636,6 +1636,9 @@ sis_intr(void *arg) sc = arg; ifp = &sc->arpcom.ac_if; + if (sc->sis_stopped) /* Most likely shared interrupt */ + return; + SIS_LOCK(sc); #ifdef DEVICE_POLLING if (ifp->if_flags & IFF_POLLING) @@ -1647,12 +1650,6 @@ sis_intr(void *arg) } #endif /* DEVICE_POLLING */ - /* Supress unwanted interrupts */ - if (!(ifp->if_flags & IFF_UP)) { - sis_stop(sc); - goto done; - } - /* Disable interrupts. */ CSR_WRITE_4(sc, SIS_IER, 0); @@ -1689,10 +1686,8 @@ sis_intr(void *arg) if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) sis_startl(ifp); -done: - SIS_UNLOCK(sc); - return; + SIS_UNLOCK(sc); } /* diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h index 774a13e..72dda68 100644 --- a/sys/pci/if_sisreg.h +++ b/sys/pci/if_sisreg.h @@ -252,6 +252,7 @@ SIS_TXCFG_FILL(64)|SIS_TXCFG_DRAIN(1536)) #define SIS_RXCFG_DRAIN_THRESH 0x0000003E /* 8-byte units */ +#define SIS_TXCFG_MPII03D 0x00040000 /* "Must be 1" */ #define SIS_RXCFG_DMABURST 0x00700000 #define SIS_RXCFG_RX_JABBER 0x08000000 #define SIS_RXCFG_RX_TXPKTS 0x10000000 |