Module Name:    src
Committed By:   tsutsui
Date:           Sat Feb 12 23:10:22 UTC 2011

Modified Files:
        src/sys/arch/hp300/dev: spc.c

Log Message:
Handle LED_DISK per DMA xfer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp300/dev/spc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/spc.c
diff -u src/sys/arch/hp300/dev/spc.c:1.7 src/sys/arch/hp300/dev/spc.c:1.8
--- src/sys/arch/hp300/dev/spc.c:1.7	Wed May 14 13:29:28 2008
+++ src/sys/arch/hp300/dev/spc.c	Sat Feb 12 23:10:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: spc.c,v 1.7 2008/05/14 13:29:28 tsutsui Exp $ */
+/* $NetBSD: spc.c,v 1.8 2011/02/12 23:10:22 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2003 Izumi Tsutsui.  All rights reserved.
@@ -25,10 +25,11 @@
  */
 
 #include "opt_ddb.h"
+#include "opt_useleds.h"
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: spc.c,v 1.7 2008/05/14 13:29:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spc.c,v 1.8 2011/02/12 23:10:22 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -55,6 +56,10 @@
 #include <hp300/dev/dmareg.h>
 #include <hp300/dev/dmavar.h>
 
+#ifdef USELEDS
+#include <hp300/hp300/leds.h>
+#endif
+
 static int	spc_dio_match(device_t, cfdata_t, void *);
 static void	spc_dio_attach(device_t, device_t, void *);
 static void	spc_dio_dmastart(struct spc_softc *, void *, size_t, int);
@@ -227,6 +232,9 @@
 	bus_space_write_1(iot, iohspc, SCMD, cmd);
 
 	sc->sc_flags |= SPC_DOINGDMA;
+#ifdef USELEDS
+	ledcontrol(LED_DISK, 0, 0);
+#endif
 }
 
 static void
@@ -270,6 +278,9 @@
 	sc->sc_dleft -= trans;
 
 	sc->sc_flags &= ~SPC_DOINGDMA;
+#ifdef USELEDS
+	ledcontrol(0, LED_DISK, 0);
+#endif
 }
 
 static void
@@ -286,4 +297,7 @@
 
 	dsc->sc_dflags &= ~SCSI_HAVEDMA;
 	sc->sc_flags &= ~SPC_DOINGDMA;
+#ifdef USELEDS
+	ledcontrol(0, LED_DISK, 0);
+#endif
 }

Reply via email to