linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: How to Force PIO mode on sata promise (Linux 2.6.10)
@ 2005-09-22  8:03 David Sanchez
  2005-09-22 16:09 ` Chris Wedgwood
  2005-09-22 16:36 ` Bill Davidsen
  0 siblings, 2 replies; 12+ messages in thread
From: David Sanchez @ 2005-09-22  8:03 UTC (permalink / raw)
  To: Chris Wedgwood; +Cc: Jeff Garzik, linux-kernel

Hi Chris,
It was a good idea but it doesn't resolve the problem...

I add my card into the dma_black_list of the libata to force DMA disabled and the problem seems to no more appear...maybe PIO is so slow that the data has no time to be corrupted...
But I can NOT affirm that the problem is the DMA. 

I try the linux kernel 2.4,2.6.11, 2.6.12 and 2.6.13. More I try 2 different toolchains and the problem persists...

Another idea??

Thanks,

David

-----Message d'origine-----
De : linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] De la part de Chris Wedgwood
Envoyé : jeudi 22 septembre 2005 05:00
À : David Sanchez
Cc : Jeff Garzik; linux-kernel@vger.kernel.org
Objet : Re: How to Force PIO mode on sata promise (Linux 2.6.10)

On Wed, Sep 21, 2005 at 02:28:02PM +0200, David Sanchez wrote:

> I'm using the linux kernel 2.6.10 and busybox on an AMD db AU1550
> with a hdd connected to the pata port of a PCI card (Promise
> PDC20579).

Disable prefetch in lib/memcpy.S and see if that helps.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-22  8:03 How to Force PIO mode on sata promise (Linux 2.6.10) David Sanchez
@ 2005-09-22 16:09 ` Chris Wedgwood
  2005-09-22 16:36 ` Bill Davidsen
  1 sibling, 0 replies; 12+ messages in thread
From: Chris Wedgwood @ 2005-09-22 16:09 UTC (permalink / raw)
  To: David Sanchez; +Cc: Jeff Garzik, linux-kernel

On Thu, Sep 22, 2005 at 10:03:10AM +0200, David Sanchez wrote:

> I add my card into the dma_black_list of the libata to force DMA
> disabled and the problem seems to no more appear...maybe PIO is so
> slow that the data has no time to be corrupted...  But I can NOT
> affirm that the problem is the DMA.

> I try the linux kernel 2.4,2.6.11, 2.6.12 and 2.6.13. More I try 2
> different toolchains and the problem persists...

I doubt any of those will help.  It sounds like a driver bug wrt to
non-coherent PCI.  Presumably this will also hit sparc people if they
use this hardware and some PPC too.

Does the driver use the *dma_sync* API(s)?  You might want to read
over Documentation/DMA-API.txt and see if the driver is doing the
right things.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-22  8:03 How to Force PIO mode on sata promise (Linux 2.6.10) David Sanchez
  2005-09-22 16:09 ` Chris Wedgwood
@ 2005-09-22 16:36 ` Bill Davidsen
  1 sibling, 0 replies; 12+ messages in thread
From: Bill Davidsen @ 2005-09-22 16:36 UTC (permalink / raw)
  To: David Sanchez; +Cc: Jeff Garzik, linux-kernel

David Sanchez wrote:
> Hi Chris,
> It was a good idea but it doesn't resolve the problem...
> 
> I add my card into the dma_black_list of the libata to force DMA disabled and the problem seems to no more appear...maybe PIO is so slow that the data has no time to be corrupted...
> But I can NOT affirm that the problem is the DMA. 
> 
> I try the linux kernel 2.4,2.6.11, 2.6.12 and 2.6.13. More I try 2 different toolchains and the problem persists...
> 
> Another idea??

You disable DMA and the problem goes away, that seems to point to DMA as 
the problem, and since others aren't having the same problem with the 
DMA code in the kernel it certainly suggests the DMA hardware really is 
the problem, or is causing it. It's remotely possible that the kernel 
has a bug in the code just for your controller, although unlikely.

Have you run memtest86 on your memory? I have seen cases where memory 
was marginal and using CPU and DMA was enough to cause it to fail, but 
only when people had played with the memory timing in the BIOS. I 
suspect the SATA disk has a higher datarate than anything else in your 
system, so it could trigger some marginal cases in the memory system. 
Unlikely, but possible.

