* [patch for 2.6.29? 4/4] pata_it821x: resume from hibernation fails with RAID volume
@ 2009-02-11 21:08 akpm
2009-02-25 20:29 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-02-11 21:08 UTC (permalink / raw)
To: jeff; +Cc: linux-ide, akpm, linux, alan
From: Ondrej Zary <linux@rainbow-software.org>
Hibernation didn't work for me since I started to use IT8212 controller.
I did some debugging (booting with no_console_suspend init=/bin/sh).
Found that resume fails (2.6.28) with "serial number mismatch 'some
garbage' != 'some other garbage'" and "revalidation failed" messages.
That's because the controller firmware fills different serial number in
the IDENTIFY every boot.
The patch below fixes the resume simply clearing the serial number. The
proper fix would be probably to fill in the serial number of the RAID
volume instead. I assume that there must be something like that stored on
the drives but I don't know where.
Fix resume on pata_it821x RAID volume by clearing the serial number in
IDENTIFY data, which is otherwise different on each boot.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/ata/pata_it821x.c | 3 +++
1 file changed, 3 insertions(+)
diff -puN drivers/ata/pata_it821x.c~pata_it821x-resume-from-hibernation-fails-with-raid-volume drivers/ata/pata_it821x.c
--- a/drivers/ata/pata_it821x.c~pata_it821x-resume-from-hibernation-fails-with-raid-volume
+++ a/drivers/ata/pata_it821x.c
@@ -557,6 +557,9 @@ static unsigned int it821x_read_id(struc
id[83] |= 0x4400; /* Word 83 is valid and LBA48 */
id[86] |= 0x0400; /* LBA48 on */
id[ATA_ID_MAJOR_VER] |= 0x1F;
+ /* Clear the serial number because it's different each boot
+ which breaks validation on resume */
+ memset(&id[ATA_ID_SERNO], 0x20, ATA_ID_SERNO_LEN);
}
return err_mask;
}
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch for 2.6.29? 4/4] pata_it821x: resume from hibernation fails with RAID volume
2009-02-11 21:08 [patch for 2.6.29? 4/4] pata_it821x: resume from hibernation fails with RAID volume akpm
@ 2009-02-25 20:29 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-02-25 20:29 UTC (permalink / raw)
To: akpm; +Cc: linux-ide, linux, alan
akpm@linux-foundation.org wrote:
> From: Ondrej Zary <linux@rainbow-software.org>
>
> Hibernation didn't work for me since I started to use IT8212 controller.
> I did some debugging (booting with no_console_suspend init=/bin/sh).
>
> Found that resume fails (2.6.28) with "serial number mismatch 'some
> garbage' != 'some other garbage'" and "revalidation failed" messages.
> That's because the controller firmware fills different serial number in
> the IDENTIFY every boot.
>
> The patch below fixes the resume simply clearing the serial number. The
> proper fix would be probably to fill in the serial number of the RAID
> volume instead. I assume that there must be something like that stored on
> the drives but I don't know where.
>
> Fix resume on pata_it821x RAID volume by clearing the serial number in
> IDENTIFY data, which is otherwise different on each boot.
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: Jeff Garzik <jeff@garzik.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/ata/pata_it821x.c | 3 +++
> 1 file changed, 3 insertions(+)
>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-25 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 21:08 [patch for 2.6.29? 4/4] pata_it821x: resume from hibernation fails with RAID volume akpm
2009-02-25 20:29 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).