diff options
author | Andreas Werner <andreas.werner@men.de> | 2015-12-04 20:12:49 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-12-07 18:25:57 +0300 |
commit | ea013a9b205b47b1fcbc72522146fad560af0712 (patch) | |
tree | 4cb4246efacefc985f78987c88d36232a9d928fd /drivers | |
parent | d98f1cd0a3b70ea91f1dfda3ac36c3b2e1a4d5e2 (diff) | |
download | linux-ea013a9b205b47b1fcbc72522146fad560af0712.tar.xz |
libata-eh.c: Introduce new ata port flag for controller which lockup on read log page
Some controller lockup on a ata_read_log_page.
Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used
to blacklist a controller.
If this flag is set, any attempt to read a log page returns an error
without actually issuing the command.
Signed-off-by: Andreas Werner <andreas.werner@men.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-eh.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index cb0508af1459..961acc788f44 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1505,12 +1505,20 @@ static const char *ata_err_string(unsigned int err_mask) unsigned int ata_read_log_page(struct ata_device *dev, u8 log, u8 page, void *buf, unsigned int sectors) { + unsigned long ap_flags = dev->link->ap->flags; struct ata_taskfile tf; unsigned int err_mask; bool dma = false; DPRINTK("read log page - log 0x%x, page 0x%x\n", log, page); + /* + * Return error without actually issuing the command on controllers + * which e.g. lockup on a read log page. + */ + if (ap_flags & ATA_FLAG_NO_LOG_PAGE) + return AC_ERR_DEV; + retry: ata_tf_init(dev, &tf); if (dev->dma_mode && ata_id_has_read_log_dma_ext(dev->id) && |