linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: John Treubig <jtreubig@hotmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
	dougg@torque.net, dwm@maxeymade.com
Subject: Re: Error handling in LibATA
Date: Fri, 13 Jan 2006 13:45:22 +0800	[thread overview]
Message-ID: <43C73E72.6090400@tw.ibm.com> (raw)
In-Reply-To: <BAY101-F347AF31FA4399257978B64DF270@phx.gbl>


> 
> I began to try your patch and noticed that the code was different than
> my copy of 2.6.15 rc5, so I downloaded 2.6.15 (release) and still see
> that the base copy of libata-core.c is different.  A good indicator was
> that ata_qc_complete() requires 2 parameters in the code from 2.6.15. 
> Can you tell me where I can find the copy your working off and if I have
> to have any other files to support it?

Hi John,

Attached please find the patch for the 2.6.15 tree.
Also please turn on the ATA_DEBUG and ATA_VERBOSE_DEBUG in libata.h
for detailed log during the test, thanks.

Albert

=================

--- linux-2.6.15/drivers/scsi/libata-core.c	2006-01-03 11:21:10.000000000 +0800
+++ errmask/drivers/scsi/libata-core.c	2006-01-13 13:27:12.000000000 +0800
@@ -3312,6 +3312,7 @@ static void ata_qc_timeout(struct ata_qu
 	struct ata_host_set *host_set = ap->host_set;
 	u8 host_stat = 0, drv_stat;
 	unsigned long flags;
+	unsigned int err_mask = 0;
 
 	DPRINTK("ENTER\n");
 
@@ -3346,8 +3347,15 @@ static void ata_qc_timeout(struct ata_qu
 		printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x host_stat 0x%x\n",
 		       ap->id, qc->tf.command, drv_stat, host_stat);
 
+		/* If drv_stat looks ok (0x50 normally), we treat this
+		 * as lost interrupt and complete the qc as normal.
+		 * If drv_stat looks bad (0x00, 0xff, etc), err_mask is set.
+		 */
+		if (!ata_ok(drv_stat))
+			err_mask |= __ac_err_mask(drv_stat);
+
 		/* complete taskfile transaction */
-		ata_qc_complete(qc, ac_err_mask(drv_stat));
+		ata_qc_complete(qc, err_mask);
 		break;
 	}
 




  reply	other threads:[~2006-01-13  5:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 15:30 Error handling in LibATA John Treubig
2006-01-12 19:49 ` John Treubig
2006-01-13  5:45   ` Albert Lee [this message]
2006-01-13 15:41     ` John Treubig
  -- strict thread matches above, loose matches on Subject: below --
2006-01-10 22:30 John Treubig
2006-01-10 23:15 ` Alan Cox
2006-01-10 23:22 ` Douglas Gilbert
2006-01-11  2:07 ` Albert Lee

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=43C73E72.6090400@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dougg@torque.net \
    --cc=dwm@maxeymade.com \
    --cc=jtreubig@hotmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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).