aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/alim15x3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r--drivers/ide/pci/alim15x3.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 98ecf1451fc7..3eaab542c41a 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 */
45static int wdc_udma;
46
47module_param(wdc_udma, bool, 0);
48MODULE_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 */
@@ -116,7 +126,7 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio)
116 * The actual rules for the ALi are: 126 * The actual rules for the ALi are:
117 * No UDMA on revisions <= 0x20 127 * No UDMA on revisions <= 0x20
118 * Disk only for revisions < 0xC2 128 * Disk only for revisions < 0xC2
119 * Not WDC drives for revisions < 0xC2 129 * Not WDC drives on M1543C-E (?)
120 * 130 *
121 * FIXME: WDC ifdef needs to die 131 * FIXME: WDC ifdef needs to die
122 */ 132 */
@@ -127,7 +137,8 @@ static u8 ali_udma_filter(ide_drive_t *drive)
127 if (drive->media != ide_disk) 137 if (drive->media != ide_disk)
128 return 0; 138 return 0;
129#ifndef CONFIG_WDC_ALI15X3 139#ifndef CONFIG_WDC_ALI15X3
130 if (chip_is_1543c_e && strstr(drive->id->model, "WDC ")) 140 if (chip_is_1543c_e && strstr(drive->id->model, "WDC ") &&
141 wdc_udma == 0)
131 return 0; 142 return 0;
132#endif 143#endif
133 } 144 }