Skip to contentSkip to conversation

pdc202xx_old serious bug with DMA on 2.6.x series

DISCUSSION Adolfo González Blázquez 3 participants 12 messages Jun 14, 2004 – Jun 21, 2004 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi!

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

More info on Kerneltrap: http://kerneltrap.org/node/view/3040
More info on Bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=2494

I hope someone can fix this, 'cause there's a lot of people using these ide controllers.

Adolfo González

#1 lore raw
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

Quoted 5 lines

More info on Kerneltrap: http://kerneltrap.org/node/view/3040
More info on Bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=2494

I hope someone can fix this, 'cause there's a lot of people using these ide controllers.

It seems everybody wants it fixed but nobody is willing to help...

Quoted 1 line

Adolfo González

#2 lore raw
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 8 lines
Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

Quoted 11 lines
Quoted 6 lines

More info on Kerneltrap: http://kerneltrap.org/node/view/3040
More info on Bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=2494

I hope someone can fix this, 'cause there's a lot of people using these ide controllers.

It seems everybody wants it fixed but nobody is willing to help...

Quoted 1 line

Adolfo González

#4 lore raw
In reply to a message not in the archive
Quoted 13 lines · Marcelo Tosatti
Quoted 12 lines · Adolfo González Blázquez
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

And which kernels does not exhibit the problem?

The 2.4 series it's ok, I'm gonna try with different 2.5.x kernels to see if i can discover when the bug was introduced

#13 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 14 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

Quoted 7 lines
Quoted 5 lines

More info on Kerneltrap: http://kerneltrap.org/node/view/3040
More info on Bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=2494

I hope someone can fix this, 'cause there's a lot of people using these ide controllers.

It seems everybody wants it fixed but nobody is willing to help...

FWIW, I run an ASUS P3B-F (440BX chipset) with a 20267 add-on card and a WD Caviar WD800JB UDMA100 disk as a server spooling News and other high-volume data. Even when moving GBs of data around as fast as the disk can read or write it, the system has never been less than rock solid with the 2.6 kernels.

Of course, ACPI is disabled and the 20267 is not sharing interrupts with anything else.

#6 lore raw
In reply to a message not in the archive

Hi,

Sorry for the delay... I tried 2.5.50 and 2.5.75, and, at least for my machine, everything seems to be perfect. Then i tried every 2.6 kernel. All of them have the same buggy behaviour.

These are the differences between 2.5.75 and 2.6.0 pdc202xx_old.c (sorry if this is not the correct format, im new here :)

Hope this will help.

Adolfo González

###################################################################

--- linux-2.5.75/drivers/ide/pci/pdc202xx_old.c 2003-07-10
22:15:03.000000000 +0200
+++ linux-2.6.0/drivers/ide/pci/pdc202xx_old.c 2003-12-18
03:59:53.000000000 +0100
@@ -46,7 +46,6 @@
#include <asm/io.h>
#include <asm/irq.h>

-#include "ide_modes.h"
#include "pdc202xx_old.h"

#define PDC202_DEBUG_CABLE 0
@@ -519,13 +518,15 @@
} else {
goto fast_ata_pio;
}
+ return hwif->ide_dma_on(drive);
} else if ((id->capability & 8) || (id->field_valid & 2)) {
fast_ata_pio:
no_dma_set:
hwif->tuneproc(drive, 5);
return hwif->ide_dma_off_quietly(drive);
}
- return hwif->ide_dma_on(drive);
+ /* IORDY not supported */
+ return 0;
}

static int pdc202xx_quirkproc (ide_drive_t *drive)
@@ -749,9 +750,6 @@
hwif->tuneproc = &config_chipset_for_pio; hwif->quirkproc = &pdc202xx_quirkproc;

- if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
- hwif->addressing = (hwif->channel) ? 0 : 1;
-
if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
hwif->busproc = &pdc202xx_tristate;
hwif->resetproc = &pdc202xx_reset;
@@ -928,7 +926,7 @@
return 0;
}

