RE: [PATCH]: [MPC5200] Add ATA DMA support

12 messages, 5 authors, 2008-11-11 · open the first message on its own page

RE: [PATCH]: [MPC5200] Add ATA DMA support

From: Daniel Schnell <hidden>
Date: 2008-08-12 17:30:44

Hi Tim,

Continuing the discussion on the mailing list ...


Looking at the original patch I don't undestand why you had to duplicate
the bestcomm data structures and functions. The only apparent difference
is that you have a minimal data length of 2 bytes instead of 1. Does
this make any difference as the bd_size will be filled with the correct
length value anyway ?

Moreover what is the difference between bcom_submit_next_buffer() and
bcom_submit_next_buffer2() ? The same with bcom_retrieve_buffer() and
bcom_retrieve_buffer2(). Why are these functions implemented unequally ?


Best regards,

Daniel Schnell.

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Tim Yamin <hidden>
Date: 2008-08-13 05:57:40

On Tue, Aug 12, 2008 at 6:30 PM, Daniel Schnell
[off-list ref] wrote:
Hi Tim,

Continuing the discussion on the mailing list ...

Looking at the original patch I don't undestand why you had to duplicate
the bestcomm data structures and functions. The only apparent difference
is that you have a minimal data length of 2 bytes instead of 1. Does
this make any difference as the bd_size will be filled with the correct
length value anyway ?
The "new" version of the patch does this the correct way. I just
haven't back ported this to the 2.6.24 version that I sent you.

Tim

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Grant Likely <hidden>
Date: 2008-08-13 06:02:03

On Tue, Aug 12, 2008 at 11:57 PM, Tim Yamin [off-list ref] wrote:
On Tue, Aug 12, 2008 at 6:30 PM, Daniel Schnell
[off-list ref] wrote:
quoted
Hi Tim,

Continuing the discussion on the mailing list ...

Looking at the original patch I don't undestand why you had to duplicate
the bestcomm data structures and functions. The only apparent difference
is that you have a minimal data length of 2 bytes instead of 1. Does
this make any difference as the bd_size will be filled with the correct
length value anyway ?
The "new" version of the patch does this the correct way. I just
haven't back ported this to the 2.6.24 version that I sent you.
While on this topic; have you had a chance to address the comments you
received on v2 of your patch?  I'm keen to get your change merged in,
but there are a few more things that need to be sorted out.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Tim Yamin <hidden>
Date: 2008-08-13 06:06:28

On Wed, Aug 13, 2008 at 7:02 AM, Grant Likely [off-list ref] wrote:
While on this topic; have you had a chance to address the comments you
received on v2 of your patch?  I'm keen to get your change merged in,
but there are a few more things that need to be sorted out.
I'm still trying to determine whether the locking stuff is needed or
not. I think ultimately it might be a bug caused by hardware problems
at this end as opposed to silicon problems affecting everybody, but I
won't have an answer regarding this for a while because new hardware
needs to be prototyped to test out this theory.

I think the patch can probably be resubmitted with the locking stuff
removed, and the driver can be marked as experimental for everybody to
try out: if people experience any corruption problems I'm sure they
can speak up :-)

Any objections?

Tim

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Grant Likely <hidden>
Date: 2008-08-13 06:11:39

On Wed, Aug 13, 2008 at 07:06:27AM +0100, Tim Yamin wrote:
On Wed, Aug 13, 2008 at 7:02 AM, Grant Likely [off-list ref] wrote:
quoted
While on this topic; have you had a chance to address the comments you
received on v2 of your patch?  I'm keen to get your change merged in,
but there are a few more things that need to be sorted out.
I'm still trying to determine whether the locking stuff is needed or
not. I think ultimately it might be a bug caused by hardware problems
at this end as opposed to silicon problems affecting everybody, but I
won't have an answer regarding this for a while because new hardware
needs to be prototyped to test out this theory.

I think the patch can probably be resubmitted with the locking stuff
removed, and the driver can be marked as experimental for everybody to
try out: if people experience any corruption problems I'm sure they
can speak up :-)

Any objections?
Sounds good to me.  You will get more testers that way.  I can pick it
up for -next if everything else looks good.

g.

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Tim Yamin <hidden>
Date: 2008-08-13 09:07:05

On Wed, Aug 13, 2008 at 7:11 AM, Grant Likely [off-list ref] wrote:
Sounds good to me.  You will get more testers that way.  I can pick it
up for -next if everything else looks good.
Here are the new patches; tested against 2.6.27-rc3.

