From df98668f178c39c54bc7b9cd3adb99cbd7ed8ada Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 14 May 2008 23:06:15 +0200 Subject: alim15x3: trivial cleanup for ali_set_pio_mode() Remove commented out code and stale comment. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pci/alim15x3.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'drivers/ide/pci/alim15x3.c') diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index c1922f9cfe80..a23b975e5b89 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -76,11 +76,6 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) a_clc = 0; c_time = ide_pio_timings[pio].cycle_time; -#if 0 - if ((r_clc = ((c_time - s_time - a_time) * bus_speed + 999) / 1000) >= 16) - r_clc = 0; -#endif - if (!(r_clc = (c_time * bus_speed + 999) / 1000 - a_clc - s_clc)) { r_clc = 1; } else { @@ -110,16 +105,6 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) pci_write_config_byte(dev, port, s_clc); pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc); local_irq_restore(flags); - - /* - * setup active rec - * { 70, 165, 365 }, PIO Mode 0 - * { 50, 125, 208 }, PIO Mode 1 - * { 30, 100, 110 }, PIO Mode 2 - * { 30, 80, 70 }, PIO Mode 3 with IORDY - * { 25, 70, 25 }, PIO Mode 4 with IORDY ns - * { 20, 50, 30 } PIO Mode 5 with IORDY (nonstandard) - */ } /** -- cgit v1.2.3 From 2bf111d97a8c05d3fe436caaf18ba0634c9ab33d Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 14 May 2008 23:06:16 +0200 Subject: alim15x3: remove stale warning about ATI RS100 northbridge Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pci/alim15x3.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/ide/pci/alim15x3.c') diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index a23b975e5b89..98ecf1451fc7 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -522,17 +522,9 @@ static const struct ide_port_info ali15x3_chipset __devinitdata = { static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) { - static struct pci_device_id ati_rs100[] = { - { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100) }, - { }, - }; - struct ide_port_info d = ali15x3_chipset; u8 rev = dev->revision, idx = id->driver_data; - if (pci_dev_present(ati_rs100)) - printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n"); - /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ if (rev <= 0xC4) d.host_flags |= IDE_HFLAG_NO_LBA48_DMA; -- cgit v1.2.3 From 63b1623ef0e33160d782fd1b0044e9a8af5d16cf Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 14 May 2008 23:06:16 +0200 Subject: 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 --- drivers/ide/pci/alim15x3.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'drivers/ide/pci/alim15x3.c') 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 @@ -38,6 +38,16 @@ #include +/* + * 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 @@ -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 */ @@ -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 } -- cgit v1.2.3 From e7f379d5cabb2790ecce5d623382fa6085e7686d Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 14 May 2008 23:06:16 +0200 Subject: alim15x3: remove WDC_ALI15X3 config option There is "wdc_udma" module parameter now. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/pci/alim15x3.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/ide/pci/alim15x3.c') diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 3eaab542c41a..f2129d5e07f2 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -127,8 +127,6 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) * No UDMA on revisions <= 0x20 * Disk only for revisions < 0xC2 * Not WDC drives on M1543C-E (?) - * - * FIXME: WDC ifdef needs to die */ static u8 ali_udma_filter(ide_drive_t *drive) @@ -136,11 +134,9 @@ static u8 ali_udma_filter(ide_drive_t *drive) if (m5229_revision > 0x20 && m5229_revision < 0xC2) { if (drive->media != ide_disk) return 0; -#ifndef CONFIG_WDC_ALI15X3 if (chip_is_1543c_e && strstr(drive->id->model, "WDC ") && wdc_udma == 0) return 0; -#endif } return drive->hwif->ultra_mask; -- cgit v1.2.3