linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: Jeff Garzik <jeff@garzik.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-ide@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git patches] libata updates for 2.6.37
Date: Mon, 06 Dec 2010 18:46:39 +0100	[thread overview]
Message-ID: <4CFD217F.5040901@kernel.org> (raw)
In-Reply-To: <20101206160728.GP25668@bombadil.infradead.org>

Hello,

On 12/06/2010 05:07 PM, Kyle McMartin wrote:
> On Fri, Dec 03, 2010 at 06:59:02AM -0500, Kyle McMartin wrote:
>> On Fri, Dec 03, 2010 at 11:10:12AM +0100, Tejun Heo wrote:
>>>> This gets triggered a bunch on boot-up:
>>>
>>> Yeah, that's expected.  Can you please do the usual testing routine
>>> and trigger the EH giving up message and then attach the full kernel
>>> log?
>>>
>>
> 
> OK, attached is a couple days worth of suspend/resume, hopefully that
> turns up what you're looking for.

Heh, yeah, actually it did.  Can you please apply the following patch
on top and see whether the problem goes away?

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7f77c67..f23d6d4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4807,9 +4807,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
 {
 	struct ata_device *dev = qc->dev;

-	if (ata_tag_internal(qc->tag))
-		return;
-
 	if (ata_is_nodata(qc->tf.protocol))
 		return;

@@ -4858,14 +4855,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
 		if (unlikely(qc->err_mask))
 			qc->flags |= ATA_QCFLAG_FAILED;

-		if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
-			/* always fill result TF for failed qc */
+		/*
+		 * Finish internal commands without any further processing
+		 * and always with the result TF filled.
+		 */
+		if (unlikely(ata_tag_internal(qc->tag))) {
 			fill_result_tf(qc);
+			__ata_qc_complete(qc);
+			return;
+		}

-			if (!ata_tag_internal(qc->tag))
-				ata_qc_schedule_eh(qc);
-			else
-				__ata_qc_complete(qc);
+		/*
+		 * Non-internal qc has failed.  Fill the result TF and
+		 * summon EH.
+		 */
+		if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+			fill_result_tf(qc);
+			ata_qc_schedule_eh(qc);
 			return;
 		}


      reply	other threads:[~2010-12-06 17:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22  1:23 [git patches] libata updates for 2.6.37 Jeff Garzik
2010-11-29 18:07 ` Kyle McMartin
2010-11-30 14:13   ` Tejun Heo
2010-11-30 15:38     ` Kyle McMartin
2010-11-30 16:29       ` Tejun Heo
2010-11-30 16:31         ` Kyle McMartin
2010-11-30 17:53           ` Kyle McMartin
2010-11-30 21:09             ` Kyle McMartin
2010-12-01 11:17               ` Tejun Heo
2010-12-01 12:44                 ` Kyle McMartin
2010-12-01 14:19                   ` Tejun Heo
2010-12-01 15:50                     ` Kyle McMartin
2010-12-01 20:09                       ` Kyle McMartin
2010-12-02 10:17                         ` Tejun Heo
2010-12-02 21:23                           ` Kyle McMartin
2010-12-03 10:10                             ` Tejun Heo
2010-12-03 11:59                               ` Kyle McMartin
2010-12-06 16:07                                 ` Kyle McMartin
2010-12-06 17:46                                   ` Tejun Heo [this message]

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=4CFD217F.5040901@kernel.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=kyle@mcmartin.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).