Thanks,

Tim

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Grant Likely <hidden>
Date: 2008-09-15 05:54:25

On Wed, Aug 13, 2008 at 3:07 AM, Tim Yamin [off-list ref] wrote:
On Wed, Aug 13, 2008 at 7:11 AM, Grant Likely [off-list ref] wrote:
quoted
Sounds good to me.  You will get more testers that way.  I can pick it
up for -next if everything else looks good.
Here are the new patches; tested against 2.6.27-rc3.
Hi Tim,

I finally got a chance to try out your patches on my lite5200 board.
Unfortunately, I wasn't able to get it to work easily.  I'm very early
in the debugging this issue, but I thought I'd send you my results in
case you've seen it before.  I've tried this with both an STEC 1GB CF
and a Transcend Ultra industrial 1GB CF card.

When the patch is enabled, Linux boots to the point of probing the ATA
bus.  The first attempt to probe uses UDMA/33 which ends in a timeout.
 Second attempt limits it to UDMA/25 which also times out.  Third
attempt falls back to PIO4 mode which then succeeds and the boot
process continues.  I haven't dug into the details of MPC5200 UDMA
support yet, but I'd like to know if you have any ideas.

Cheers,
g.

Full boot log below:

U-Boot 1.3.4-rc2 (Aug  1 2008 - 14:11:20)

CPU:   MPC5200B v2.2, Core v1.4 at 462 MHz
       Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
Board: Freescale Lite5200B
I2C:   85 kHz, ready
DRAM:  256 MB
FLASH: 32 MB
PCI:   Bus Dev VenId DevId Class Int
        00  1a  1057  5809  0680  00
In:    serial
Out:   serial
Err:   serial
Net:   FEC ETHERNET
IDE:   Bus 0: OK
  Device 0: Model: TRANSCEND Firm: 20070418 Ser#: 0           521143E8
            Type: Hard Disk
            Capacity: 971.5 MB = 0.9 GB (1989792 x 512)
  Device 1: Model:  Firm:  Ser#:

209 more lines

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Matt Sealey <hidden>
Date: 2008-10-29 15:34:22


Grant Likely wrote:
On Wed, Aug 13, 2008 at 3:07 AM, Tim Yamin [off-list ref] wrote:
quoted
On Wed, Aug 13, 2008 at 7:11 AM, Grant Likely [off-list ref] wrote:
quoted
Sounds good to me.  You will get more testers that way.  I can pick it
up for -next if everything else looks good.
Here are the new patches; tested against 2.6.27-rc3.
Hi Tim,

I finally got a chance to try out your patches on my lite5200 board.
Unfortunately, I wasn't able to get it to work easily.  I'm very early
in the debugging this issue, but I thought I'd send you my results in
case you've seen it before.  I've tried this with both an STEC 1GB CF
and a Transcend Ultra industrial 1GB CF card.
[snip]

Grant, Tim,

Any chance of this being picked up even though it "doesn't work"?

I'm going to be rolling a couple kernels this weekend (2.6.27.4
for Efika, ADS512101, 8610HPCN and 8641DHPCD) and I'll patch this
in and see what happens and give some more test data (since my
Efika is nice and trashed it won't matter if I trash it some
more).

We at Genesi still hold by the fact that ATA DMA is irrevocably
broken but hold some bittersweet hope that Freescale might fix
it after the fact in some useless future revision, the biggest
problem is that if nobody writes a driver for it, nobody experiences
the problem!

Once the patch is in maybe someone will be willing to use the
BestComm-assisted PIO idea as implemented in the bplan 2.6.19
kernel and compare results?

-- 
Matt Sealey [off-list ref]
Genesi, Manager, Developer Relations

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Lehmann, Hans (Ritter Elektronik) <hidden>
Date: 2008-11-11 14:19:29

Tim, Grant,

I have tested the patch on our MPC5200B based board with Kingston Elite =
Pro CF-card and it worked fine with DMA2. I have port the patch back to =
2.6.24.7 Kernel and I can't detect problems our errors, even with big =
files (40 mB) over FEC wich I save to card . We get performance up to =
10,5mB/s which is near to the max. speed.

Greetings




Mit freundlichen Gr=FC=DFen

Hans Lehmann
Softwareentwicklung

Telefon	+49 (0)2191-67-2520
Fax 	+49 (0)2191-67-703408
e-mail 	hans.lehmann@ritter-elektronik.de



