Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hp300/dev Handle LED_DISK per DMA xfer.



details:   https://anonhg.NetBSD.org/src/rev/91abc93c40fa
branches:  trunk
changeset: 761997:91abc93c40fa
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Feb 12 23:10:22 2011 +0000

description:
Handle LED_DISK per DMA xfer.

diffstat:

 sys/arch/hp300/dev/spc.c |  18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diffs (61 lines):

diff -r 05a0c9a701ee -r 91abc93c40fa sys/arch/hp300/dev/spc.c
--- a/sys/arch/hp300/dev/spc.c  Sat Feb 12 22:48:04 2011 +0000
+++ b/sys/arch/hp300/dev/spc.c  Sat Feb 12 23:10:22 2011 +0000
@@ -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
 }



Home | Main Index | Thread Index | Old Index