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/sis5513.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/sis5513.c')
-rw-r--r-- | drivers/ide/pci/sis5513.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 2ba0669f36a1..6fe4ecb6c06c 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -858,6 +858,8 @@ static unsigned int __devinit ata66_sis5513 (ide_hwif_t *hwif) | |||
858 | 858 | ||
859 | static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) | 859 | static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) |
860 | { | 860 | { |
861 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; | ||
862 | |||
861 | hwif->autodma = 0; | 863 | hwif->autodma = 0; |
862 | 864 | ||
863 | if (!hwif->irq) | 865 | if (!hwif->irq) |
@@ -873,7 +875,8 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) | |||
873 | } | 875 | } |
874 | 876 | ||
875 | hwif->atapi_dma = 1; | 877 | hwif->atapi_dma = 1; |
876 | hwif->ultra_mask = 0x7f; | 878 | |
879 | hwif->ultra_mask = udma_rates[chipset_family]; | ||
877 | hwif->mwdma_mask = 0x07; | 880 | hwif->mwdma_mask = 0x07; |
878 | hwif->swdma_mask = 0x07; | 881 | hwif->swdma_mask = 0x07; |
879 | 882 | ||