Ritter Elektronik GmbH
Leverkuser Stra=DFe 65
D-42897 Remscheid
www.ritter-elektronik.de

Gesch=E4ftsf=FChrer: Manfred A. Wagner, Dr. Uwe Baader
Sitz der Gesellschaft: Oberhausen
HRB 17168 Duisburg  /  USt-ID DE 814009849


-----Urspr=FCngliche Nachricht-----
Von: linuxppc-dev-bounces+hans.lehmann=3Dritter-elektronik.de@ozlabs.org =
[mailto:linuxppc-dev-bounces+hans.lehmann=3Dritter-elektronik.de@ozlabs.o=
rg] Im Auftrag von Tim Yamin
Gesendet: Mittwoch, 13. August 2008 11:07
An: Grant Likely

5 more lines

Sounds good to me.  You will get more testers that way.  I can pick it =
up for -next if everything else looks good.
Here are the new patches; tested against 2.6.27-rc3.

Thanks,

Tim

Re: [PATCH]: [MPC5200] Add ATA DMA support

From: Matt Sealey <hidden>
Date: 2008-11-11 14:36:02

Oddly I built 2.6.27.2 with the patch and the Efika "waited" for a disk to appear
and didn't get anywhere. If I set libata.dma=0 then it complained about missing
symbols (but not with it enabled!).

This was a clean SUSE kernel from Factory, with only the ATA patch applied with
a few hand-merges (pata_mpc52xx.c has had a line of whitespace removed at some
point, but otherwise identical).

Lehmann, Hans (Ritter Elektronik) wrote:
Tim, Grant,

I have tested the patch on our MPC5200B based board with Kingston Elite Pro CF-card and it worked fine with DMA2. I have port the patch back to 2.6.24.7 Kernel and I can't detect problems our errors, even with big files (40 mB) over FEC wich I save to card . We get performance up to 10,5mB/s which is near to the max. speed.

Greetings




Mit freundlichen Grüßen

Hans Lehmann
Softwareentwicklung

Telefon	+49 (0)2191-67-2520
Fax 	+49 (0)2191-67-703408
e-mail 	hans.lehmann@ritter-elektronik.de



Ritter Elektronik GmbH
Leverkuser Straße 65
D-42897 Remscheid
www.ritter-elektronik.de

Geschäftsführer: Manfred A. Wagner, Dr. Uwe Baader
Sitz der Gesellschaft: Oberhausen
HRB 17168 Duisburg  /  USt-ID DE 814009849


-----Ursprüngliche Nachricht-----
Von: linuxppc-dev-bounces+hans.lehmann=ritter-elektronik.de@ozlabs.org [mailto:linuxppc-dev-bounces+hans.lehmann=ritter-elektronik.de@ozlabs.org] Im Auftrag von Tim Yamin
Gesendet: Mittwoch, 13. August 2008 11:07
An: Grant Likely
Cc: <redacted>
Betreff: [WW Spam: medium] Re: [PATCH]: [MPC5200] Add ATA DMA support

On Wed, Aug 13, 2008 at 7:11 AM, Grant Likely [off-list ref] wrote:
quoted
Sounds good to me.  You will get more testers that way.  I can pick it up for -next if everything else looks good.

10 more quoted lines

-- 
Matt Sealey [off-list ref]
Genesi, Manager, Developer Relations

AW: [PATCH]: [MPC5200] Add ATA DMA support

From: Lehmann, Hans (Ritter Elektronik) <hidden>
Date: 2008-11-11 15:04:49

We take a vanilla kernel with rt11 patches from Ingo Mollnar.

Here are the section of my boot messages

