diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 20:25:28 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 20:25:28 -0500 |
commit | 122401ce39faab22b29eb11b20e4342f7f566b1b (patch) | |
tree | e164f8fa5decc4b7182e7d66b1634c7fd43b9f7f /drivers/scsi/sata_qstor.c | |
parent | 94ec1ef1cf29e137e5c79372e432b040c6604be6 (diff) | |
parent | 6e9d6b8ee4e0c37d3952256e6472c57490d6780d (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/sata_qstor.c')
-rw-r--r-- | drivers/scsi/sata_qstor.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 6317a9a96e69..6998c5141607 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/device.h> | ||
38 | #include "scsi.h" | 39 | #include "scsi.h" |
39 | #include <scsi/scsi_host.h> | 40 | #include <scsi/scsi_host.h> |
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
@@ -399,11 +400,12 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set) | |||
399 | qc = ata_qc_from_tag(ap, ap->active_tag); | 400 | qc = ata_qc_from_tag(ap, ap->active_tag); |
400 | if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { | 401 | if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { |
401 | switch (sHST) { | 402 | switch (sHST) { |
402 | case 0: /* sucessful CPB */ | 403 | case 0: /* successful CPB */ |
403 | case 3: /* device error */ | 404 | case 3: /* device error */ |
404 | pp->state = qs_state_idle; | 405 | pp->state = qs_state_idle; |
405 | qs_enter_reg_mode(qc->ap); | 406 | qs_enter_reg_mode(qc->ap); |
406 | ata_qc_complete(qc, sDST); | 407 | ata_qc_complete(qc, |
408 | ac_err_mask(sDST)); | ||
407 | break; | 409 | break; |
408 | default: | 410 | default: |
409 | break; | 411 | break; |
@@ -440,7 +442,7 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set) | |||
440 | 442 | ||
441 | /* complete taskfile transaction */ | 443 | /* complete taskfile transaction */ |
442 | pp->state = qs_state_idle; | 444 | pp->state = qs_state_idle; |
443 | ata_qc_complete(qc, status); | 445 | ata_qc_complete(qc, ac_err_mask(status)); |
444 | handled = 1; | 446 | handled = 1; |
445 | } | 447 | } |
446 | } | 448 | } |
@@ -598,25 +600,22 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base) | |||
598 | if (rc) { | 600 | if (rc) { |
599 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 601 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
600 | if (rc) { | 602 | if (rc) { |
601 | printk(KERN_ERR DRV_NAME | 603 | dev_printk(KERN_ERR, &pdev->dev, |
602 | "(%s): 64-bit DMA enable failed\n", | 604 | "64-bit DMA enable failed\n"); |
603 | pci_name(pdev)); | ||
604 | return rc; | 605 | return rc; |
605 | } | 606 | } |
606 | } | 607 | } |
607 | } else { | 608 | } else { |
608 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 609 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
609 | if (rc) { | 610 | if (rc) { |
610 | printk(KERN_ERR DRV_NAME | 611 | dev_printk(KERN_ERR, &pdev->dev, |
611 | "(%s): 32-bit DMA enable failed\n", | 612 | "32-bit DMA enable failed\n"); |
612 | pci_name(pdev)); | ||
613 | return rc; | 613 | return rc; |
614 | } | 614 | } |
615 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 615 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
616 | if (rc) { | 616 | if (rc) { |
617 | printk(KERN_ERR DRV_NAME | 617 | dev_printk(KERN_ERR, &pdev->dev, |
618 | "(%s): 32-bit consistent DMA enable failed\n", | 618 | "32-bit consistent DMA enable failed\n"); |
619 | pci_name(pdev)); | ||
620 | return rc; | 619 | return rc; |
621 | } | 620 | } |
622 | } | 621 | } |
@@ -633,7 +632,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
633 | int rc, port_no; | 632 | int rc, port_no; |
634 | 633 | ||
635 | if (!printed_version++) | 634 | if (!printed_version++) |
636 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 635 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
637 | 636 | ||
638 | rc = pci_enable_device(pdev); | 637 | rc = pci_enable_device(pdev); |
639 | if (rc) | 638 | if (rc) |