ideas:
   test your memory if you haven't
   Check that your BIOS is up-to-date
   check your BIOS memory timing settings
   See if the controller came with tools to adjust DMA timing
   try writing to a PATA drive while reading from the SATA
     to generate high DMA rate, look for corruption there
   try another controller of the same type
   try another controler of another supported type
     to see that it's not your drive
   accept that your controller *belongs* on the blacklist

Since you asked for ideas, these are probably in order of easy to difficult.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-23  8:34 David Sanchez
@ 2005-09-23  9:47 ` Clemens Koller
  0 siblings, 0 replies; 12+ messages in thread
From: Clemens Koller @ 2005-09-23  9:47 UTC (permalink / raw)
  To: David Sanchez; +Cc: linux-kernel

Hello, David!

David Sanchez wrote:
> I've reduced the UDMA level step by step until the problem seems disappeared.
> Finally with UDMA/25 I don't detect error after 1000 copies. I consider that this solution corrects the symptom but not the cause...

Hmm, no luck for you, today?
Have you possibilities to check the signal integrity in your design?
Did you play some of the electrical engineering tricks to see if things
are changing? (change some terminations, temperature, voltages)

> My embedded system:
> 	* AMD Development Board AU1550 (mips32) + hdd connected to the pata port of the Promise PDC20579 controller.
> 	* Kernel2.6.10 + libata patch + busybox 1.0

Well, what about getting a datasheet of the PDC, one of the latest kernels and
start to debug that thing down to the silicon?

There is a person called Ed Huang (Sales and Marketing Div.) at Promise
in Taiwan where we got our datasheets and reference designs for our embedded
project. Unfortunately, you need to sign a NDA. But beside that, the support
is pretty okay. (I just send you the contact in private email).

Best greets,

-- 
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: How to Force PIO mode on sata promise (Linux 2.6.10)
@ 2005-09-23  8:34 David Sanchez
  2005-09-23  9:47 ` Clemens Koller
  0 siblings, 1 reply; 12+ messages in thread
From: David Sanchez @ 2005-09-23  8:34 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Jeff Garzik, linux-kernel

Hi Bill,

I've reduced the UDMA level step by step until the problem seems disappeared.
Finally with UDMA/25 I don't detect error after 1000 copies. I consider that this solution corrects the symptom but not the cause...

I try memtest for mips arch and all is ok.
I try 3 promise controllers: the problem was NOT resolved.
I try more than 4 kind of disk: the problem was NOT resolved.
I try to connect the disk on the pata port and on the sata port: the problem was NOT resolved.
More when I connect the disk to the IDE interface, it doesn't work at all (maybe bad driver implementation)...

David

My embedded system:
	* AMD Development Board AU1550 (mips32) + hdd connected to the pata port of the Promise PDC20579 controller.
	* Kernel2.6.10 + libata patch + busybox 1.0


-----Message d'origine-----
De : linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-owner@vger.kernel.org] De la part de Bill Davidsen
Envoyé : jeudi 22 septembre 2005 18:45
À : David Sanchez
Cc : Jeff Garzik; linux-kernel@vger.kernel.org
Objet : Re: How to Force PIO mode on sata promise (Linux 2.6.10)

David Sanchez wrote:
> Hi Chris,
> It was a good idea but it doesn't resolve the problem...
> 
> I add my card into the dma_black_list of the libata to force DMA disabled and the problem seems to no more appear...maybe PIO is so slow that the data has no time to be corrupted...
> But I can NOT affirm that the problem is the DMA. 
> 
> I try the linux kernel 2.4,2.6.11, 2.6.12 and 2.6.13. More I try 2 different toolchains and the problem persists...
> 
> Another idea??

You disable DMA and the problem goes away, that seems to point to DMA as 
the problem, and since others aren't having the same problem with the 
DMA code in the kernel it certainly suggests the DMA hardware really is 
the problem, or is causing it. It's remotely possible that the kernel 
has a bug in the code just for your controller, although unlikely.