-static struct pci_device_id pdc202xx_pci_tbl[] __devinitdata = { +static struct pci_device_id pdc202xx_pci_tbl[] = {
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 2},

###################################################################

Quoted 30 lines · Bartlomiej Zolnierkiewicz

Hi,

Any news about this issue?

Quoted 24 lines · you
Quoted 13 lines · Marcelo Tosatti
Quoted 12 lines · Adolfo González Blázquez
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

And which kernels does not exhibit the problem?

The 2.4 series it's ok, I'm gonna try with different 2.5.x kernels to see if i can discover when the bug was introduced

#7 lore raw
Quoted 5 lines · Adolfo González Blázquez

Hi,

Sorry for the delay... I tried 2.5.50 and 2.5.75, and, at least for my machine, everything seems to be perfect. Then i tried every 2.6 kernel. All of them have the same buggy behaviour.

First of all thanks for doing this.

Quoted 39 lines

These are the differences between 2.5.75 and 2.6.0 pdc202xx_old.c (sorry if this is not the correct format, im new here :)

Hope this will help.

Adolfo González

###################################################################

--- linux-2.5.75/drivers/ide/pci/pdc202xx_old.c 2003-07-10
22:15:03.000000000 +0200
+++ linux-2.6.0/drivers/ide/pci/pdc202xx_old.c 2003-12-18
03:59:53.000000000 +0100

(quoted diff) +3 -2
@@ -46,7 +46,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include "ide_modes.h"
 #include "pdc202xx_old.h"
 
 #define PDC202_DEBUG_CABLE	0
@@ -519,13 +518,15 @@
 		} else {
 			goto fast_ata_pio;
 		}
+		return hwif->ide_dma_on(drive);
 	} else if ((id->capability & 8) || (id->field_valid & 2)) {
 fast_ata_pio:
 no_dma_set:
 		hwif->tuneproc(drive, 5);
 		return hwif->ide_dma_off_quietly(drive);
 	}
-	return hwif->ide_dma_on(drive);
+	/* IORDY not supported */
+	return 0;
 }
 
 static int pdc202xx_quirkproc (ide_drive_t *drive)

Review line 755

Quoted 9 lines
(quoted diff) +0 -3
@@ -749,9 +750,6 @@
 	hwif->tuneproc  = &config_chipset_for_pio;
 	hwif->quirkproc = &pdc202xx_quirkproc;
 
-	if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
-		hwif->addressing = (hwif->channel) ? 0 : 1;
-
 	if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
 		hwif->busproc   = &pdc202xx_tristate;
 		hwif->resetproc = &pdc202xx_reset;

In 2.6.0-test5 kernel we allowed LBA48 for PDC20265 (after few people reported that it works okay now) but the same patch is also in 2.4 kernels.

There is one important 2.4 vs 2.6 difference here
- in 2.6 if the drive is using LBA48 we allow up to 1024KiB large requests (you can check if this is a problem by replacing "65536" by "256" in ide-probe.c).

The other likely candidate for breakage is kernel 2.6.0-test2 which contains DMA timeout fixes.

I can make some patches later in the meantime somebody may test 2.6.0-test[1,2,4,5].

Cheers.

Quoted 45 lines
(quoted diff) +1 -1
@@ -928,7 +926,7 @@
 	return 0;
 }
 
-static struct pci_device_id pdc202xx_pci_tbl[] __devinitdata = {
+static struct pci_device_id pdc202xx_pci_tbl[] = {
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID,
 PCI_ANY_ID, 0, 0, 0},
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID,

PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 2},

###################################################################

Quoted 29 lines · Bartlomiej Zolnierkiewicz

Hi,

Any news about this issue?

Quoted 24 lines · you
Quoted 13 lines · Marcelo Tosatti
Quoted 12 lines · Adolfo González Blázquez
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

And which kernels does not exhibit the problem?

The 2.4 series it's ok, I'm gonna try with different 2.5.x kernels to see if i can discover when the bug was introduced

#8 lore raw

These are the errors i get everytime i want to copy a file:

hde: dma_timer_expiry: dma status == 0x60
hde: DMA timeout retry
PDC202XX: Primary channel reset
PDC202XX: Secondary channel reset
hde: timeout waiting for DMA
hde: dma_timer_expiry: dma status == 0x61
hde: DMA timeout error
...

So, i think, it should be related to the changes on dma timeout (2.6.0-test2) you say.

I'm gonna try 2.6.0-test* series, to see what happens...

Gracias!

Quoted 121 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines · Adolfo González Blázquez

Hi,

Sorry for the delay... I tried 2.5.50 and 2.5.75, and, at least for my machine, everything seems to be perfect. Then i tried every 2.6 kernel. All of them have the same buggy behaviour.

First of all thanks for doing this.

Quoted 39 lines

These are the differences between 2.5.75 and 2.6.0 pdc202xx_old.c (sorry if this is not the correct format, im new here :)

