All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier Sobrie <olivier@sobrie.be>
To: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH] atmel-mci: fix transfers < 16 bytes problem in PDC mode
Date: Wed, 18 Dec 2013 09:09:41 +0100	[thread overview]
Message-ID: <20131218080925.GA26149@hposo> (raw)
In-Reply-To: <20131213110913.GB2138@ldesroches-Latitude-E6320>

Hi Ludovic,

On Fri, Dec 13, 2013 at 12:09:13PM +0100, Ludovic Desroches wrote:
> Hi Olivier,
> 
> On Thu, Dec 05, 2013 at 10:45:16AM +0100, Olivier Sobrie wrote:
> 
> [...]
> 
> > With this patch I'm able to use the wlan sdio module wl1271.
> > When you've time, it would be nice to validate or fix this
> > patch.
> 
> I have tested it and it doesn't solve issue I have with Atheros module.

What kind of errors do you see with this module?
Timeouts on some SDIO commands with small datasize?

>  
> > Thanks for your help,
> > 
> > Olivier
> > 
> >  drivers/mmc/host/atmel-mci.c |    6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> > index b86b482..c599731 100644
> > --- a/drivers/mmc/host/atmel-mci.c
> > +++ b/drivers/mmc/host/atmel-mci.c
> > @@ -45,6 +45,7 @@
> >  
> >  #define ATMCI_DATA_ERROR_FLAGS	(ATMCI_DCRCE | ATMCI_DTOE | ATMCI_OVRE | ATMCI_UNRE)
> >  #define ATMCI_DMA_THRESHOLD	16
> > +#define ATMCI_PDC_MIN_DATASIZE	16
> >  
> >  enum {
> >  	EVENT_CMD_RDY = 0,
> > @@ -765,7 +766,10 @@ static void atmci_pdc_set_single_buf(struct atmel_mci *host,
> >  	}
> >  
> >  	if (host->data_size <= buf_size) {
> > -		if (host->data_size & 0x3) {
> > +		if ((host->data_size < ATMCI_PDC_MIN_DATASIZE) &&
> > +		    (dir == XFER_TRANSMIT)) {
> > +			atmci_writel(host, counter_reg, 4);
> > +		} else if (host->data_size & 0x3) {
> 
> I have feedback from people who have issue with atmel-mci driver but not
> with at91-mci which has been removed unfortunately (it seems I had the
> only sdio wifi module working with atmel-mci driver in pdc mode...). So I
> think the 12 bytes value in the errata is correct.

Does the atheros module work with the at91-mci driver ?

> 
> Moreover I am afraid that this patch could cause some other bugs. I mean the
> transfer size is 4 bytes, the sg length is 4 bytes too and we will ask
> PDC to perform a bigger transfer... With the previous driver it was not a
> problem because we didn't use sg directly, they were copied into another
> buffer.

Ok. I'll have a look at the old at91-mci driver.

Thanks,

-- 
Olivier

  reply	other threads:[~2013-12-18  8:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03  9:59 at91sam9263 sdio + wlan ti wl1271 Olivier Sobrie
2013-12-04  8:09 ` Ludovic Desroches
2013-12-05  9:45   ` [PATCH] atmel-mci: fix transfers < 16 bytes problem in PDC mode Olivier Sobrie
2013-12-06 11:10     ` Ludovic Desroches
2013-12-13 11:09     ` Ludovic Desroches
2013-12-18  8:09       ` Olivier Sobrie [this message]
2013-12-19 20:48         ` Ludovic Desroches

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=20131218080925.GA26149@hposo \
    --to=olivier@sobrie.be \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    /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.