summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-12-04 01:11:58 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-12-04 01:11:58 +0000
commitf2253c12ba50b796b6b6dd37cd687be4e29e9f5a (patch)
tree08a1e1e408d29d97b64d590b8b28a1bec229029f
parentb345fb4b930e133aa8cfd9da0fd2e915abf01bd1 (diff)
On the 82571 and newer chipset the ICR register is meaningful only
if the E1000_ICR_INT_ASSERTED bit is set. From FreeBSD
-rw-r--r--sys/dev/pci/if_em.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index e824d01e7a0..a82adec90f4 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.97 2005/11/28 17:53:14 wilfried Exp $ */
+/* $OpenBSD: if_em.c,v 1.98 2005/12/04 01:11:57 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -682,7 +682,10 @@ em_intr(void *arg)
for (;;) {
reg_icr = E1000_READ_REG(&sc->hw, ICR);
- if (reg_icr == 0)
+ if (sc->hw.mac_type >= em_82571 &&
+ (reg_icr & E1000_ICR_INT_ASSERTED) == 0)
+ break;
+ else if (reg_icr == 0)
break;
claimed = 1;