summaryrefslogtreecommitdiffstats
path: root/sys/dev/vr
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-10-27 19:02:23 +0000
committerbms <bms@FreeBSD.org>2004-10-27 19:02:23 +0000
commit586226b93cd881afbec0ac1b98d05fd78278da51 (patch)
tree9471451e20770d92b3a4ea8ee08a650bb44977f9 /sys/dev/vr
parentce02afb50053c051ed2f43b7135a4d361d01c2d5 (diff)
downloadFreeBSD-src-586226b93cd881afbec0ac1b98d05fd78278da51.zip
FreeBSD-src-586226b93cd881afbec0ac1b98d05fd78278da51.tar.gz
Forcibly disable interrupts, if we find ourselves servicing one when
the device is suspended or shutting down. This will need to be rethought slightly if we implement suspend/resume support within vr(4). This appears to fix the vr_shutdown() panic on SMP machines. My theory here is there's a race somewhere during vr_detach() with vr_intr() in the SMP case which was sometimes being triggered, although quite why this was happening is unclear (vr_stop() also explicitly disables interrupts by writing to the IMR register). MFC-to-RELENG_5* candidate. PR: kern/62889 Tested by: seb at struchtrup dot com MFC after: 10 days
Diffstat (limited to 'sys/dev/vr')
-rw-r--r--sys/dev/vr/if_vr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index d509b13..6febeaf 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -1233,8 +1233,15 @@ vr_intr(void *arg)
VR_LOCK(sc);
- if (sc->suspended)
+ if (sc->suspended) {
+ /*
+ * Forcibly disable interrupts.
+ * XXX: Mobile VIA based platforms may need
+ * interrupt re-enable on resume.
+ */
+ CSR_WRITE_2(sc, VR_IMR, 0x0000);
goto done_locked;
+ }
#ifdef DEVICE_POLLING
if (ifp->if_flags & IFF_POLLING)
OpenPOWER on IntegriCloud