Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2001 06:05:03 -0500
From:      Robert Sexton <robert@kudra.com>
To:        freebsd-mobile@FreeBSD.ORG
Cc:        hanspeter_roth@hotmail.com
Subject:   Re: IDE standby timeout (hdparm)
Message-ID:  <20011219060503.B72034@kudra.com>
In-Reply-To: <20011219104954.A5747@bs82.bsag.ch>; from hanspeter_roth@hotmail.com on Wed, Dec 19, 2001 at 10:49:54AM %2B0100
References:  <20011219104954.A5747@bs82.bsag.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

--Q68bSM7Ycu6FN28Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Dec 19, 2001 at 10:49:54AM +0100, Hanspeter Roth wrote:
> 
> Hello,
> 
> is it possible to finetune the standby timeout (spindown) of
> IDE-disks?
> Is there something like the Linux' `hdparm'?

'What patch?'

Sorry for the extra list traffic.  Its attached here.


-- 
Robert Sexton - robert@kudra.com, Cincinnati OH, USA
If car manufactures were the nra their slogan would be
"Cars don't kill comunities, people kill communities." - Unknown

--Q68bSM7Ycu6FN28Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ata.patch"

*** dev/ata/ata-disk.c.orig	Wed Oct 24 14:24:09 2001
--- dev/ata/ata-disk.c	Sat Nov 10 02:16:55 2001
***************
*** 86,94 ****
--- 86,96 ----
  static int ata_dma = 1;
  static int ata_wc = 0;
  static int ata_tags = 0; 
+ static int ata_suspend = 0;
  TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
  TUNABLE_INT("hw.ata.wc", &ata_wc);
  TUNABLE_INT("hw.ata.tags", &ata_tags);
+ TUNABLE_INT("hw.ata.suspend", &ata_suspend);
  
  /* sysctl vars */
  SYSCTL_DECL(_hw_ata);
***************
*** 98,103 ****
--- 100,107 ----
  	   "ATA disk write caching");
  SYSCTL_INT(_hw_ata, OID_AUTO, tags, CTLFLAG_RD, &ata_tags, 0,
  	   "ATA disk tagged queuing support");
+ SYSCTL_INT(_hw_ata, OID_AUTO, suspend, CTLFLAG_RD, &ata_suspend, 0,
+ 	   "ATA disk suspend timer");
  
  /* defines */
  #define	AD_MAX_RETRIES	3
***************
*** 188,193 ****
--- 192,204 ----
  			0, 0, ATA_C_F_DIS_SRVIRQ, ATA_WAIT_INTR))
  	    ata_printf(scp, device, "disabling service interrupt failed\n");
      }
+ 
+     if ( ata_suspend > 0 ) {
+         /* attempt suspend mode. The drive uses increments of ten seconds */  
+         if (ata_command(adp->controller, adp->unit, 0xe2,
+                     0, ata_suspend/10, 0, ATA_WAIT_INTR))
+         printf("ad%d: suspend mode failed\n", adp->lun);
+ 	}
  
      devstat_add_entry(&adp->stats, "ad", adp->lun, DEV_BSIZE,
  		      DEVSTAT_NO_ORDERED_TAGS,

--Q68bSM7Ycu6FN28Q--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011219060503.B72034>