Hope this will help.

Adolfo González

###################################################################

--- linux-2.5.75/drivers/ide/pci/pdc202xx_old.c 2003-07-10
22:15:03.000000000 +0200
+++ linux-2.6.0/drivers/ide/pci/pdc202xx_old.c 2003-12-18
03:59:53.000000000 +0100

(quoted diff) +3 -2
@@ -46,7 +46,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include "ide_modes.h"
 #include "pdc202xx_old.h"
 
 #define PDC202_DEBUG_CABLE	0
@@ -519,13 +518,15 @@
 		} else {
 			goto fast_ata_pio;
 		}
+		return hwif->ide_dma_on(drive);
 	} else if ((id->capability & 8) || (id->field_valid & 2)) {
 fast_ata_pio:
 no_dma_set:
 		hwif->tuneproc(drive, 5);
 		return hwif->ide_dma_off_quietly(drive);
 	}
-	return hwif->ide_dma_on(drive);
+	/* IORDY not supported */
+	return 0;
 }
 
 static int pdc202xx_quirkproc (ide_drive_t *drive)

Review line 755

Quoted 9 lines
(quoted diff) +0 -3
@@ -749,9 +750,6 @@
 	hwif->tuneproc  = &config_chipset_for_pio;
 	hwif->quirkproc = &pdc202xx_quirkproc;
 
-	if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
-		hwif->addressing = (hwif->channel) ? 0 : 1;
-
 	if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
 		hwif->busproc   = &pdc202xx_tristate;
 		hwif->resetproc = &pdc202xx_reset;

In 2.6.0-test5 kernel we allowed LBA48 for PDC20265 (after few people reported that it works okay now) but the same patch is also in 2.4 kernels.

There is one important 2.4 vs 2.6 difference here
- in 2.6 if the drive is using LBA48 we allow up to 1024KiB large requests (you can check if this is a problem by replacing "65536" by "256" in ide-probe.c).

The other likely candidate for breakage is kernel 2.6.0-test2 which contains DMA timeout fixes.

I can make some patches later in the meantime somebody may test 2.6.0-test[1,2,4,5].

Cheers.

Quoted 45 lines
(quoted diff) +1 -1
@@ -928,7 +926,7 @@
 	return 0;
 }
 
-static struct pci_device_id pdc202xx_pci_tbl[] __devinitdata = {
+static struct pci_device_id pdc202xx_pci_tbl[] = {
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID,
 PCI_ANY_ID, 0, 0, 0},
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID,

PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 2},

###################################################################

Quoted 29 lines · Bartlomiej Zolnierkiewicz

Hi,

Any news about this issue?

Quoted 24 lines · you
Quoted 13 lines · Marcelo Tosatti
Quoted 12 lines · Adolfo González Blázquez
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

And which kernels does not exhibit the problem?

The 2.4 series it's ok, I'm gonna try with different 2.5.x kernels to see if i can discover when the bug was introduced

#9 lore raw
In reply to Bartlomiej Zolnierkiewicz

Hi again,

The bus was introduced on 2.6.0-test5.
I tried test1, test2, test3, test4. All OK.
Then test5, test6 BUGGY.

Hope this boooring task will help... more than spanish players on eurocup... bad day :(

Quoted 121 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines · Adolfo González Blázquez

Hi,

Sorry for the delay... I tried 2.5.50 and 2.5.75, and, at least for my machine, everything seems to be perfect. Then i tried every 2.6 kernel. All of them have the same buggy behaviour.

First of all thanks for doing this.

Quoted 39 lines

These are the differences between 2.5.75 and 2.6.0 pdc202xx_old.c (sorry if this is not the correct format, im new here :)

Hope this will help.

Adolfo González

###################################################################

--- linux-2.5.75/drivers/ide/pci/pdc202xx_old.c 2003-07-10
22:15:03.000000000 +0200
+++ linux-2.6.0/drivers/ide/pci/pdc202xx_old.c 2003-12-18
03:59:53.000000000 +0100

(quoted diff) +3 -2
@@ -46,7 +46,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include "ide_modes.h"
 #include "pdc202xx_old.h"
 
 #define PDC202_DEBUG_CABLE	0
@@ -519,13 +518,15 @@
 		} else {
 			goto fast_ata_pio;
 		}
