From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-ide@vger.kernel.org, Forrest Zhao <forrest.zhao@gmail.com>
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 07/11] libata-pmp-prep: implement ATA_LFLAG_NO_RETRY
Date: Mon, 16 Jul 2007 18:39:46 +0900 [thread overview]
Message-ID: <11845787861123-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <1184578783463-git-send-email-htejun@gmail.com>
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>
---
drivers/ata/libata-eh.c | 5 ++++-
include/linux/libata.h | 1 +
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index e5f644e..b99e70b 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2262,7 +2262,10 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
struct ata_eh_context *ehc = &link->eh_context;
ata_link_for_each_dev(dev, link) {
- ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
+ if (link->flags & ATA_LFLAG_NO_RETRY)
+ ehc->tries[dev->devno] = 1;
+ else
+ ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
/* collect port action mask recorded in dev actions */
ehc->i.action |= ehc->i.dev_action[dev->devno] &
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3d84c2b..787cebc 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -168,6 +168,7 @@ enum {
ATA_LFLAG_ASSUME_ATA = (1 << 3), /* assume ATA class */
ATA_LFLAG_ASSUME_SEMB = (1 << 4), /* assume SEMB class */
ATA_LFLAG_ASSUME_CLASS = ATA_LFLAG_ASSUME_ATA | ATA_LFLAG_ASSUME_SEMB,
+ ATA_LFLAG_NO_RETRY = (1 << 5), /* don't retry this link */
/* struct ata_port flags */
ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
--
1.5.0.3
next prev parent reply other threads:[~2007-07-16 9:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 9:39 [PATCHSET 3/4] libata: prep for PMP support, take 5 Tejun Heo
2007-07-16 9:39 ` [PATCH 01/11] libata-pmp-prep: add PMP related constants, fields, ops and update helpers Tejun Heo
2007-07-16 9:39 ` [PATCH 02/11] libata-pmp-prep: add @new_class to ata_dev_revalidate() Tejun Heo
2007-07-16 9:39 ` [PATCH 03/11] libata-pmp-prep: make a number of functions global to libata Tejun Heo
2007-07-16 9:39 ` [PATCH 05/11] libata-pmp-prep: implement qc_defer helpers Tejun Heo
2007-07-16 9:39 ` [PATCH 04/11] libata-pmp-prep: implement ops->qc_defer() Tejun Heo
2007-07-16 9:39 ` Tejun Heo [this message]
2007-07-16 9:39 ` [PATCH 06/11] libata-pmp-prep: implement ATA_LFLAG_NO_SRST, ASSUME_ATA and ASSUME_SEMB Tejun Heo
2007-07-16 9:39 ` [PATCH 10/11] libata-pmp-prep: implement ATA_HORKAGE_SKIP_PM Tejun Heo
2007-07-16 9:39 ` [PATCH 09/11] libata-pmp-prep: implement EH fast-fail path Tejun Heo
2007-07-16 9:39 ` [PATCH 08/11] libata-pmp-prep: implement ATA_LFLAG_DISABLED Tejun Heo
2007-07-16 9:39 ` [PATCH 11/11] libata-pmp-prep: implement sata_async_notification() Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11845787861123-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=forrest.zhao@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).