From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, albertcc@tw.ibm.com,
linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 13/15] libata: dec scmd->retries for qcs with zero err_mask
Date: Sun, 2 Apr 2006 18:51:53 +0900 [thread overview]
Message-ID: <11439715133421-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11439715124131-git-send-email-htejun@gmail.com>
qcs might get retried because of unrelated failure. e.g. NCQ command
failure causes the whole command set to be aborted. Decrement
scmd->retries for such retrials to avoid unnecessarily failing
commands. Note that scmd->retries will be incremented the first time.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/scsi/libata-scsi.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
942cb205645187842932b75aa89c4361a4423212
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 2870652..4400815 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -831,11 +831,14 @@ void ata_eh_qc_complete(struct ata_queue
* should be retried. To be used from EH.
*
* SCSI midlayer limits the number of retries to scmd->allowed.
- * This function might need to adjust scmd->retries for commands
- * which get retried due to unrelated NCQ failures.
+ * scmd->retries is decremented for commands which get retried
+ * due to unrelated failures (qc->err_mask is zero).
*/
void ata_eh_qc_retry(struct ata_queued_cmd *qc)
{
+ struct scsi_cmnd *scmd = qc->scsicmd;
+ if (!qc->err_mask && scmd->retries)
+ scmd->retries--;
__ata_eh_qc_complete(qc);
}
--
1.2.4
next prev parent reply other threads:[~2006-04-02 9:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-02 9:51 [PATCHSET] libata: prep for new EH, take 2 Tejun Heo
2006-04-02 9:51 ` [PATCH 02/15] libata: ata_dev_revalidate() printk update Tejun Heo
2006-04-02 9:51 ` [PATCH 04/15] libata: clean up constants Tejun Heo
2006-04-02 9:51 ` [PATCH 01/15] libata: report device number when PIO fails Tejun Heo
2006-04-02 9:51 ` [PATCH 05/15] libata: rename ATA_FLAG_PORT_DISABLED to ATA_FLAG_DISABLED Tejun Heo
2006-04-02 9:51 ` [PATCH 03/15] libata: ATA_FLAG_IN_EH is not used, kill it Tejun Heo
2006-04-02 9:51 ` [PATCH 08/15] libata: add ATA_QCFLAG_IO Tejun Heo
2006-04-02 9:51 ` [PATCH 14/15] libata: separate out libata-eh.c Tejun Heo
2006-04-02 9:51 ` Tejun Heo [this message]
2006-04-02 9:51 ` [PATCH 10/15] libata: always generate sense if qc->err_mask is non-zero Tejun Heo
2006-04-02 9:51 ` [PATCH 11/15] libata: don't read TF directly from sense generation functions Tejun Heo
2006-04-02 9:51 ` [PATCH 06/15] libata: clear only affected flags during ata_dev_configure() Tejun Heo
2006-04-02 9:51 ` [PATCH 07/15] libata: clear ATA_DFLAG_PIO before setting it Tejun Heo
2006-04-02 9:51 ` [PATCH 15/15] libata: make some libata-core routines extern Tejun Heo
2006-04-02 9:51 ` [PATCH 09/15] libata: pass qc around intead of ap during PIO Tejun Heo
2006-04-02 9:51 ` [PATCH 12/15] libata: add @cdb to ata_exec_internal() 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=11439715133421-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertcc@tw.ibm.com \
--cc=jgarzik@pobox.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.