Re: [git patches] libata updates for 2.6.37

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Monday, December 6, 2010 - 10:46 am

Hello,

On 12/06/2010 05:07 PM, Kyle McMartin wrote:

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;
 		}

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git patches] libata updates for 2.6.37, Jeff Garzik, (Thu Oct 21, 6:23 pm)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Mon Nov 29, 11:07 am)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Tue Nov 30, 7:13 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Tue Nov 30, 8:38 am)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Tue Nov 30, 9:29 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Tue Nov 30, 9:31 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Tue Nov 30, 10:53 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Tue Nov 30, 2:09 pm)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Wed Dec 1, 4:17 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Wed Dec 1, 5:44 am)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Wed Dec 1, 7:19 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Wed Dec 1, 8:50 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Wed Dec 1, 1:09 pm)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Thu Dec 2, 3:17 am)
debug kernel using two laptops without serial port, Stanley Gan, (Thu Dec 2, 5:56 am)
Re: debug kernel using two laptops without serial port, Borislav Petkov, (Thu Dec 2, 6:17 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Thu Dec 2, 2:23 pm)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Fri Dec 3, 3:10 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Fri Dec 3, 4:59 am)
Re: [git patches] libata updates for 2.6.37, Kyle McMartin, (Mon Dec 6, 9:07 am)
Re: [git patches] libata updates for 2.6.37, Tejun Heo, (Mon Dec 6, 10:46 am)