aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cmd64x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cmd64x.c')
-rw-r--r--drivers/ide/pci/cmd64x.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 77f51ab6d439..610c45f7b4e2 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -644,15 +644,12 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
644 644
645 hwif->atapi_dma = 1; 645 hwif->atapi_dma = 1;
646 646
647 hwif->ultra_mask = 0x3f; 647 hwif->ultra_mask = hwif->cds->udma_mask;
648 hwif->mwdma_mask = 0x07; 648
649 if (dev->device == PCI_DEVICE_ID_CMD_646 && class_rev < 5)
650 hwif->ultra_mask = 0x00;
649 651
650 if (dev->device == PCI_DEVICE_ID_CMD_643) 652 hwif->mwdma_mask = 0x07;
651 hwif->ultra_mask = 0x80;
652 if (dev->device == PCI_DEVICE_ID_CMD_646)
653 hwif->ultra_mask = (class_rev > 0x04) ? 0x07 : 0x80;
654 if (dev->device == PCI_DEVICE_ID_CMD_648)
655 hwif->ultra_mask = 0x1f;
656 653
657 hwif->ide_dma_check = &cmd64x_config_drive_for_dma; 654 hwif->ide_dma_check = &cmd64x_config_drive_for_dma;
658 if (!(hwif->udma_four)) 655 if (!(hwif->udma_four))
@@ -716,6 +713,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
716 .autodma = AUTODMA, 713 .autodma = AUTODMA,
717 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}}, 714 .enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
718 .bootable = ON_BOARD, 715 .bootable = ON_BOARD,
716 .udma_mask = 0x00, /* no udma */
719 },{ /* 1 */ 717 },{ /* 1 */
720 .name = "CMD646", 718 .name = "CMD646",
721 .init_setup = init_setup_cmd646, 719 .init_setup = init_setup_cmd646,
@@ -725,6 +723,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
725 .autodma = AUTODMA, 723 .autodma = AUTODMA,
726 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 724 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
727 .bootable = ON_BOARD, 725 .bootable = ON_BOARD,
726 .udma_mask = 0x07, /* udma0-2 */
728 },{ /* 2 */ 727 },{ /* 2 */
729 .name = "CMD648", 728 .name = "CMD648",
730 .init_setup = init_setup_cmd64x, 729 .init_setup = init_setup_cmd64x,
@@ -734,6 +733,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
734 .autodma = AUTODMA, 733 .autodma = AUTODMA,
735 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 734 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
736 .bootable = ON_BOARD, 735 .bootable = ON_BOARD,
736 .udma_mask = 0x1f, /* udma0-4 */
737 },{ /* 3 */ 737 },{ /* 3 */
738 .name = "CMD649", 738 .name = "CMD649",
739 .init_setup = init_setup_cmd64x, 739 .init_setup = init_setup_cmd64x,
@@ -743,6 +743,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
743 .autodma = AUTODMA, 743 .autodma = AUTODMA,
744 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, 744 .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
745 .bootable = ON_BOARD, 745 .bootable = ON_BOARD,
746 .udma_mask = 0x3f, /* udma0-5 */
746 } 747 }
747}; 748};
748 749