diff options
Diffstat (limited to 'drivers/ide/it821x.c')
-rw-r--r-- | drivers/ide/it821x.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c index 0be27ac1f077..e1c4f5437396 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 |
@@ -557,8 +560,7 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
557 | * this is necessary. | 560 | * this is necessary. |
558 | */ | 561 | */ |
559 | 562 | ||
560 | pci_read_config_byte(dev, 0x08, &conf); | 563 | if (dev->revision == 0x10) { |
561 | if (conf == 0x10) { | ||
562 | idev->timing10 = 1; | 564 | idev->timing10 = 1; |
563 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; | 565 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; |
564 | if (idev->smart == 0) | 566 | if (idev->smart == 0) |
@@ -577,6 +579,12 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
577 | 579 | ||
578 | hwif->ultra_mask = ATA_UDMA6; | 580 | hwif->ultra_mask = ATA_UDMA6; |
579 | hwif->mwdma_mask = ATA_MWDMA2; | 581 | hwif->mwdma_mask = ATA_MWDMA2; |
582 | |||
583 | /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */ | ||
584 | if (idev->quirks & QUIRK_VORTEX86) { | ||
585 | if (dev->revision == 0x11) | ||
586 | hwif->ultra_mask = 0; | ||
587 | } | ||
580 | } | 588 | } |
581 | 589 | ||
582 | static void it8212_disable_raid(struct pci_dev *dev) | 590 | static void it8212_disable_raid(struct pci_dev *dev) |
@@ -649,6 +657,8 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic | |||
649 | return -ENOMEM; | 657 | return -ENOMEM; |
650 | } | 658 | } |
651 | 659 | ||
660 | itdevs->quirks = id->driver_data; | ||
661 | |||
652 | rc = ide_pci_init_one(dev, &it821x_chipset, itdevs); | 662 | rc = ide_pci_init_one(dev, &it821x_chipset, itdevs); |
653 | if (rc) | 663 | if (rc) |
654 | kfree(itdevs); | 664 | kfree(itdevs); |
@@ -668,6 +678,7 @@ static void __devexit it821x_remove(struct pci_dev *dev) | |||
668 | static const struct pci_device_id it821x_pci_tbl[] = { | 678 | static const struct pci_device_id it821x_pci_tbl[] = { |
669 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 }, | 679 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 }, |
670 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 }, | 680 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 }, |
681 | { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 }, | ||
671 | { 0, }, | 682 | { 0, }, |
672 | }; | 683 | }; |
673 | 684 | ||