Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/sandpoint DSM-G600: Turn off all LEDs whe...



details:   https://anonhg.NetBSD.org/src/rev/2bf6301403fb
branches:  trunk
changeset: 764355:2bf6301403fb
user:      phx <phx%NetBSD.org@localhost>
date:      Sun Apr 17 14:05:59 2011 +0000

description:
DSM-G600: Turn off all LEDs when shutting down, to indicate the device
can be switched off.

diffstat:

 sys/arch/sandpoint/sandpoint/satmgr.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r 79a03518ad8a -r 2bf6301403fb sys/arch/sandpoint/sandpoint/satmgr.c
--- a/sys/arch/sandpoint/sandpoint/satmgr.c     Sun Apr 17 13:16:59 2011 +0000
+++ b/sys/arch/sandpoint/sandpoint/satmgr.c     Sun Apr 17 14:05:59 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.9 2011/04/10 16:30:32 phx Exp $ */
+/* $NetBSD: satmgr.c,v 1.10 2011/04/17 14:05:59 phx Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -120,6 +120,7 @@
 static void kpwroff(struct satmgr_softc *);
 static void spwroff(struct satmgr_softc *);
 static void qpwroff(struct satmgr_softc *);
+static void dpwroff(struct satmgr_softc *);
 static void kbutton(struct satmgr_softc *, int);
 static void sbutton(struct satmgr_softc *, int);
 static void qbutton(struct satmgr_softc *, int);
@@ -136,7 +137,7 @@
 };
 
 static struct satops satmodel[] = {
-    { "dlink",    NULL, NULL, NULL, dbutton },
+    { "dlink",    NULL, NULL, dpwroff, dbutton },
     { "kurobox",  NULL, kreboot, kpwroff, kbutton },
     { "qnap",     qinit, qreboot, qpwroff, qbutton },
     { "synology", sinit, sreboot, spwroff, sbutton }
@@ -729,6 +730,17 @@
 }
 
 static void
+dpwroff(struct satmgr_softc *sc)
+{
+
+       /*
+        * The DSM-G600 has no hardware-shutdown, but we turn all LEDs off,
+        * to indicated that we powered down.
+        */
+       send_sat(sc, "TSC\nTSC\n");
+}
+
+static void
 dbutton(struct satmgr_softc *sc, int ch)
 {
 



Home | Main Index | Thread Index | Old Index