aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/alim15x3.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-05-14 17:06:16 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-05-14 17:06:16 -0400
commit63b1623ef0e33160d782fd1b0044e9a8af5d16cf (patch)
tree064bde66cbf8c2ea9a1df6f23c6db0e3ad6f402a /drivers/ide/pci/alim15x3.c
parent2bf111d97a8c05d3fe436caaf18ba0634c9ab33d (diff)
alim15x3: add "wdc_udma" module parameter
Add "wdc_udma" module parameter for allowing UDMA transfers on M1543C-E chipset for WDC disks. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
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 }