Have you run memtest86 on your memory? I have seen cases where memory 
was marginal and using CPU and DMA was enough to cause it to fail, but 
only when people had played with the memory timing in the BIOS. I 
suspect the SATA disk has a higher datarate than anything else in your 
system, so it could trigger some marginal cases in the memory system. 
Unlikely, but possible.

ideas:
   test your memory if you haven't
   Check that your BIOS is up-to-date
   check your BIOS memory timing settings
   See if the controller came with tools to adjust DMA timing
   try writing to a PATA drive while reading from the SATA
     to generate high DMA rate, look for corruption there
   try another controller of the same type
   try another controler of another supported type
     to see that it's not your drive
   accept that your controller *belongs* on the blacklist

Since you asked for ideas, these are probably in order of easy to difficult.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-21 14:48 David Sanchez
@ 2005-09-22  9:04 ` Clemens Koller
  0 siblings, 0 replies; 12+ messages in thread
From: Clemens Koller @ 2005-09-22  9:04 UTC (permalink / raw)
  To: David Sanchez; +Cc: linux-kernel

Hello, David!

David Sanchez wrote:
> How did you disabled the DMA ?

Have you seen my .config file?
(Remember that it's all PATA I'm talking about, YMMV!)

I think it is
CONFIG_IDEDMA_PCI_AUTO=n
while
CONFIG_BLK_DEV_IDEDMA_PCI=y
And I am using the
BLK_DEV_PDC202XX_NEW=y

One of the options there made it working...
It's pretty lame (<10MByte/sec) but thats
fine for now (just a test system).

The HDD is a a Maxtor DiamondMax 10, 120GB
(6B120P0), usually pretty fast.

Best greets,
-- 
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-21 12:28 David Sanchez
  2005-09-21 14:02 ` Clemens Koller
@ 2005-09-22  3:01 ` Chris Wedgwood
  1 sibling, 0 replies; 12+ messages in thread
From: Chris Wedgwood @ 2005-09-22  3:01 UTC (permalink / raw)
  To: David Sanchez; +Cc: Jeff Garzik, linux-kernel

On Wed, Sep 21, 2005 at 02:28:02PM +0200, David Sanchez wrote:

> I'm using the linux kernel 2.6.10 and busybox on an AMD db AU1550
> with a hdd connected to the pata port of a PCI card (Promise
> PDC20579).

Disable prefetch in lib/memcpy.S and see if that helps.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: How to Force PIO mode on sata promise (Linux 2.6.10)
@ 2005-09-21 14:48 David Sanchez
  2005-09-22  9:04 ` Clemens Koller
  0 siblings, 1 reply; 12+ messages in thread
From: David Sanchez @ 2005-09-21 14:48 UTC (permalink / raw)
  To: Clemens Koller; +Cc: Jeff Garzik, linux-kernel

Hi Clemens,

How did you disabled the DMA ?

David 

-----Message d'origine-----
De : Clemens Koller [mailto:clemens.koller@anagramm.de] 
Envoyé : mercredi 21 septembre 2005 16:15
À : David Sanchez
Cc : Jeff Garzik; linux-kernel@vger.kernel.org
Objet : Re: How to Force PIO mode on sata promise (Linux 2.6.10)

Hello, David, Jeff!

> I'm using the linux kernel 2.6.10 and busybox on an AMD db AU1550 with a
> hdd connected to the pata port of a PCI card (Promise PDC20579).

I'm using a PDC20269 (on Promise Ultra133TX2 card) w/ DMA disabled on
an embedded ppc (MPC8540). I cannot use DMA, too.
I guess it's a PCI IRQ/REQ/GNT problem on my board.
With DMA disabled I haven't had any problems on my system.
I am going to use a PDC20275 in the future.

My .config of a linux-2.6.13-rc7 is attached.

And... I know other guys with similar problems on embedded environments.
Unfortunately I wasn't able to have a closer look at this problem yet.

Best greets,

-- 
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-21 12:28 David Sanchez
@ 2005-09-21 14:02 ` Clemens Koller
  2005-09-22  3:01 ` Chris Wedgwood
  1 sibling, 0 replies; 12+ messages in thread
From: Clemens Koller @ 2005-09-21 14:02 UTC (permalink / raw)
  To: David Sanchez; +Cc: Jeff Garzik, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

Hello, David, Jeff!

