summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-07-23 12:18:41 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-07-23 12:18:41 +0000
commitdb4e46ccc6cb252c509e173c5a329779cdc35e58 (patch)
tree50281ef56c61f639277dc791fc5ecad2e83e4c27 /sys/arch
parent09d6f954b1323e32b716a1c7ff880f4bd85bac88 (diff)
Clear correctable errors after handling them. From Bjorn Andersson.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/dev/psycho.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index 40c2c8baf38..8ec9081fb50 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psycho.c,v 1.61 2008/07/20 10:37:43 kettenis Exp $ */
+/* $OpenBSD: psycho.c,v 1.62 2008/07/23 12:18:40 kettenis Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
@@ -765,15 +765,23 @@ int
psycho_ce(void *arg)
{
struct psycho_softc *sc = arg;
+ u_int64_t afar, afsr;
/*
* It's correctable. Dump the regs and continue.
*/
+ afar = psycho_psychoreg_read(sc, psy_ce_afar);
+ afsr = psycho_psychoreg_read(sc, psy_ce_afsr);
+
printf("%s: correctable DMA error AFAR %llx AFSR %llx\n",
- sc->sc_dev.dv_xname,
- (long long)psycho_psychoreg_read(sc, psy_ce_afar),
- (long long)psycho_psychoreg_read(sc, psy_ce_afsr));
+ sc->sc_dev.dv_xname, afar, afsr);
+
+ /* Clear error. */
+ psycho_psychoreg_write(sc, psy_ce_afsr,
+ afsr & (PSY_CEAFSR_PDRD | PSY_CEAFSR_PDWR |
+ PSY_CEAFSR_SDRD | PSY_CEAFSR_SDWR));
+
return (1);
}