diff options
author | Tejun Heo <htejun@gmail.com> | 2008-03-23 21:05:15 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-24 22:09:40 -0400 |
commit | dda7aba119536084d082cd11d4781fe15d7355f2 (patch) | |
tree | f015dade6caf49c7fbff2d6c26a040375c368ab1 | |
parent | 1ffc151fcddf524d0c76709d7e7a2af0255acb6b (diff) | |
download | talos-op-linux-dda7aba119536084d082cd11d4781fe15d7355f2.tar.gz talos-op-linux-dda7aba119536084d082cd11d4781fe15d7355f2.zip |
libata: improve HPA error handling
There's no point in retrying and eventually failing device detection
when the device rejects READ_NATIVE_MAX[_EXT]. Disable HPA unlocking
if READ_NATIVE_MAX[_EXT] is rejected as done when SET_MAX[_EXT] is
rejected.
This allows some old drives to work even if they aren't blacklisted.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/ata/libata-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c9c52803d0c2..c4248b37ff64 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1416,12 +1416,12 @@ static int ata_hpa_resize(struct ata_device *dev) /* read native max address */ rc = ata_read_native_max_address(dev, &native_sectors); if (rc) { - /* If HPA isn't going to be unlocked, skip HPA - * resizing from the next try. + /* If device aborted the command or HPA isn't going to + * be unlocked, skip HPA resizing. */ - if (!ata_ignore_hpa) { + if (rc == -EACCES || !ata_ignore_hpa) { ata_dev_printk(dev, KERN_WARNING, "HPA support seems " - "broken, will skip HPA handling\n"); + "broken, skipping HPA handling\n"); dev->horkage |= ATA_HORKAGE_BROKEN_HPA; /* we can continue if device aborted the command */ |