+		return hwif->ide_dma_on(drive);
 	} else if ((id->capability & 8) || (id->field_valid & 2)) {
 fast_ata_pio:
 no_dma_set:
 		hwif->tuneproc(drive, 5);
 		return hwif->ide_dma_off_quietly(drive);
 	}
-	return hwif->ide_dma_on(drive);
+	/* IORDY not supported */
+	return 0;
 }
 
 static int pdc202xx_quirkproc (ide_drive_t *drive)

Review line 755

Quoted 9 lines
(quoted diff) +0 -3
@@ -749,9 +750,6 @@
 	hwif->tuneproc  = &config_chipset_for_pio;
 	hwif->quirkproc = &pdc202xx_quirkproc;
 
-	if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
-		hwif->addressing = (hwif->channel) ? 0 : 1;
-
 	if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
 		hwif->busproc   = &pdc202xx_tristate;
 		hwif->resetproc = &pdc202xx_reset;

In 2.6.0-test5 kernel we allowed LBA48 for PDC20265 (after few people reported that it works okay now) but the same patch is also in 2.4 kernels.

There is one important 2.4 vs 2.6 difference here
- in 2.6 if the drive is using LBA48 we allow up to 1024KiB large requests (you can check if this is a problem by replacing "65536" by "256" in ide-probe.c).

The other likely candidate for breakage is kernel 2.6.0-test2 which contains DMA timeout fixes.

I can make some patches later in the meantime somebody may test 2.6.0-test[1,2,4,5].

Cheers.

Quoted 45 lines
(quoted diff) +1 -1
@@ -928,7 +926,7 @@
 	return 0;
 }
 
-static struct pci_device_id pdc202xx_pci_tbl[] __devinitdata = {
+static struct pci_device_id pdc202xx_pci_tbl[] = {
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID,
 PCI_ANY_ID, 0, 0, 0},
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID,

PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 2},

###################################################################

Quoted 29 lines · Bartlomiej Zolnierkiewicz

Hi,

Any news about this issue?

Quoted 24 lines · you
Quoted 13 lines · Marcelo Tosatti
Quoted 12 lines · Adolfo González Blázquez
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

And which kernels does not exhibit the problem?

The 2.4 series it's ok, I'm gonna try with different 2.5.x kernels to see if i can discover when the bug was introduced

#10 lore raw
In reply to Bartlomiej Zolnierkiewicz

Well, it seems that problem is solved! I'm now using 2.6.7 without problems. Got same perfomance on hard disks as with 2.4.x series.

Disabling LBA48 for pdc20265 just made it work. This is the simple patch I applied:

diff --unified --recursive --new-file linux-2.6.7/drivers/ide/pci/pdc202xx_old.c linux/drivers/ide/pci/pdc202xx_old.c
--- linux-2.6.7/drivers/ide/pci/pdc202xx_old.c 2004-06-16 07:20:17.000000000 +0200
+++ linux/drivers/ide/pci/pdc202xx_old.c 2004-06-21
02:53:33.000000000 +0200
@@ -721,6 +721,10 @@

        hwif->tuneproc  = &config_chipset_for_pio;
        hwif->quirkproc = &pdc202xx_quirkproc;

+ /* This was present on 2.6.0-test4, maybe here is the bug */
+ if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
+ hwif->no_lba48 = (hwif->channel) ? 0 : 1;
+

        if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
                hwif->busproc   = &pdc202xx_tristate;
                hwif->resetproc = &pdc202xx_reset;

One example about perfomance:

fito@soho:~$ uname -a
Linux soho 2.6.7-soho #1 Mon Jun 21 03:01:22 CEST 2004 i686 GNU/Linux
fito@soho:~$ time cp /win/Backup/Linux\
Downloads/Isos/yarrow-i386-disc3.iso .
real    0m36.771s
user    0m0.166s
sys     0m9.635s
fito@soho:~$ uname -a
Linux soho 2.4.25-soho #1 jue mar 18 16:30:49 CET 2004 i686 GNU/Linux
fito@soho:~$ time cp /win/Backup/Linux\
Downloads/Isos/yarrow-i386-disc3.iso .
real    0m41.789s
user    0m0.240s
sys     0m7.230s

Hope this patch help!!

Adolfo González Blázquez

PD: I know this is not the "standard" way to send patches, but i'm new to linux and don't now the correct way...

Quoted 121 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines · Adolfo González Blázquez

Hi,

Sorry for the delay... I tried 2.5.50 and 2.5.75, and, at least for my machine, everything seems to be perfect. Then i tried every 2.6 kernel. All of them have the same buggy behaviour.

