All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Paterniani <a.paterniani-03BXCEkGbFHYGGNLXY5/rw@public.gmane.org>
To: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: SPI controller bugfixes needed (full duplex + DMA, data	corruption)
Date: Tue, 18 Nov 2008 09:30:02 +0100	[thread overview]
Message-ID: <49227D0A.40506@swapp-eng.it> (raw)
In-Reply-To: <20081118075215.GD9553-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

I have an iMX1 based HW running kernel 2.6.25.8.
I checked the patch and to seems to be ok (solves old problems on full 
duplex transfers).

Regards,
-- Andrea

Sascha Hauer ha scritto:
> Hi David,
>
> On Sat, Nov 15, 2008 at 02:22:32PM -0800, David Brownell wrote:
>   
>> Hi,
>>
>> We recently turned up a bug in the pxa2xx SPI driver, which
>> turns out to also be present in the spi_imx.c and au1550_spi.c
>> drivers too.
>>
>> Briefly, full duplex transfers are allowed to share the
>> same buffer (or partially overlap it), which means that
>> the dma mapping operations must be done in a safe order:
>>
>>  - first map the TX buffer, so cache data gets written
>>    to memory where the DMA will pick it up;
>>
>>  - then map the RX buffer, so that cache entries (with
>>    soon-to-be-stale data) get removed.
>>
>> Doing it the other order, as is done with spi_imx and
>> with au1550_spi, causes data corruption by discarding
>> data from the cache *before* writing it to memory.
>>
>> If you can do it, it'd be good to see this fixed before
>> the 2.6.28 kernel ships.
>>     
>
> Hm, this is a non trivial fix. I don't have a MX1 based hardware with
> something on the SPI bus handy, so this would be a shot in the dark for
> me. I hope Andrea jumps in, otherwise we'll have to wait till the driver
> works on MX2.
>
> Sascha
>
>   

-- 


 

------------------------------------------------------------------------

*Ing. Andrea Paterniani*

*SWAPP* - Studio Professionale
Via degli Abeti, 312 - 61100 Pesaro
Tel 0721 24256
Fax 178 220 8730
 
a.paterniani-03BXCEkGbFHYGGNLXY5/rw@public.gmane.org
www.swapp-eng.it 
<mailto:%0d%0aa.paterniani-03BXCEkGbFHYGGNLXY5/rw@public.gmane.org%0d%0awww.swapp-eng.it>

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

  parent reply	other threads:[~2008-11-18  8:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15 22:22 SPI controller bugfixes needed (full duplex + DMA, data corruption) David Brownell
     [not found] ` <200811151422.32748.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-18  7:52   ` Sascha Hauer
     [not found]     ` <20081118075215.GD9553-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-11-18  8:30       ` Andrea Paterniani [this message]
     [not found]         ` <49227D0A.40506-03BXCEkGbFHYGGNLXY5/rw@public.gmane.org>
2008-11-18 22:04           ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49227D0A.40506@swapp-eng.it \
    --to=a.paterniani-03bxcekgbfhyggnlxy5/rw@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.