linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Tejun Heo <htejun@gmail.com>, Doug Maxey <dwm@maxeymade.com>
Subject: [PATCH 3/4] libata-dev: Use new AC_ERR_* flags
Date: Wed, 08 Feb 2006 16:50:29 +0800	[thread overview]
Message-ID: <43E9B0D5.6070806@tw.ibm.com> (raw)
In-Reply-To: <43E9AD00.8070900@tw.ibm.com>

Patch 3/4:

Changes:
  - Use new AC_ERR_* flags as done in Tejun's patches
  - In ata_qc_timeout(), replace ac_err_mask(drv_stat) with AC_ERR_TIMEOUT.
    This makes time out handler always report error to upper layer.
    Otherwise if the drv_stat looks good, libata might falsely report OK to the upper layer.

For your review, thanks.

Albert
Signed-off-by: Albert Lee <albertcc@tw.ibm.com> 

===

--- queuework/drivers/scsi/libata-core.c	2006-02-08 14:06:41.000000000 +0800
+++ errmask/drivers/scsi/libata-core.c	2006-02-08 14:42:34.000000000 +0800
@@ -3315,7 +3315,7 @@ static int ata_pio_first_block(struct at
 	/* sleep-wait for BSY to clear */
 	DPRINTK("busy wait\n");
 	if (ata_busy_sleep(ap, ATA_TMOUT_DATAOUT_QUICK, ATA_TMOUT_DATAOUT)) {
-		qc->err_mask |= AC_ERR_ATA_BUS;
+		qc->err_mask |= AC_ERR_TIMEOUT;
 		ap->hsm_task_state = HSM_ST_TMOUT;
 		goto err_out;
 	}
@@ -3324,7 +3324,7 @@ static int ata_pio_first_block(struct at
 	status = ata_chk_status(ap);
 	if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) {
 		/* device status error */
-		qc->err_mask |= AC_ERR_ATA_BUS;
+		qc->err_mask |= AC_ERR_HSM;
 		ap->hsm_task_state = HSM_ST_ERR;
 		goto err_out;
 	}
@@ -3684,7 +3684,7 @@ static void ata_qc_timeout(struct ata_qu
 		ap->hsm_task_state = HSM_ST_IDLE;
 
 		/* complete taskfile transaction */
-		qc->err_mask |= ac_err_mask(drv_stat);
+		qc->err_mask |= AC_ERR_TIMEOUT;
 		break;
 	}
 
@@ -4365,7 +4365,7 @@ fsm_start:
 		/* check device status */
 		if (unlikely((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ)) {
 			/* Wrong status. Let EH handle this */
-			qc->err_mask |= AC_ERR_ATA_BUS;
+			qc->err_mask |= AC_ERR_HSM;
 			ap->hsm_task_state = HSM_ST_ERR;
 			goto fsm_start;
 		}
@@ -4394,7 +4394,7 @@ fsm_start:
 			/* ATA PIO protocol */
 			if (unlikely((status & ATA_DRQ) == 0)) {
 				/* handle BSY=0, DRQ=0 as error */
-				qc->err_mask |= AC_ERR_ATA_BUS;
+				qc->err_mask |= AC_ERR_HSM;
 				ap->hsm_task_state = HSM_ST_ERR;
 				goto fsm_start;
 			}
@@ -4416,7 +4416,7 @@ fsm_start:
 	case HSM_ST_LAST:
 		if (unlikely(status & ATA_DRQ)) {
 			/* handle DRQ=1 as error */
-			qc->err_mask |= AC_ERR_ATA_BUS;
+			qc->err_mask |= AC_ERR_HSM;
 			ap->hsm_task_state = HSM_ST_ERR;
 			goto fsm_start;
 		}




  parent reply	other threads:[~2006-02-08  8:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27 14:23 irq-pio branch updated with Tejun's patches Jeff Garzik
2006-02-08  8:25 ` Albert Lee
2006-02-08  8:34   ` [PATCH 0/4] libata-dev: minor fix for irq-pio with Tejun's EH patches Albert Lee
2006-02-08  8:37     ` [PATCH 1/4] libata-dev: Fix array index value in ata_rwcmd_protocol() Albert Lee
2006-02-09  9:26       ` Jeff Garzik
2006-02-08  8:48     ` [PATCH 2/4] libata-dev: Use new ata_queue_pio_task() for PIO polling task Albert Lee
2006-02-08  8:50     ` Albert Lee [this message]
2006-02-08  8:51     ` [PATCH 4/4] libata-dev: Minor comment fix Albert Lee
2006-02-08  8:46   ` irq-pio branch updated with Tejun's patches Tejun Heo
2006-02-09  3:23     ` Albert Lee
2006-02-09  3:58       ` Tejun Heo
2006-02-09  9:21         ` Jeff Garzik
2006-02-09  9:31           ` Tejun
2006-02-09  9:17       ` Jeff Garzik

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=43E9B0D5.6070806@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=dwm@maxeymade.com \
    --cc=htejun@gmail.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 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).