aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/alim15x3.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:07 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:07 -0400
commit18137207236285989dfc0ee7f929b954199228f3 (patch)
treed55f1287ae64318190e18cb7a64ca514c76c3414 /drivers/ide/pci/alim15x3.c
parentde372ecd80a42c4fb485c7232475301a18d05184 (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/alim15x3.c')
-rw-r--r--drivers/ide/pci/alim15x3.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 946a12746cb5..26c27d946c67 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -783,8 +783,17 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
783 783
784 hwif->atapi_dma = 1; 784 hwif->atapi_dma = 1;
785 785
786 if (m5229_revision > 0x20) 786 if (m5229_revision <= 0x20)
787 hwif->ultra_mask = 0x7f; 787 hwif->ultra_mask = 0x00; /* no udma */
788 else if (m5229_revision < 0xC2)
789 hwif->ultra_mask = 0x07; /* udma0-2 */
790 else if (m5229_revision == 0xC2 || m5229_revision == 0xC3)
791 hwif->ultra_mask = 0x1f; /* udma0-4 */
792 else if (m5229_revision == 0xC4)
793 hwif->ultra_mask = 0x3f; /* udma0-5 */
794 else
795 hwif->ultra_mask = 0x7f; /* udma0-6 */
796
788 hwif->mwdma_mask = 0x07; 797 hwif->mwdma_mask = 0x07;
789 hwif->swdma_mask = 0x07; 798 hwif->swdma_mask = 0x07;
790 799