mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Brandon Philips <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
9b896033aa
commit
b94b898f31
2 changed files with 13 additions and 0 deletions
|
|
@ -68,6 +68,8 @@
|
|||
|
||||
#define DRV_NAME "it821x"
|
||||
|
||||
#define QUIRK_VORTEX86 1
|
||||
|
||||
struct it821x_dev
|
||||
{
|
||||
unsigned int smart:1, /* Are we in smart raid mode */
|
||||
|
|
@ -79,6 +81,7 @@ struct it821x_dev
|
|||
u16 pio[2]; /* Cached PIO values */
|
||||
u16 mwdma[2]; /* Cached MWDMA values */
|
||||
u16 udma[2]; /* Cached UDMA values (per drive) */
|
||||
u16 quirks;
|
||||
};
|
||||
|
||||
#define ATA_66 0
|
||||
|
|
@ -577,6 +580,12 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
|
|||
|
||||
hwif->ultra_mask = ATA_UDMA6;
|
||||
hwif->mwdma_mask = ATA_MWDMA2;
|
||||
|
||||
/* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */
|
||||
if (idev->quirks & QUIRK_VORTEX86) {
|
||||
if (dev->revision == 0x11)
|
||||
hwif->ultra_mask = 0;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
itdevs->quirks = id->driver_data;
|
||||
|
||||
rc = ide_pci_init_one(dev, &it821x_chipset, itdevs);
|
||||
if (rc)
|
||||
kfree(itdevs);
|
||||
|
|
@ -668,6 +679,7 @@ static void __devexit it821x_remove(struct pci_dev *dev)
|
|||
static const struct pci_device_id it821x_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
|
||||
{ PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
|
||||
{ PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 },
|
||||
{ 0, },
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue