Re: [PATCH] amd74xx: implement suspend-to-ram
From: Benjamin Herrenschmidt
Date: Mon Aug 07 2006 - 09:12:07 EST
On Fri, 2006-07-28 at 21:00 +0100, Alan Cox wrote:
> Ar Gwe, 2006-07-28 am 13:13 -0400, ysgrifennodd Jason Lunz:
> > OK, I'll see about moving it there. Will this still be
> > controller-specific, or are you suggesting this is something ide ought
> > to do globally?
>
> It should be done globally. In many cases the chips start up from power
> on configured for PIO 0 so that side happens to work, but not all chips
> do this as you've found out. Setting the PIO side correctly is a fix
> even if its not a bug people hit a lot.
It's actually incorrect to just "restore" the previous timings. In many
case, the disk will have been reset too. The safe thing is to force the
controller in PIO0 mode at resume, and the best place to do that is from
the controller's own resume(), as I do on pmac. It's the parent of the
hwif and thus will be resumed before the later.
Later on, the state machine will redo the tuning to get to a better
speed, including sending the right commands to also reconfigure the
drive.
Ben.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/