aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_promise.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/sata_promise.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/sata_promise.c')
-rw-r--r--drivers/scsi/sata_promise.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index 02089069b0f6..e2e146a14f97 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -401,7 +401,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
401 case ATA_PROT_NODATA: 401 case ATA_PROT_NODATA:
402 printk(KERN_ERR "ata%u: command timeout\n", ap->id); 402 printk(KERN_ERR "ata%u: command timeout\n", ap->id);
403 drv_stat = ata_wait_idle(ap); 403 drv_stat = ata_wait_idle(ap);
404 ata_qc_complete(qc, __ac_err_mask(drv_stat)); 404 qc->err_mask |= __ac_err_mask(drv_stat);
405 ata_qc_complete(qc);
405 break; 406 break;
406 407
407 default: 408 default:
@@ -410,7 +411,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
410 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", 411 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n",
411 ap->id, qc->tf.command, drv_stat); 412 ap->id, qc->tf.command, drv_stat);
412 413
413 ata_qc_complete(qc, ac_err_mask(drv_stat)); 414 qc->err_mask |= ac_err_mask(drv_stat);
415 ata_qc_complete(qc);
414 break; 416 break;
415 } 417 }
416 418
@@ -422,21 +424,21 @@ out:
422static inline unsigned int pdc_host_intr( struct ata_port *ap, 424static inline unsigned int pdc_host_intr( struct ata_port *ap,
423 struct ata_queued_cmd *qc) 425 struct ata_queued_cmd *qc)
424{ 426{
425 unsigned int handled = 0, err_mask = 0; 427 unsigned int handled = 0;
426 u32 tmp; 428 u32 tmp;
427 void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; 429 void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL;
428 430
429 tmp = readl(mmio); 431 tmp = readl(mmio);
430 if (tmp & PDC_ERR_MASK) { 432 if (tmp & PDC_ERR_MASK) {
431 err_mask = AC_ERR_DEV; 433 qc->err_mask |= AC_ERR_DEV;
432 pdc_reset_port(ap); 434 pdc_reset_port(ap);
433 } 435 }
434 436
435 switch (qc->tf.protocol) { 437 switch (qc->tf.protocol) {
436 case ATA_PROT_DMA: 438 case ATA_PROT_DMA:
437 case ATA_PROT_NODATA: 439 case ATA_PROT_NODATA:
438 err_mask |= ac_err_mask(ata_wait_idle(ap)); 440 qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
439 ata_qc_complete(qc, err_mask); 441 ata_qc_complete(qc);
440 handled = 1; 442 handled = 1;
441 break; 443 break;
442 444