Re: [PATCH] atmel-mci: fix transfers < 16 bytes problem in PDC mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux