~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to drivers/ata/sata_qstor.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        .softreset              = ATA_OP_NULL,
148
148
        .error_handler          = qs_error_handler,
149
149
        .post_internal_cmd      = ATA_OP_NULL,
 
150
        .lost_interrupt         = ATA_OP_NULL,
150
151
 
151
152
        .scr_read               = qs_scr_read,
152
153
        .scr_write              = qs_scr_write,
160
161
        {
161
162
                .flags          = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
162
163
                                  ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING,
163
 
                .pio_mask       = 0x10, /* pio4 */
 
164
                .pio_mask       = ATA_PIO4_ONLY,
164
165
                .udma_mask      = ATA_UDMA6,
165
166
                .port_ops       = &qs_ata_ops,
166
167
        },
583
584
        int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT);
584
585
 
585
586
        if (have_64bit_bus &&
586
 
            !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
587
 
                rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
 
587
            !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
 
588
                rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
588
589
                if (rc) {
589
 
                        rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
 
590
                        rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
590
591
                        if (rc) {
591
592
                                dev_printk(KERN_ERR, &pdev->dev,
592
593
                                           "64-bit DMA enable failed\n");
594
595
                        }
595
596
                }
596
597
        } else {
597
 
                rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 
598
                rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
598
599
                if (rc) {
599
600
                        dev_printk(KERN_ERR, &pdev->dev,
600
601
                                "32-bit DMA enable failed\n");
601
602
                        return rc;
602
603
                }
603
 
                rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
 
604
                rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
604
605
                if (rc) {
605
606
                        dev_printk(KERN_ERR, &pdev->dev,
606
607
                                "32-bit consistent DMA enable failed\n");