diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 17:47:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 17:47:58 -0500 |
commit | 6e9d6b8ee4e0c37d3952256e6472c57490d6780d (patch) | |
tree | 39161fdc999565ddb47a55fad57ab6f1b7266b97 /drivers/scsi/sata_qstor.c | |
parent | d3f8cf489993658702b7e58ff37162246263de53 (diff) | |
parent | a9524a76f70f3343e4be27f95a7e92a8ba5f9009 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
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 1aaf3304d397..9938dae782b6 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> |
@@ -400,11 +401,12 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set) | |||
400 | qc = ata_qc_from_tag(ap, ap->active_tag); | 401 | qc = ata_qc_from_tag(ap, ap->active_tag); |
401 | if (qc && (!(qc->tf.ctl & ATA_NIEN))) { | 402 | if (qc && (!(qc->tf.ctl & ATA_NIEN))) { |
402 | switch (sHST) { | 403 | switch (sHST) { |
403 | case 0: /* sucessful CPB */ | 404 | case 0: /* successful CPB */ |
404 | case 3: /* device error */ | 405 | case 3: /* device error */ |
405 | pp->state = qs_state_idle; | 406 | pp->state = qs_state_idle; |
406 | qs_enter_reg_mode(qc->ap); | 407 | qs_enter_reg_mode(qc->ap); |
407 | ata_qc_complete(qc, sDST); | 408 | ata_qc_complete(qc, |
409 | ac_err_mask(sDST)); | ||
408 | break; | 410 | break; |
409 | default: | 411 | default: |
410 | break; | 412 | break; |
@@ -441,7 +443,7 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set) | |||
441 | 443 | ||
442 | /* complete taskfile transaction */ | 444 | /* complete taskfile transaction */ |
443 | pp->state = qs_state_idle; | 445 | pp->state = qs_state_idle; |
444 | ata_qc_complete(qc, status); | 446 | ata_qc_complete(qc, ac_err_mask(status)); |
445 | handled = 1; | 447 | handled = 1; |
446 | } | 448 | } |
447 | } | 449 | } |
@@ -599,25 +601,22 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base) | |||
599 | if (rc) { | 601 | if (rc) { |
600 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 602 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
601 | if (rc) { | 603 | if (rc) { |
602 | printk(KERN_ERR DRV_NAME | 604 | dev_printk(KERN_ERR, &pdev->dev, |
603 | "(%s): 64-bit DMA enable failed\n", | 605 | "64-bit DMA enable failed\n"); |
604 | pci_name(pdev)); | ||
605 | return rc; | 606 | return rc; |
606 | } | 607 | } |
607 | } | 608 | } |
608 | } else { | 609 | } else { |
609 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 610 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
610 | if (rc) { | 611 | if (rc) { |
611 | printk(KERN_ERR DRV_NAME | 612 | dev_printk(KERN_ERR, &pdev->dev, |
612 | "(%s): 32-bit DMA enable failed\n", | 613 | "32-bit DMA enable failed\n"); |
613 | pci_name(pdev)); | ||
614 | return rc; | 614 | return rc; |
615 | } | 615 | } |
616 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 616 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
617 | if (rc) { | 617 | if (rc) { |
618 | printk(KERN_ERR DRV_NAME | 618 | dev_printk(KERN_ERR, &pdev->dev, |
619 | "(%s): 32-bit consistent DMA enable failed\n", | 619 | "32-bit consistent DMA enable failed\n"); |
620 | pci_name(pdev)); | ||
621 | return rc; | 620 | return rc; |
622 | } | 621 | } |
623 | } | 622 | } |
@@ -634,7 +633,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
634 | int rc, port_no; | 633 | int rc, port_no; |
635 | 634 | ||
636 | if (!printed_version++) | 635 | if (!printed_version++) |
637 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 636 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
638 | 637 | ||
639 | rc = pci_enable_device(pdev); | 638 | rc = pci_enable_device(pdev); |
640 | if (rc) | 639 | if (rc) |