diff options
author | Brandon Philips <brandon@ifup.org> | 2009-01-14 13:19:02 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-14 13:19:02 -0500 |
commit | b94b898f3107046b5c97c556e23529283ea5eadd (patch) | |
tree | 5c81cc20a8a8b18054bb1ea3bd603b858eb72283 /drivers/ide/it821x.c | |
parent | 9b896033aa2781d36b2d3f756fe70325fc8487e2 (diff) |
it821x: Add ultra_mask quirk for Vortex86SX
On Vortex86SX with IDE controller revision 0x11 ultra DMA must be
disabled. This patch was tested by DMP and seems to work.
It is a cleaned up version of their older Kernel patch:
http://www.dmp.com.tw/tech/vortex86sx/patch-2.6.24-DMP.gz
Tested-by: Shawn Lin <shawn@dmp.com.tw>
Signed-off-by: Brandon Philips <bphilips@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/it821x.c')
-rw-r--r-- | drivers/ide/it821x.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c index 0be27ac1f077..983440a9a5f7 100644 --- a/drivers/ide/it821x.c +++ b/drivers/ide/it821x.c | |||
@@ -68,6 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_NAME "it821x" | 69 | #define DRV_NAME "it821x" |
70 | 70 | ||
71 | #define QUIRK_VORTEX86 1 | ||
72 | |||
71 | struct it821x_dev | 73 | struct it821x_dev |
72 | { | 74 | { |
73 | unsigned int smart:1, /* Are we in smart raid mode */ | 75 | unsigned int smart:1, /* Are we in smart raid mode */ |
@@ -79,6 +81,7 @@ struct it821x_dev | |||
79 | u16 pio[2]; /* Cached PIO values */ | 81 | u16 pio[2]; /* Cached PIO values */ |
80 | u16 mwdma[2]; /* Cached MWDMA values */ | 82 | u16 mwdma[2]; /* Cached MWDMA values */ |
81 | u16 udma[2]; /* Cached UDMA values (per drive) */ | 83 | u16 udma[2]; /* Cached UDMA values (per drive) */ |
84 | u16 quirks; | ||
82 | }; | 85 | }; |
83 | 86 | ||
84 | #define ATA_66 0 | 87 | #define ATA_66 0 |
@@ -577,6 +580,12 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
577 | 580 | ||
578 | hwif->ultra_mask = ATA_UDMA6; | 581 | hwif->ultra_mask = ATA_UDMA6; |
579 | hwif->mwdma_mask = ATA_MWDMA2; | 582 | hwif->mwdma_mask = ATA_MWDMA2; |
583 | |||
584 | /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */ | ||
585 | if (idev->quirks & QUIRK_VORTEX86) { | ||
586 | if (dev->revision == 0x11) | ||
587 | hwif->ultra_mask = 0; | ||
588 | } | ||
580 | } | 589 | } |
581 | 590 | ||
582 | static void it8212_disable_raid(struct pci_dev *dev) | 591 | static void it8212_disable_raid(struct pci_dev *dev) |
@@ -649,6 +658,8 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic | |||
649 | return -ENOMEM; | 658 | return -ENOMEM; |
650 | } | 659 | } |
651 | 660 | ||
661 | itdevs->quirks = id->driver_data; | ||
662 | |||
652 | rc = ide_pci_init_one(dev, &it821x_chipset, itdevs); | 663 | rc = ide_pci_init_one(dev, &it821x_chipset, itdevs); |
653 | if (rc) | 664 | if (rc) |
654 | kfree(itdevs); | 665 | kfree(itdevs); |
@@ -668,6 +679,7 @@ static void __devexit it821x_remove(struct pci_dev *dev) | |||
668 | static const struct pci_device_id it821x_pci_tbl[] = { | 679 | static const struct pci_device_id it821x_pci_tbl[] = { |
669 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 }, | 680 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 }, |
670 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 }, | 681 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 }, |
682 | { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 }, | ||
671 | { 0, }, | 683 | { 0, }, |
672 | }; | 684 | }; |
673 | 685 | ||