First of all thanks for doing this.

Quoted 39 lines

These are the differences between 2.5.75 and 2.6.0 pdc202xx_old.c (sorry if this is not the correct format, im new here :)

Hope this will help.

Adolfo González

###################################################################

--- linux-2.5.75/drivers/ide/pci/pdc202xx_old.c 2003-07-10
22:15:03.000000000 +0200
+++ linux-2.6.0/drivers/ide/pci/pdc202xx_old.c 2003-12-18
03:59:53.000000000 +0100

(quoted diff) +3 -2
@@ -46,7 +46,6 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include "ide_modes.h"
 #include "pdc202xx_old.h"
 
 #define PDC202_DEBUG_CABLE	0
@@ -519,13 +518,15 @@
 		} else {
 			goto fast_ata_pio;
 		}
+		return hwif->ide_dma_on(drive);
 	} else if ((id->capability & 8) || (id->field_valid & 2)) {
 fast_ata_pio:
 no_dma_set:
 		hwif->tuneproc(drive, 5);
 		return hwif->ide_dma_off_quietly(drive);
 	}
-	return hwif->ide_dma_on(drive);
+	/* IORDY not supported */
+	return 0;
 }
 
 static int pdc202xx_quirkproc (ide_drive_t *drive)

Review line 755

Quoted 9 lines
(quoted diff) +0 -3
@@ -749,9 +750,6 @@
 	hwif->tuneproc  = &config_chipset_for_pio;
 	hwif->quirkproc = &pdc202xx_quirkproc;
 
-	if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
-		hwif->addressing = (hwif->channel) ? 0 : 1;
-
 	if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
 		hwif->busproc   = &pdc202xx_tristate;
 		hwif->resetproc = &pdc202xx_reset;

In 2.6.0-test5 kernel we allowed LBA48 for PDC20265 (after few people reported that it works okay now) but the same patch is also in 2.4 kernels.

There is one important 2.4 vs 2.6 difference here
- in 2.6 if the drive is using LBA48 we allow up to 1024KiB large requests (you can check if this is a problem by replacing "65536" by "256" in ide-probe.c).

The other likely candidate for breakage is kernel 2.6.0-test2 which contains DMA timeout fixes.

I can make some patches later in the meantime somebody may test 2.6.0-test[1,2,4,5].

Cheers.

Quoted 45 lines
(quoted diff) +1 -1
@@ -928,7 +926,7 @@
 	return 0;
 }
 
