diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-05-09 18:01:07 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-05-09 18:01:07 -0400 |
commit | 18137207236285989dfc0ee7f929b954199228f3 (patch) | |
tree | d55f1287ae64318190e18cb7a64ca514c76c3414 /drivers/ide/pci/pdc202xx_new.c | |
parent | de372ecd80a42c4fb485c7232475301a18d05184 (diff) |
ide: fix UDMA/MWDMA/SWDMA masks (v3)
* use 0x00 instead of 0x80 to disable ->{ultra,mwdma,swdma}_mask
* add udma_mask field to ide_pci_device_t and use it to initialize
->ultra_mask in aec62xx, cmd64x, pdc202xx_{new,old} and piix drivers
* fix UDMA masks to match with chipset specific *_ratemask()
(alim15x3, hpt366, serverworks and siimage drivers need UDMA mask
filtering method - done in the next patch)
v2:
* piix: fix cable detection for 82801AA_1 and 82372FB_1
[ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
* cmd64x: use hwif->cds->udma_mask
[ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
* aec62xx: fix newly introduced bug - check DMA status not command register
[ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
v3:
* piix: use hwif->cds->udma_mask
[ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/pdc202xx_new.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_new.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 2cdd629c653d..a23853445af9 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -543,7 +543,8 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) | |||
543 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; | 543 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; |
544 | 544 | ||
545 | hwif->atapi_dma = 1; | 545 | hwif->atapi_dma = 1; |
546 | hwif->ultra_mask = 0x7f; | 546 | |
547 | hwif->ultra_mask = hwif->cds->udma_mask; | ||
547 | hwif->mwdma_mask = 0x07; | 548 | hwif->mwdma_mask = 0x07; |
548 | 549 | ||
549 | hwif->err_stops_fifo = 1; | 550 | hwif->err_stops_fifo = 1; |
@@ -619,6 +620,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
619 | .channels = 2, | 620 | .channels = 2, |
620 | .autodma = AUTODMA, | 621 | .autodma = AUTODMA, |
621 | .bootable = OFF_BOARD, | 622 | .bootable = OFF_BOARD, |
623 | .udma_mask = 0x3f, /* udma0-5 */ | ||
622 | },{ /* 1 */ | 624 | },{ /* 1 */ |
623 | .name = "PDC20269", | 625 | .name = "PDC20269", |
624 | .init_setup = init_setup_pdcnew, | 626 | .init_setup = init_setup_pdcnew, |
@@ -627,6 +629,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
627 | .channels = 2, | 629 | .channels = 2, |
628 | .autodma = AUTODMA, | 630 | .autodma = AUTODMA, |
629 | .bootable = OFF_BOARD, | 631 | .bootable = OFF_BOARD, |
632 | .udma_mask = 0x7f, /* udma0-6*/ | ||
630 | },{ /* 2 */ | 633 | },{ /* 2 */ |
631 | .name = "PDC20270", | 634 | .name = "PDC20270", |
632 | .init_setup = init_setup_pdc20270, | 635 | .init_setup = init_setup_pdc20270, |
@@ -635,6 +638,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
635 | .channels = 2, | 638 | .channels = 2, |
636 | .autodma = AUTODMA, | 639 | .autodma = AUTODMA, |
637 | .bootable = OFF_BOARD, | 640 | .bootable = OFF_BOARD, |
641 | .udma_mask = 0x3f, /* udma0-5 */ | ||
638 | },{ /* 3 */ | 642 | },{ /* 3 */ |
639 | .name = "PDC20271", | 643 | .name = "PDC20271", |
640 | .init_setup = init_setup_pdcnew, | 644 | .init_setup = init_setup_pdcnew, |
@@ -643,6 +647,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
643 | .channels = 2, | 647 | .channels = 2, |
644 | .autodma = AUTODMA, | 648 | .autodma = AUTODMA, |
645 | .bootable = OFF_BOARD, | 649 | .bootable = OFF_BOARD, |
650 | .udma_mask = 0x7f, /* udma0-6*/ | ||
646 | },{ /* 4 */ | 651 | },{ /* 4 */ |
647 | .name = "PDC20275", | 652 | .name = "PDC20275", |
648 | .init_setup = init_setup_pdcnew, | 653 | .init_setup = init_setup_pdcnew, |
@@ -651,6 +656,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
651 | .channels = 2, | 656 | .channels = 2, |
652 | .autodma = AUTODMA, | 657 | .autodma = AUTODMA, |
653 | .bootable = OFF_BOARD, | 658 | .bootable = OFF_BOARD, |
659 | .udma_mask = 0x7f, /* udma0-6*/ | ||
654 | },{ /* 5 */ | 660 | },{ /* 5 */ |
655 | .name = "PDC20276", | 661 | .name = "PDC20276", |
656 | .init_setup = init_setup_pdc20276, | 662 | .init_setup = init_setup_pdc20276, |
@@ -659,6 +665,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
659 | .channels = 2, | 665 | .channels = 2, |
660 | .autodma = AUTODMA, | 666 | .autodma = AUTODMA, |
661 | .bootable = OFF_BOARD, | 667 | .bootable = OFF_BOARD, |
668 | .udma_mask = 0x7f, /* udma0-6*/ | ||
662 | },{ /* 6 */ | 669 | },{ /* 6 */ |
663 | .name = "PDC20277", | 670 | .name = "PDC20277", |
664 | .init_setup = init_setup_pdcnew, | 671 | .init_setup = init_setup_pdcnew, |
@@ -667,6 +674,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
667 | .channels = 2, | 674 | .channels = 2, |
668 | .autodma = AUTODMA, | 675 | .autodma = AUTODMA, |
669 | .bootable = OFF_BOARD, | 676 | .bootable = OFF_BOARD, |
677 | .udma_mask = 0x7f, /* udma0-6*/ | ||
670 | } | 678 | } |
671 | }; | 679 | }; |
672 | 680 | ||