ata: MPC52xx IDE/ATA libata driver
scsi0 : mpc52xx_ata
ata1: PATA max UDMA/33 ata_regs 0xf0003a00 irq 135
ata1.00: ATA-0: ELITE PRO CF CARD 1GB, 20070131, max MWDMA2
ata1.00: 2031120 sectors, multi 0: LBA
ata1.00: configured for MWDMA2
ata1.00: configured for MWDMA2
ata1: EH complete
scsi 0:0:0:0: Direct-Access     ATA      ELITE PRO CF CAR 2007 PQ: 0 =
ANSI: 5
sd 0:0:0:0: [sda] 2031120 512-byte hardware sectors (1040 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't =
support DPO or FUA
sd 0:0:0:0: [sda] 2031120 512-byte hardware sectors (1040 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't =
support DPO or FUA
 sda: sda1=20

Greetings

Mit freundlichen Gr=FC=DFen

Hans Lehmann
Softwareentwicklung

Telefon	+49 (0)2191-67-2520
Fax 	+49 (0)2191-67-703408
e-mail 	hans.lehmann@ritter-elektronik.de



Ritter Elektronik GmbH
Leverkuser Stra=DFe 65
D-42897 Remscheid

23 more lines

Tim, Grant,
=20
I have tested the patch on our MPC5200B based board with Kingston =
Elite Pro CF-card and it worked fine with DMA2. I have port the patch =
back to 2.6.24.7 Kernel and I can't detect problems our errors, even =
with big files (40 mB) over FEC wich I save to card . We get performance =
up to 10,5mB/s which is near to the max. speed.
=20
Greetings
=20
=20
=20
=20
Mit freundlichen Gr=FC=DFen
=20
Hans Lehmann
Softwareentwicklung
=20
Telefon	+49 (0)2191-67-2520
Fax 	+49 (0)2191-67-703408
e-mail 	hans.lehmann@ritter-elektronik.de
=20
=20
=20
Ritter Elektronik GmbH
Leverkuser Stra=DFe 65
D-42897 Remscheid
www.ritter-elektronik.de
=20
Gesch=E4ftsf=FChrer: Manfred A. Wagner, Dr. Uwe Baader Sitz der=20
Gesellschaft: Oberhausen HRB 17168 Duisburg  /  USt-ID DE 814009849
=20
=20
-----Urspr=FCngliche Nachricht-----
Von: =
linuxppc-dev-bounces+hans.lehmann=3Dritter-elektronik.de@ozlabs.org=20
=
[mailto:linuxppc-dev-bounces+hans.lehmann=3Dritter-elektronik.de@ozlabs.
org] Im Auftrag von Tim Yamin
Gesendet: Mittwoch, 13. August 2008 11:07
An: Grant Likely
Cc: <redacted>
Betreff: [WW Spam: medium] Re: [PATCH]: [MPC5200] Add ATA DMA support
=20
On Wed, Aug 13, 2008 at 7:11 AM, Grant Likely =
[off-list ref] wrote:
quoted
Sounds good to me.  You will get more testers that way.  I can pick=20
it up for -next if everything else looks good.
=20
Here are the new patches; tested against 2.6.27-rc3.
=20
Thanks,
=20
Tim
=20
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
--
Matt Sealey [off-list ref]
Genesi, Manager, Developer Relations

Re: AW: [PATCH]: [MPC5200] Add ATA DMA support

From: Matt Sealey <hidden>
Date: 2008-11-11 16:16:48

Hmm even with DMA built in my disk (Seagate 5400.8) still "configured" for
PIO4.

This is probably my fault. Tim, could you respin the patch anyway since
it doesn't apply cleanly to the 2.6.27 kernel? :)

This did work for me once but we were still using a SUSE kernel (from
11.0) to patch it onto and another interrupt controller patch crippled
performance so it wasn't a really good test..

-- 
Matt Sealey [off-list ref]
Genesi, Manager, Developer Relations

Lehmann, Hans (Ritter Elektronik) wrote:
We take a vanilla kernel with rt11 patches from Ingo Mollnar.

Here are the section of my boot messages

ata: MPC52xx IDE/ATA libata driver
scsi0 : mpc52xx_ata
ata1: PATA max UDMA/33 ata_regs 0xf0003a00 irq 135
ata1.00: ATA-0: ELITE PRO CF CARD 1GB, 20070131, max MWDMA2
ata1.00: 2031120 sectors, multi 0: LBA
ata1.00: configured for MWDMA2
ata1.00: configured for MWDMA2
ata1: EH complete
scsi 0:0:0:0: Direct-Access     ATA      ELITE PRO CF CAR 2007 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 2031120 512-byte hardware sectors (1040 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 2031120 512-byte hardware sectors (1040 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1

Greetings

Mit freundlichen Grüßen

Hans Lehmann
Softwareentwicklung

Telefon	+49 (0)2191-67-2520
Fax 	+49 (0)2191-67-703408
e-mail 	hans.lehmann@ritter-elektronik.de



Ritter Elektronik GmbH
Leverkuser Straße 65
D-42897 Remscheid
www.ritter-elektronik.de

Geschäftsführer: Manfred A. Wagner, Dr. Uwe Baader

69 more quoted lines

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help