aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-12-22 09:09:39 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-12-22 09:09:39 +0000
commit0014abfcc412e5ed4440bb2577345b8c5a67e9dd (patch)
tree4c3f953a4432327450a667df1091611e1f527a17
parentf6789fba469001d29a7e5e454f9788135565cb7e (diff)
downloadsrc-0014abfcc412e5ed4440bb2577345b8c5a67e9dd.tar.gz
src-0014abfcc412e5ed4440bb2577345b8c5a67e9dd.zip
Add a quirk to fix resume on some laptops.
Reported by: joe Reported by: Huang wen hui <huang gddsn.org.cn> Reported by: Jacques Garrigue <garrigue math.nagoya-u.ac.jp> PR: kern/89825
Notes
Notes: svn path=/head/; revision=153635
-rw-r--r--sys/dev/em/if_em.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 8f8f465571ec..081a24332f6e 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -1048,6 +1048,15 @@ em_intr(void *arg)
else if (reg_icr == 0)
break;
+ /*
+ * XXX: some laptops trigger several spurious interrupts
+ * on em(4) when in the resume cycle. The ICR register
+ * reports all-ones value in this case. Processing such
+ * interrupts would lead to a freeze. I don't know why.
+ */
+ if (reg_icr == 0xffffffff)
+ break;
+
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
em_process_receive_interrupts(adapter, -1);
em_clean_transmit_interrupts(adapter);