aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pdc_adma.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 04:50:22 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 04:50:22 -0500
commit054ee8fd39f1b5d50e803f126b63f400d631eea4 (patch)
tree2819e388f853de88e09635de8e38017b563069bc /drivers/scsi/pdc_adma.c
parentf0612bbc41f65f5a684f69d714a1a17a6f0f40c5 (diff)
parenta7dac447bb9cef27d4d29cdf63e2d7809c50b1f4 (diff)
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/pdc_adma.c')
-rw-r--r--drivers/scsi/pdc_adma.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c
index 5c0f90677d00..988d0d70a277 100644
--- a/drivers/scsi/pdc_adma.c
+++ b/drivers/scsi/pdc_adma.c
@@ -451,7 +451,7 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
451 struct adma_port_priv *pp; 451 struct adma_port_priv *pp;
452 struct ata_queued_cmd *qc; 452 struct ata_queued_cmd *qc;
453 void __iomem *chan = ADMA_REGS(mmio_base, port_no); 453 void __iomem *chan = ADMA_REGS(mmio_base, port_no);
454 u8 drv_stat = 0, status = readb(chan + ADMA_STATUS); 454 u8 status = readb(chan + ADMA_STATUS);
455 455
456 if (status == 0) 456 if (status == 0)
457 continue; 457 continue;
@@ -464,11 +464,14 @@ 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
467 if ((status & (aPERR | aPSD | aUIRQ))) 469 if ((status & (aPERR | aPSD | aUIRQ)))
468 drv_stat = ATA_ERR; 470 err_mask = AC_ERR_OTHER;
469 else if (pp->pkt[0] != cDONE) 471 else if (pp->pkt[0] != cDONE)
470 drv_stat = ATA_ERR; 472 err_mask = AC_ERR_OTHER;
471 ata_qc_complete(qc, drv_stat); 473
474 ata_qc_complete(qc, err_mask);
472 } 475 }
473 } 476 }
474 return handled; 477 return handled;
@@ -498,7 +501,7 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set)
498 501
499 /* complete taskfile transaction */ 502 /* complete taskfile transaction */
500 pp->state = adma_state_idle; 503 pp->state = adma_state_idle;
501 ata_qc_complete(qc, status); 504 ata_qc_complete(qc, ac_err_mask(status));
502 handled = 1; 505 handled = 1;
503 } 506 }
504 } 507 }