From owner-freebsd-bugs Mon Apr 1 09:06:01 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA06978 for bugs-outgoing; Mon, 1 Apr 1996 09:06:01 -0800 (PST) Received: from lserver.infoworld.com (lserver.infoworld.com [192.216.48.4]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA06952 Mon, 1 Apr 1996 09:05:57 -0800 (PST) Received: from ccgate.infoworld.com by lserver.infoworld.com with smtp (Smail3.1.29.1 #12) id m0u3nP5-000wyEC; Mon, 1 Apr 96 09:28 PST Received: from cc:Mail by ccgate.infoworld.com id AA828378293; Mon, 01 Apr 96 10:00:44 PST Date: Mon, 01 Apr 96 10:00:44 PST From: "Brett Glass" Message-Id: <9603018283.AA828378293@ccgate.infoworld.com> To: freebsd-hardware@freebsd.org, hackers@freebsd.org, bugs@freebsd.org Subject: Changes to FreeBSD kernel to keep "green" drives on Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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*/