summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2009-02-11 13:08:43 -0800
committerJeff Garzik <jgarzik@redhat.com>2009-02-25 15:22:44 -0500
commit7ba07d16bd62f931efec1fc8e63bf1aeebfe42a9 (patch)
tree0cbe0e20e4c7ea2bf4e96d7b3a2966fe5686eb46
parentc15d8a6499d04e5d2cac07f8120f207bb275f60f (diff)
downloadlinux-7ba07d16bd62f931efec1fc8e63bf1aeebfe42a9.tar.gz
linux-7ba07d16bd62f931efec1fc8e63bf1aeebfe42a9.tar.bz2
linux-7ba07d16bd62f931efec1fc8e63bf1aeebfe42a9.zip
pata_it821x: resume from hibernation fails with RAID volume
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/ata/pata_it821x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index f1bb2f9fecbf..b05b86a912c5 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -557,6 +557,9 @@ static unsigned int it821x_read_id(struct ata_device *adev,
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;
}