-static struct pci_device_id pdc202xx_pci_tbl[] __devinitdata = {
+static struct pci_device_id pdc202xx_pci_tbl[] = {
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID,
 PCI_ANY_ID, 0, 0, 0},
 	{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID,

PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 2},

###################################################################

Quoted 29 lines · Bartlomiej Zolnierkiewicz

Hi,

Any news about this issue?

Quoted 24 lines · you
Quoted 13 lines · Marcelo Tosatti
Quoted 12 lines · Adolfo González Blázquez
Quoted 11 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Adolfo González Blázquez

Hi!

Hi,

Quoted 5 lines

Lot of users are reporting seriour problems with pdc202xx_old ide pci driver. Enabling DMA on any device related with this driver makes the system unusable.

This seems to happen in all the 2.6.x kernel series.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Doing binary search on 2.4->2.6 kernels would help greatly (narrowing problem to a specific kernel versions).

If it helps, I tried 2.6.2, 2.6.4, 2.6.5, and 2.6.7-rc3, and all have the bug.

And which kernels does not exhibit the problem?

The 2.4 series it's ok, I'm gonna try with different 2.5.x kernels to see if i can discover when the bug was introduced

#11 lore raw
Quoted 5 lines · On Mon, 21 Jun 2004, Adolfo [ISO-8859-1] González Blázquez wrote:

Well, it seems that problem is solved! I'm now using 2.6.7 without problems. Got same perfomance on hard disks as with 2.4.x series.

Disabling LBA48 for pdc20265 just made it work. This is the simple patch I applied:

OK, thanks. It works but similar patch went into 2.4.23 and you are using 2.4.25 without a problems. Can you try this patch instead?

drivers/ide/ide-probe.c +1 -1
@@ -897,7 +897,7 @@
 	blk_queue_segment_boundary(q, 0xffff);
 
 	if (!hwif->rqsize)
-		hwif->rqsize = hwif->no_lba48 ? 256 : 65536;
+		hwif->rqsize = 256;
 	if (hwif->rqsize < max_sectors)
 		max_sectors = hwif->rqsize;
 	blk_queue_max_sectors(q, max_sectors);
Quoted 18 lines

diff --unified --recursive --new-file linux-2.6.7/drivers/ide/pci/pdc202xx_old.c linux/drivers/ide/pci/pdc202xx_old.c
--- linux-2.6.7/drivers/ide/pci/pdc202xx_old.c 2004-06-16 07:20:17.000000000 +0200
+++ linux/drivers/ide/pci/pdc202xx_old.c 2004-06-21
02:53:33.000000000 +0200

(quoted diff) +4 -0
@@ -721,6 +721,10 @@
        hwif->tuneproc  = &config_chipset_for_pio;
        hwif->quirkproc = &pdc202xx_quirkproc;
 
+       /* This was present on 2.6.0-test4, maybe here is the bug */
+       if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
+               hwif->no_lba48 = (hwif->channel) ? 0 : 1;
+
        if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
                hwif->busproc   = &pdc202xx_tristate;
                hwif->resetproc = &pdc202xx_reset;
#12 lore raw

Your patch works perfect! I hope this is the end of this issue.

Maybe you can answer other question i have about pdc202xx_old driver. Altough the pdc bios shows it is on mode udma5, /proc/ide/pdc202xx shows the controller is on dma mode UDMA4. hdparm shows disks are on udma5. This is a bug or is normal behaviour?

Thanks again for your help!!

This is what proc says about pdc202xx:

fito@soho:~$ cat /proc/ide/pdc202xx 

Ultra100 on M/B Chipset.
------------------------------- General Status
---------------------------------

Burst Mode                           : enabled
Host Mode                            : Normal
Bus Clocking                         : 66 External
IO pad select                        : 10 mA
Status Polling Period                : 0

Interrupt Check Status Polling Delay : 0 --------------- Primary Channel ---------------- Secondary Channel
-------------
enabled enabled
66 Clocking disabled disabled
Mode PCI Mode PCI
FIFO Empty FIFO Empty
--------------- drive0 --------- drive1 -------- drive0 ---------- drive1 ------

DMA enabled:    yes              yes             no                no 
DMA Mode:       UDMA 4           UDMA 4          NOTSET           

NOTSET
PIO Mode: PIO 4 PIO 4 NOTSET
NOTSET

Quoted 46 lines · Bartlomiej Zolnierkiewicz
Quoted 5 lines · On Mon, 21 Jun 2004, Adolfo [ISO-8859-1] González Blázquez wrote:

Well, it seems that problem is solved! I'm now using 2.6.7 without problems. Got same perfomance on hard disks as with 2.4.x series.

Disabling LBA48 for pdc20265 just made it work. This is the simple patch I applied:

OK, thanks. It works but similar patch went into 2.4.23 and you are using 2.4.25 without a problems. Can you try this patch instead?

drivers/ide/ide-probe.c +1 -1
@@ -897,7 +897,7 @@
 	blk_queue_segment_boundary(q, 0xffff);
 
 	if (!hwif->rqsize)
-		hwif->rqsize = hwif->no_lba48 ? 256 : 65536;
+		hwif->rqsize = 256;
 	if (hwif->rqsize < max_sectors)
 		max_sectors = hwif->rqsize;
 	blk_queue_max_sectors(q, max_sectors);
Quoted 9 lines

diff --unified --recursive --new-file linux-2.6.7/drivers/ide/pci/pdc202xx_old.c linux/drivers/ide/pci/pdc202xx_old.c
--- linux-2.6.7/drivers/ide/pci/pdc202xx_old.c 2004-06-16 07:20:17.000000000 +0200
+++ linux/drivers/ide/pci/pdc202xx_old.c 2004-06-21
02:53:33.000000000 +0200

Review line 730

Quoted 10 lines
(quoted diff) +4 -0
@@ -721,6 +721,10 @@
        hwif->tuneproc  = &config_chipset_for_pio;
        hwif->quirkproc = &pdc202xx_quirkproc;
 
+       /* This was present on 2.6.0-test4, maybe here is the bug */
+       if (hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20265)
+               hwif->no_lba48 = (hwif->channel) ? 0 : 1;
+
        if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) {
                hwif->busproc   = &pdc202xx_tristate;
                hwif->resetproc = &pdc202xx_reset;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/