Date: Mon, 01 Apr 96 10:00:44 PST From: "Brett Glass" <Brett_Glass@ccgate.infoworld.com> To: freebsd-hardware@freebsd.org, hackers@freebsd.org, bugs@freebsd.org Subject: Changes to FreeBSD kernel to keep "green" drives on Message-ID: <9603018283.AA828378293@ccgate.infoworld.com>
next in thread | raw e-mail | index | archive | help
Here are the diffs to FreeBSD 2.1.0-RELEASE that turn off the inactivity
timer. Turning on these flags will always be a good idea for desktop
systems with "green" hard drives, but the kernel still needs fixing to
handle systems in which an inactivity timeout is desirable (e.g. laptops).
--Brett
Changes to wd.c:
105a106,111
> #define WDOPT_NO_IDLE_0 0x0100 /* Flags added by Brett Glass to shut off */
> #define WDOPT_NO_IDLE_1 0x0200 /* inactivity timeout on some IDE drives, */
> /* such as ST5660A. On each interface, */
> /* 0x0100 and 0x0200 are for master and */
> /* slave, respectively. */
>
229a236,237
> #define DKFL_NO_IDLE 0x00800 /* disk has had inactivity timer
> turned off -BG */
443a452,453
> if (du->dk_flags & DKFL_NO_IDLE)
> printf(", inactivity timer disabled");
1610a1621,1633
> }
>
> /* If this drive should have its inactivity timer turned off, issue
> the command to do it. If the command succeeds, then set a flag
> in the disk's struct so we can report that it worked. -BG */
>
> du->dk_flags &= ~DKFL_NO_IDLE; /* Assume command will fail */
>
> /* Shift WDOPT_NO_IDLE_0 left if unit 1 to get WDOPT_NO_IDLE_1*/
> if (flags & (WDOPT_NO_IDLE_0 << (du->dk_unit))) {
> if (wdcommand(du, 0, 0, 0, 0, WDCC_IDLEMODE) == 0) {
> du->dk_flags |= DKFL_NO_IDLE;
> }
Changes to wdreg.h:
99a100,102
> /* Following constant added by Brett Glass for the command that
> disables/enables "green" mode on drives such as the Seagate ST5660A */
> #define WDCC_IDLEMODE 0xFB /* configure active/idle mode -BG*/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9603018283.AA828378293>
