Subject: Re: kern/37508: After jmcneill-pm, disks are switched to standby
To: None <joerg@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Juan RP <juan@xtrarom.org>
List: netbsd-bugs
Date: 12/10/2007 16:35:02
The following reply was made to PR kern/37508; it has been noted by GNATS.
From: Juan RP <juan@xtrarom.org>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/37508: After jmcneill-pm, disks are switched to standby
before rebooting
Date: Mon, 10 Dec 2007 17:32:54 +0100
On Mon, 10 Dec 2007 16:23:59 +0100
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
> On Sun, Dec 09, 2007 at 09:35:00PM +0000, juan@xtrarom.org wrote:
> > >Number: 37508
> > >Category: kern
> > >Synopsis: After jmcneill-pm, disks are switched to standby before rebooting
> > >Confidential: no
> > >Severity: serious
> > >Priority: high
> > >Responsible: kern-bug-people
> > >State: open
> > >Class: sw-bug
> > >Submitter-Id: net
> > >Arrival-Date: Sun Dec 09 21:35:00 +0000 2007
> > >Originator: juan@xtrarom.org
> > >Release: NetBSD 4.99.41
> > >Organization:
> > Juan Romero Pardines - The NetBSD Project
> > http://plog.xtrarom.org - NetBSD/pkgsrc news in Spanish
> > >Environment:
> > System: NetBSD sasha 4.99.41 NetBSD 4.99.41 (Nocturno-nodbg) #70: Sun Dec 9 22:24:17 CET 2007 juan@sasha:/home/juan/build/i386/obj/sys/arch/i386/compile/Nocturno-nodbg i386
> > Architecture: i386
> > Machine: i386
> > >Description:
> >
> > After the jmcneill-pm branch has been merged in, issuing a reboot
> > call will switch the IDE disks to standby/sleep mode before the system
> > is rebooted... that's unacceptable for me because that means a longer
> > time in the BIOS that is waiting for disk initialization.
>
> That's also inacceptable because this means shortened life for the
> disks. They have a limited start/stop cycle count, and for some of them
> (the older ones, or some of the ones designed for 24x7 usage) it isn't that
> high.
So the driver now does:
+static bool
+wd_suspend(device_t dv)
+{
+ struct wd_softc *sc = device_private(dv);
+
+ wd_flushcache(sc, AT_WAIT | AT_POLL);
+ wd_standby(sc, AT_WAIT | AT_POLL);
+
+ return true;
}
This would be ok when you are suspending/resuming but not when rebooting or
powering down the system!
--
Juan Romero Pardines - The NetBSD Project
http://plog.xtrarom.org - NetBSD/pkgsrc news in Spanish