Re: ATAng suspend/resume support broken

From: Hiroyuki Aizu <eyes_at_navi.org>
Date: Tue, 2 Sep 2003 00:56:46 +0900
Hi.

On Thu, 28 Aug 2003 21:57:24 -0700 (PDT)
Nate Lawson <nate_at_root.org> wrote:

> With today's ATAng, I can suspend my laptop but when I resume, the system
> hangs.  I'll try to get the exact dmesg with a serial console since
> syscons gets screwed up by resuming (this is normal behavior).  In any
> case, my laptop hangs with the drive light on while trying to reset the
> ata controller.  I can't enter DDB.  By reverting just the ATAng commit to
> 2003/08/23, suspend and resume work well.  Here is my dmesg from a working
> suspend/resume...
> 
> -Nate

My laptop has same behavior. So I compare ATAng with ATAold and solve this
problem. I found re-init routine must necessary at wakeup. 
I made patches and attach to this mail.

These three are patches for re-init. At least, this works for my machine.
ata-all.c.diff
ata-all.h.diff
ata-disk.c.diff

And I make one more patch "ata-lowlevel.c.diff".
The Reason is ATAng code fonund ghost device on slave at resume time like this.

ad1: 8994829560181951MB <\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-
%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-%\M^?\M-
%\M^?\M-%\M^?\M-%\M^?\M-%> [676635847171814/165/165] at ata0-slave UDMA66

Mysteriously, ATAold and ATAng code using variable "ostat[01]" that save status 
before reset channel. I'm not familier with ATA, so maybe I'm 
misunderstanding.

Please consider these patches.

At last, I can sleep (-.-)
--
Hiroyuki Aizu

Received on Mon Sep 01 2003 - 06:56:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC