Skip to content

Commit

Permalink
alim15x3: add "wdc_udma" module parameter
Browse files Browse the repository at this point in the history
Add "wdc_udma" module parameter for allowing UDMA transfers
on M1543C-E chipset for WDC disks.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed May 14, 2008
1 parent 2bf111d commit 63b1623
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@

#include <asm/io.h>

/*
* Allow UDMA on M1543C-E chipset for WDC disks that ignore CRC checking
* (this is DANGEROUS and could result in data corruption).
*/
static int wdc_udma;

module_param(wdc_udma, bool, 0);
MODULE_PARM_DESC(wdc_udma,
"allow UDMA on M1543C-E chipset for WDC disks (DANGEROUS)");

/*
* ALi devices are not plug in. Otherwise these static values would
* need to go. They ought to go away anyway
Expand Down Expand Up @@ -116,7 +126,7 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio)
* The actual rules for the ALi are:
* No UDMA on revisions <= 0x20
* Disk only for revisions < 0xC2
* Not WDC drives for revisions < 0xC2
* Not WDC drives on M1543C-E (?)
*
* FIXME: WDC ifdef needs to die
*/
Expand All @@ -127,7 +137,8 @@ static u8 ali_udma_filter(ide_drive_t *drive)
if (drive->media != ide_disk)
return 0;
#ifndef CONFIG_WDC_ALI15X3
if (chip_is_1543c_e && strstr(drive->id->model, "WDC "))
if (chip_is_1543c_e && strstr(drive->id->model, "WDC ") &&
wdc_udma == 0)
return 0;
#endif
}
Expand Down

0 comments on commit 63b1623

Please sign in to comment.