Re: Broken Promise Ultra66 IDE driver in 2.3.31?

Marcus Sundberg (mackan@stacken.kth.se)
11 Dec 1999 18:15:11 +0100


Terry Hardie <terryh@orcas.net> writes:

> I've applied the 2.2.10.uniform-ide-6.20.draco.patch to a 2.2.13ac3
> kernel (manually) and it works great. 2.3.31 is supposed to include
> the uniform IDE with the Promise Ultra66 driver (and it does), but it
> I enable DMA, it gets half way through listing the partitions on IDE
> drives, hangs for around 10 seconds, and then gets a DMA timeout, and
> locks solid. No panic, nothing. Not even the ACPI power off switch
> works.
>
> The 6.20 uniform IDE driver works fine at UDMA(66), but I can't get
> the driver to work in 2.3.31. Is it broken, or am I doing something
> stupid?

The Promise Ultra driver was broken in 2.3.28, I got exactly the
same problem. Reverse this patch and it will work just fine:

diff -u --recursive --new-file v2.3.27/linux/drivers/block/pdc202xx.c linux/drivers/block/pdc202xx.c
--- v2.3.27/linux/drivers/block/pdc202xx.c Fri Oct 22 13:21:47 1999
+++ linux/drivers/block/pdc202xx.c Fri Nov 12 10:12:11 1999
@@ -220,7 +221,7 @@

int err;
unsigned int drive_conf;
- byte drive_pci;
+ byte drive_pci, speed_ok = 0;
byte test1, test2, speed = -1;
byte AP, BP, CP, DP, TB, TC;
unsigned short EP;
@@ -278,16 +279,20 @@
switch(drive_number) {
case 0: drive_pci = 0x60;
pci_read_config_dword(dev, drive_pci, &drive_conf);
- if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
+ if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
+ speed_ok = 1;
goto chipset_is_set;
+ }
pci_read_config_byte(dev, (drive_pci), &test1);
if (!(test1 & SYNC_ERRDY_EN))
pci_write_config_byte(dev, (drive_pci), test1|SYNC_ERRDY_EN);
break;
case 1: drive_pci = 0x64;
pci_read_config_dword(dev, drive_pci, &drive_conf);
- if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
+ if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
+ speed_ok = 1;
goto chipset_is_set;
+ }
pci_read_config_byte(dev, 0x60, &test1);
pci_read_config_byte(dev, (drive_pci), &test2);
if ((test1 & SYNC_ERRDY_EN) && !(test2 & SYNC_ERRDY_EN))
@@ -295,16 +300,20 @@
break;
case 2: drive_pci = 0x68;
pci_read_config_dword(dev, drive_pci, &drive_conf);
- if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
+ if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
+ speed_ok = 1;
goto chipset_is_set;
+ }
pci_read_config_byte(dev, (drive_pci), &test1);
if (!(test1 & SYNC_ERRDY_EN))
pci_write_config_byte(dev, (drive_pci), test1|SYNC_ERRDY_EN);
break;
case 3: drive_pci = 0x6c;
pci_read_config_dword(dev, drive_pci, &drive_conf);
- if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
+ if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
+ speed_ok = 1;
goto chipset_is_set;
+ }
pci_read_config_byte(dev, 0x68, &test1);
pci_read_config_byte(dev, (drive_pci), &test2);
if ((test1 & SYNC_ERRDY_EN) && !(test2 & SYNC_ERRDY_EN))
@@ -402,7 +411,8 @@
decode_registers(REG_D, DP);
#endif /* PDC202XX_DECODE_REGISTER_INFO */

- err = ide_config_drive_speed(drive, speed);
+ if (!speed_ok)
+ err = ide_config_drive_speed(drive, speed);

#if PDC202XX_DEBUG_DRIVE_INFO
printk("%s: %s drive%d 0x%08x ",

//Marcus

-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/