From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Schmidt Subject: Re: [RFT] solve "swsusp plays yoyo" with disks Date: Thu, 21 Jul 2005 17:30:48 +0200 Message-ID: <42DFBFA8.5060800@stud.feec.vutbr.cz> References: <20050705172953.GA18748@elf.ucw.cz> <42DFAD1C.80004@stud.feec.vutbr.cz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060000010804000809060805" Return-path: In-Reply-To: <42DFAD1C.80004@stud.feec.vutbr.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.osdl.org Errors-To: linux-pm-bounces@lists.osdl.org To: B.Zolnierkiewicz@elka.pw.edu.pl Cc: Linux-pm mailing list , kernel list , Pavel Machek List-Id: linux-pm@vger.kernel.org This is a multi-part message in MIME format. --------------060000010804000809060805 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Michal Schmidt wrote: > Pavel Machek wrote: > >>Hi! >> >>I'd like to get this tested under as many configurations as >>possible. With this, your hdd should no longer do "yoyo" (spindown, >>spinup, spindown) during suspend... > > > It looks like the patch is now in -mm (I use 2.6.13-rc3-mm1). > But my disks still yoyo during suspend. What more is needed? Some patch > to ide-disk.c ? I think I've found the problem. The attached patch stops the disks from spinning down and up on suspend. The patch applies to 2.6.13-rc3-mm1. Signed-off-by: Michal Schmidt --------------060000010804000809060805 Content-Type: text/x-patch; name="ide-disk-yoyo-on-suspend.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ide-disk-yoyo-on-suspend.diff" diff -Nurp -X dontdiff.new linux-mm/drivers/ide/ide-io.c linux-mm.mich/drivers/ide/ide-io.c --- linux-mm/drivers/ide/ide-io.c 2005-06-30 01:00:53.000000000 +0200 +++ linux-mm.mich/drivers/ide/ide-io.c 2005-07-21 16:59:46.000000000 +0200 @@ -150,7 +150,7 @@ static void ide_complete_power_step(ide_ switch (rq->pm->pm_step) { case ide_pm_flush_cache: /* Suspend step 1 (flush cache) complete */ - if (rq->pm->pm_state == 4) + if (rq->pm->pm_state == PM_EVENT_FREEZE) rq->pm->pm_step = ide_pm_state_completed; else rq->pm->pm_step = idedisk_pm_standby; --------------060000010804000809060805 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --------------060000010804000809060805--