> I'm using the linux kernel 2.6.10 and busybox on an AMD db AU1550 with a
> hdd connected to the pata port of a PCI card (Promise PDC20579).

I'm using a PDC20269 (on Promise Ultra133TX2 card) w/ DMA disabled on
an embedded ppc (MPC8540). I cannot use DMA, too.
I guess it's a PCI IRQ/REQ/GNT problem on my board.
With DMA disabled I haven't had any problems on my system.
I am going to use a PDC20275 in the future.

My .config of a linux-2.6.13-rc7 is attached.

And... I know other guys with similar problems on embedded environments.
Unfortunately I wasn't able to have a closer look at this problem yet.

Best greets,

-- 
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 5090 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: How to Force PIO mode on sata promise (Linux 2.6.10)
@ 2005-09-21 12:28 David Sanchez
  2005-09-21 14:02 ` Clemens Koller
  2005-09-22  3:01 ` Chris Wedgwood
  0 siblings, 2 replies; 12+ messages in thread
From: David Sanchez @ 2005-09-21 12:28 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel

Hi,

I'm using the linux kernel 2.6.10 and busybox on an AMD db AU1550 with a hdd connected to the pata port of a PCI card (Promise PDC20579).

I've got file copy corruption on big files (around 500MB). I made some investigations and I found that sometimes the read(fd,4096) function returns unexpected data and sometimes after a write(fd,4096) function, the data on disk is not the data send in the write() function... 

Maybe a hw bug ? A hw or sw DMA transfer bug ? or anything else... I need to known what happens so I try everything...

Any idea on my problem Jeff ?

David 

Note: I've connected a hdd through the ide interface in PIO mode and my problem seems to not appear. But when I enable DMA, I've got a lot of error messages. In other word, the DMA doesn't work (as it is wrote in the HELP of the option in the kernel) with the ide interface.

-----Message d'origine-----
De : Jeff Garzik [mailto:jgarzik@pobox.com] 
Envoyé : mercredi 21 septembre 2005 14:01
À : David Sanchez
Cc : linux-kernel@vger.kernel.org
Objet : Re: How to Force PIO mode on sata promise (Linux 2.6.10)

David Sanchez wrote:
> I'm using the Linux kernel 2.6.10 on a DBAU1550 and I would like to
> force PIO mode (and thus disable DMA) on my sata promise TX2.
> How can I do that ?

Why do you wish to do this?

	Jeff









^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to Force PIO mode on sata promise (Linux 2.6.10)
  2005-09-21  7:34 David Sanchez
@ 2005-09-21 11:46 ` Jeff Garzik
  0 siblings, 0 replies; 12+ messages in thread
From: Jeff Garzik @ 2005-09-21 11:46 UTC (permalink / raw)
  To: David Sanchez; +Cc: linux-kernel

David Sanchez wrote:
> I'm using the Linux kernel 2.6.10 on a DBAU1550 and I would like to
> force PIO mode (and thus disable DMA) on my sata promise TX2.
> How can I do that ?

Why do you wish to do this?

	Jeff




^ permalink raw reply	[flat|nested] 12+ messages in thread

* How to Force PIO mode on sata promise (Linux 2.6.10)
@ 2005-09-21  7:34 David Sanchez
  2005-09-21 11:46 ` Jeff Garzik
  0 siblings, 1 reply; 12+ messages in thread
From: David Sanchez @ 2005-09-21  7:34 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm using the Linux kernel 2.6.10 on a DBAU1550 and I would like to
force PIO mode (and thus disable DMA) on my sata promise TX2.
How can I do that ?

Thanks

David


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-09-23  9:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-22  8:03 How to Force PIO mode on sata promise (Linux 2.6.10) David Sanchez
2005-09-22 16:09 ` Chris Wedgwood
2005-09-22 16:36 ` Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2005-09-23  8:34 David Sanchez
2005-09-23  9:47 ` Clemens Koller
2005-09-21 14:48 David Sanchez
2005-09-22  9:04 ` Clemens Koller
2005-09-21 12:28 David Sanchez
2005-09-21 14:02 ` Clemens Koller
2005-09-22  3:01 ` Chris Wedgwood
2005-09-21  7:34 David Sanchez
2005-09-21 11:46 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).