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 <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
9edbdbea00
commit
b54eebd673
|
@ -3700,7 +3700,8 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* verify n_sectors hasn't changed */
|
/* 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 "
|
ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch "
|
||||||
"%llu != %llu\n",
|
"%llu != %llu\n",
|
||||||
(unsigned long long)n_sectors,
|
(unsigned long long)n_sectors,
|
||||||
|
|
Loading…
Reference in a new issue