Subject: port-mac68k/6208: No delay before power-off on ADB soft-power systems
To: None <gnats-bugs@gnats.netbsd.org>
From: None <stixpjr@ozemail.com.au>
List: netbsd-bugs
Date: 09/29/1998 00:58:00
>Number:         6208
>Category:       port-mac68k
>Synopsis:       No delay before power-off on ADB soft-power systems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 28 08:05:00 1998
>Last-Modified:
>Originator:     Paul Ripke
>Organization:
>Release:        29/09/1998
>Environment:
NetBSD on Macintosh with ADB based soft power
System: NetBSD stix1.stix.com.au 1.3G NetBSD 1.3G (STIXNCR) #11: Sat Aug 22 13:34:29 EST 1998 weripp@stix1.stix.com.au:/usr/src/sys/arch/mac68k/compile/STIXNCR mac68k


>Description:

Macintoshes whose soft-power is controlled via the direct ADB interface to
not have any delay before power is removed from the system. A small delay is
warrented, to allow the flushing of any hardware disk caches.

>How-To-Repeat:

Corruption could occur during any system shutdown, with certain disks.

>Fix:

The following context diff can be applied to the current version of
/usr/src/sys/arch/dev/adb_direct.c. The delay is the same as that used in
machdep.c.

*** adb_direct.c.old	Sat Aug 22 13:30:36 1998
--- adb_direct.c	Sat Aug 22 13:30:40 1998
***************
*** 2669,2674 ****
--- 2669,2675 ----
  
  	switch (adbHardware) {
  	case ADB_HW_IISI:
+ 		DELAY(1000000);
  		output[0] = 0x02;	/* 2 byte message */
  		output[1] = 0x01;	/* to pram/rtc/soft-power device */
  		output[2] = 0x0a;	/* set date/time */
***************
*** 2685,2690 ****
--- 2686,2692 ----
  		return -1;
  
  	case ADB_HW_CUDA:
+ 		DELAY(1000000);
  		output[0] = 0x02;	/* 2 byte message */
  		output[1] = 0x01;	/* to pram/rtc/soft-power device */
  		output[2] = 0x0a;	/* set date/time */
>Audit-Trail:
>Unformatted: