aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pdc_adma.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 20:25:28 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 20:25:28 -0500
commit122401ce39faab22b29eb11b20e4342f7f566b1b (patch)
treee164f8fa5decc4b7182e7d66b1634c7fd43b9f7f /drivers/scsi/pdc_adma.c
parent94ec1ef1cf29e137e5c79372e432b040c6604be6 (diff)
parent6e9d6b8ee4e0c37d3952256e6472c57490d6780d (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/pdc_adma.c')
-rw-r--r--drivers/scsi/pdc_adma.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c
index 6a9d0dc085c1..fc9ee6fefa1c 100644
--- a/drivers/scsi/pdc_adma.c
+++ b/drivers/scsi/pdc_adma.c
@@ -40,6 +40,7 @@
40#include <linux/delay.h> 40#include <linux/delay.h>
41#include <linux/interrupt.h> 41#include <linux/interrupt.h>
42#include <linux/sched.h> 42#include <linux/sched.h>
43#include <linux/device.h>
43#include "scsi.h" 44#include "scsi.h"
44#include <scsi/scsi_host.h> 45#include <scsi/scsi_host.h>
45#include <asm/io.h> 46#include <asm/io.h>
@@ -451,7 +452,7 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
451 struct adma_port_priv *pp; 452 struct adma_port_priv *pp;
452 struct ata_queued_cmd *qc; 453 struct ata_queued_cmd *qc;
453 void __iomem *chan = ADMA_REGS(mmio_base, port_no); 454 void __iomem *chan = ADMA_REGS(mmio_base, port_no);
454 u8 drv_stat = 0, status = readb(chan + ADMA_STATUS); 455 u8 status = readb(chan + ADMA_STATUS);
455 456
456 if (status == 0) 457 if (status == 0)
457 continue; 458 continue;
@@ -464,11 +465,14 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
464 continue; 465 continue;
465 qc = ata_qc_from_tag(ap, ap->active_tag); 466 qc = ata_qc_from_tag(ap, ap->active_tag);
466 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { 467 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
468 unsigned int err_mask = 0;
469
467 if ((status & (aPERR | aPSD | aUIRQ))) 470 if ((status & (aPERR | aPSD | aUIRQ)))
468 drv_stat = ATA_ERR; 471 err_mask = AC_ERR_OTHER;
469 else if (pp->pkt[0] != cDONE) 472 else if (pp->pkt[0] != cDONE)
470 drv_stat = ATA_ERR; 473 err_mask = AC_ERR_OTHER;
471 ata_qc_complete(qc, drv_stat); 474
475 ata_qc_complete(qc, err_mask);
472 } 476 }
473 } 477 }
474 return handled; 478 return handled;
@@ -498,7 +502,7 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set)
498 502
499 /* complete taskfile transaction */ 503 /* complete taskfile transaction */
500 pp->state = adma_state_idle; 504 pp->state = adma_state_idle;
501 ata_qc_complete(qc, status); 505 ata_qc_complete(qc, ac_err_mask(status));
502 handled = 1; 506 handled = 1;
503 } 507 }
504 } 508 }
@@ -623,16 +627,14 @@ static int adma_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
623 627
624 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 628 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
625 if (rc) { 629 if (rc) {
626 printk(KERN_ERR DRV_NAME 630 dev_printk(KERN_ERR, &pdev->dev,
627 "(%s): 32-bit DMA enable failed\n", 631 "32-bit DMA enable failed\n");
628 pci_name(pdev));
629 return rc; 632 return rc;
630 } 633 }
631 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 634 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
632 if (rc) { 635 if (rc) {
633 printk(KERN_ERR DRV_NAME 636 dev_printk(KERN_ERR, &pdev->dev,
634 "(%s): 32-bit consistent DMA enable failed\n", 637 "32-bit consistent DMA enable failed\n");
635 pci_name(pdev));
636 return rc; 638 return rc;
637 } 639 }
638 return 0; 640 return 0;
@@ -648,7 +650,7 @@ static int adma_ata_init_one(struct pci_dev *pdev,
648 int rc, port_no; 650 int rc, port_no;
649 651
650 if (!printed_version++) 652 if (!printed_version++)
651 printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); 653 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
652 654
653 rc = pci_enable_device(pdev); 655 rc = pci_enable_device(pdev);
654 if (rc) 656 if (rc)