diff options
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 42 | ||||
-rw-r--r-- | drivers/ide/pci/cs5520.c | 2 |
2 files changed, 14 insertions, 30 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index c1922f9cfe80..f2129d5e07f2 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -39,6 +39,16 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Allow UDMA on M1543C-E chipset for WDC disks that ignore CRC checking | ||
43 | * (this is DANGEROUS and could result in data corruption). | ||
44 | */ | ||
45 | static int wdc_udma; | ||
46 | |||
47 | module_param(wdc_udma, bool, 0); | ||
48 | MODULE_PARM_DESC(wdc_udma, | ||
49 | "allow UDMA on M1543C-E chipset for WDC disks (DANGEROUS)"); | ||
50 | |||
51 | /* | ||
42 | * ALi devices are not plug in. Otherwise these static values would | 52 | * ALi devices are not plug in. Otherwise these static values would |
43 | * need to go. They ought to go away anyway | 53 | * need to go. They ought to go away anyway |
44 | */ | 54 | */ |
@@ -76,11 +86,6 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
76 | a_clc = 0; | 86 | a_clc = 0; |
77 | c_time = ide_pio_timings[pio].cycle_time; | 87 | c_time = ide_pio_timings[pio].cycle_time; |
78 | 88 | ||
79 | #if 0 | ||
80 | if ((r_clc = ((c_time - s_time - a_time) * bus_speed + 999) / 1000) >= 16) | ||
81 | r_clc = 0; | ||
82 | #endif | ||
83 | |||
84 | if (!(r_clc = (c_time * bus_speed + 999) / 1000 - a_clc - s_clc)) { | 89 | if (!(r_clc = (c_time * bus_speed + 999) / 1000 - a_clc - s_clc)) { |
85 | r_clc = 1; | 90 | r_clc = 1; |
86 | } else { | 91 | } else { |
@@ -110,16 +115,6 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
110 | pci_write_config_byte(dev, port, s_clc); | 115 | pci_write_config_byte(dev, port, s_clc); |
111 | pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc); | 116 | pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc); |
112 | local_irq_restore(flags); | 117 | local_irq_restore(flags); |
113 | |||
114 | /* | ||
115 | * setup active rec | ||
116 | * { 70, 165, 365 }, PIO Mode 0 | ||
117 | * { 50, 125, 208 }, PIO Mode 1 | ||
118 | * { 30, 100, 110 }, PIO Mode 2 | ||
119 | * { 30, 80, 70 }, PIO Mode 3 with IORDY | ||
120 | * { 25, 70, 25 }, PIO Mode 4 with IORDY ns | ||
121 | * { 20, 50, 30 } PIO Mode 5 with IORDY (nonstandard) | ||
122 | */ | ||
123 | } | 118 | } |
124 | 119 | ||
125 | /** | 120 | /** |
@@ -131,9 +126,7 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
131 | * The actual rules for the ALi are: | 126 | * The actual rules for the ALi are: |
132 | * No UDMA on revisions <= 0x20 | 127 | * No UDMA on revisions <= 0x20 |
133 | * Disk only for revisions < 0xC2 | 128 | * Disk only for revisions < 0xC2 |
134 | * Not WDC drives for revisions < 0xC2 | 129 | * Not WDC drives on M1543C-E (?) |
135 | * | ||
136 | * FIXME: WDC ifdef needs to die | ||
137 | */ | 130 | */ |
138 | 131 | ||
139 | static u8 ali_udma_filter(ide_drive_t *drive) | 132 | static u8 ali_udma_filter(ide_drive_t *drive) |
@@ -141,10 +134,9 @@ static u8 ali_udma_filter(ide_drive_t *drive) | |||
141 | if (m5229_revision > 0x20 && m5229_revision < 0xC2) { | 134 | if (m5229_revision > 0x20 && m5229_revision < 0xC2) { |
142 | if (drive->media != ide_disk) | 135 | if (drive->media != ide_disk) |
143 | return 0; | 136 | return 0; |
144 | #ifndef CONFIG_WDC_ALI15X3 | 137 | if (chip_is_1543c_e && strstr(drive->id->model, "WDC ") && |
145 | if (chip_is_1543c_e && strstr(drive->id->model, "WDC ")) | 138 | wdc_udma == 0) |
146 | return 0; | 139 | return 0; |
147 | #endif | ||
148 | } | 140 | } |
149 | 141 | ||
150 | return drive->hwif->ultra_mask; | 142 | return drive->hwif->ultra_mask; |
@@ -537,17 +529,9 @@ static const struct ide_port_info ali15x3_chipset __devinitdata = { | |||
537 | 529 | ||
538 | static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 530 | static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
539 | { | 531 | { |
540 | static struct pci_device_id ati_rs100[] = { | ||
541 | { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100) }, | ||
542 | { }, | ||
543 | }; | ||
544 | |||
545 | struct ide_port_info d = ali15x3_chipset; | 532 | struct ide_port_info d = ali15x3_chipset; |
546 | u8 rev = dev->revision, idx = id->driver_data; | 533 | u8 rev = dev->revision, idx = id->driver_data; |
547 | 534 | ||
548 | if (pci_dev_present(ati_rs100)) | ||
549 | printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n"); | ||
550 | |||
551 | /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ | 535 | /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ |
552 | if (rev <= 0xC4) | 536 | if (rev <= 0xC4) |
553 | d.host_flags |= IDE_HFLAG_NO_LBA48_DMA; | 537 | d.host_flags |= IDE_HFLAG_NO_LBA48_DMA; |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 17669a434438..992b1cf8db69 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -119,6 +119,7 @@ static const struct ide_dma_ops cs5520_dma_ops = { | |||
119 | .dma_timeout = ide_dma_timeout, | 119 | .dma_timeout = ide_dma_timeout, |
120 | }; | 120 | }; |
121 | 121 | ||
122 | /* FIXME: VDMA is disabled because it caused system hangs */ | ||
122 | #define DECLARE_CS_DEV(name_str) \ | 123 | #define DECLARE_CS_DEV(name_str) \ |
123 | { \ | 124 | { \ |
124 | .name = name_str, \ | 125 | .name = name_str, \ |
@@ -126,7 +127,6 @@ static const struct ide_dma_ops cs5520_dma_ops = { | |||
126 | .dma_ops = &cs5520_dma_ops, \ | 127 | .dma_ops = &cs5520_dma_ops, \ |
127 | .host_flags = IDE_HFLAG_ISA_PORTS | \ | 128 | .host_flags = IDE_HFLAG_ISA_PORTS | \ |
128 | IDE_HFLAG_CS5520 | \ | 129 | IDE_HFLAG_CS5520 | \ |
129 | IDE_HFLAG_VDMA | \ | ||
130 | IDE_HFLAG_NO_ATAPI_DMA | \ | 130 | IDE_HFLAG_NO_ATAPI_DMA | \ |
131 | IDE_HFLAG_ABUSE_SET_DMA_MODE, \ | 131 | IDE_HFLAG_ABUSE_SET_DMA_MODE, \ |
132 | .pio_mask = ATA_PIO4, \ | 132 | .pio_mask = ATA_PIO4, \ |