Module Name:    src
Committed By:   nisimura
Date:           Tue Apr 24 10:09:06 UTC 2012

Modified Files:
        src/sys/arch/sandpoint/sandpoint: satmgr.c

Log Message:
Quick fixes to make KURO-BOX/T4 "miconv2" power management work.
The patch was supplied by mef@.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sandpoint/sandpoint/satmgr.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/sandpoint/sandpoint/satmgr.c
diff -u src/sys/arch/sandpoint/sandpoint/satmgr.c:1.19 src/sys/arch/sandpoint/sandpoint/satmgr.c:1.20
--- src/sys/arch/sandpoint/sandpoint/satmgr.c:1.19	Mon Apr 16 14:30:42 2012
+++ src/sys/arch/sandpoint/sandpoint/satmgr.c	Tue Apr 24 10:09:06 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.19 2012/04/16 14:30:42 nisimura Exp $ */
+/* $NetBSD: satmgr.c,v 1.20 2012/04/24 10:09:06 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -997,7 +997,9 @@ msattalk(struct satmgr_softc *sc, const 
 	CSR_WRITE(sc, IER, 0);
 	send_sat_len(sc, cmd, len);
 	send_sat_len(sc, &pa, 1);
+	 DELAY(2000); /* XXX */
 	recv_sat_len(sc, rep, n);
+	 DELAY(2000); /* XXX */
 	CSR_WRITE(sc, IER, 0x7f);
 }
 
@@ -1042,10 +1044,10 @@ mbtnintr(void *arg)
 {
 	/* notified after 3 seconds guard time */
 	struct satmgr_softc *sc = arg;
-	char report[2];
+	char report[4];
 
-	msattalk(sc, "\x80\x36", report, 2);
-	if ((report[0] & 01) == 0) /* power button depressed */
+	msattalk(sc, "\x80\x36", report, 4);
+	if ((report[2] & 01) == 0) /* power button depressed */
 		sysmon_task_queue_sched(0, sched_sysmon_pbutton, sc);
 	return 1;
 }

Reply via email to