aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-23 00:14:12 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:41 -0400
commitfd995f7039f1955ccc6b43e1e2d168060b31e4b2 (patch)
tree1aac318f211493183508a97aa6c8b2b6cb41d0b6
parentae791c05694d7391ee9261a0450a50f7e95aedfd (diff)
libata-pmp-prep: implement ATA_LFLAG_NO_RETRY
Some PMP links are connected to internal pseudo devices which may come and go depending on situation. There's no reason to try hard to recover them. ATA_LFLAG_NO_RETRY tells EH to not retry if the device attached to the link fails. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/libata-eh.c5
-rw-r--r--include/linux/libata.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 7be04bd30bfe..8f8ed4dfb171 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2335,7 +2335,10 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
2335 struct ata_eh_context *ehc = &link->eh_context; 2335 struct ata_eh_context *ehc = &link->eh_context;
2336 2336
2337 ata_link_for_each_dev(dev, link) { 2337 ata_link_for_each_dev(dev, link) {
2338 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; 2338 if (link->flags & ATA_LFLAG_NO_RETRY)
2339 ehc->tries[dev->devno] = 1;
2340 else
2341 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
2339 2342
2340 /* collect port action mask recorded in dev actions */ 2343 /* collect port action mask recorded in dev actions */
2341 ehc->i.action |= ehc->i.dev_action[dev->devno] & 2344 ehc->i.action |= ehc->i.dev_action[dev->devno] &
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 6266fffb0eb3..adeee7397cdb 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -169,6 +169,7 @@ enum {
169 ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */ 169 ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */
170 ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */ 170 ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */
171 ATA_LFLAG_ASSUME_CLASS = ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB, 171 ATA_LFLAG_ASSUME_CLASS = ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB,
172 ATA_LFLAG_NO_RETRY = (1 << 5), /* don't retry this link */
172 173
173 /* struct ata_port flags */ 174 /* struct ata_port flags */
174 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ 175 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */