aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pdc_adma.c
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-12-05 02:38:02 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-06 04:49:22 -0500
commita22e2eb0710798009b8e696ae911aef745089dd6 (patch)
tree93421443499249db0301868e07f24156c456cf7a /drivers/scsi/pdc_adma.c
parentc14b8331ec4843e4f2b67a4d847a0d812a50e43c (diff)
[PATCH] libata: move err_mask to ata_queued_cmd
- remove err_mask from the parameter list of the complete functions - move err_mask to ata_queued_cmd - initialize qc->err_mask when needed - for each function call to ata_qc_complete(), replace the err_mask parameter with qc->err_mask. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> =============== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/pdc_adma.c')
-rw-r--r--drivers/scsi/pdc_adma.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c
index f557f17ca00c..e8df0c9ec1e6 100644
--- a/drivers/scsi/pdc_adma.c
+++ b/drivers/scsi/pdc_adma.c
@@ -464,14 +464,12 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
464 continue; 464 continue;
465 qc = ata_qc_from_tag(ap, ap->active_tag); 465 qc = ata_qc_from_tag(ap, ap->active_tag);
466 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 466 if (qc && (!(qc->tf.ctl & ATA_NIEN))) {
467 unsigned int err_mask = 0;
468
469 if ((status & (aPERR | aPSD | aUIRQ))) 467 if ((status & (aPERR | aPSD | aUIRQ)))
470 err_mask = AC_ERR_OTHER; 468 qc->err_mask |= AC_ERR_OTHER;
471 else if (pp->pkt[0] != cDONE) 469 else if (pp->pkt[0] != cDONE)
472 err_mask = AC_ERR_OTHER; 470 qc->err_mask |= AC_ERR_OTHER;
473 471
474 ata_qc_complete(qc, err_mask); 472 ata_qc_complete(qc);
475 } 473 }
476 } 474 }
477 return handled; 475 return handled;
@@ -501,7 +499,8 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set)
501 499
502 /* complete taskfile transaction */ 500 /* complete taskfile transaction */
503 pp->state = adma_state_idle; 501 pp->state = adma_state_idle;
504 ata_qc_complete(qc, ac_err_mask(status)); 502 qc->err_mask |= ac_err_mask(status);
503 ata_qc_complete(qc);
505 handled = 1; 504 handled = 1;
506 } 505 }
507 } 506 }