From: Tejun Heo Date: Fri, 17 Aug 2007 09:46:51 +0000 (+0900) Subject: libata: don't check n_sectors during revalidation if zero X-Git-Tag: MMI-PSA29.97-13-9~40654^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b54eebd673861136291b97e409a0f248b96e74ae;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git libata: don't check n_sectors during revalidation if zero If the initial configuration fails early, n_sectors is left at zero. Checking against it during revalidation makes retried configuration fail due to n_sectors mismatch. Ignore zero n_sectors during revalidation. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9bfe329fb579..2ad4dda6d4a7 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3700,7 +3700,8 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) goto fail; /* verify n_sectors hasn't changed */ - if (dev->class == ATA_DEV_ATA && dev->n_sectors != n_sectors) { + if (dev->class == ATA_DEV_ATA && n_sectors && + dev->n_sectors != n_sectors) { ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " "%llu != %llu\n", (unsigned long long)n_sectors,