From: Ludovic Desroches <ludovic.desroches@atmel.com>
To: Olivier Sobrie <olivier@sobrie.be>
Cc: linux-mmc@vger.kernel.org,
Ludovic Desroches <ludovic.desroches@atmel.com>
Subject: Re: [PATCH] atmel-mci: fix transfers < 16 bytes problem in PDC mode
Date: Fri, 6 Dec 2013 12:10:38 +0100 [thread overview]
Message-ID: <20131206111038.GZ3582@odulo-laptop> (raw)
In-Reply-To: <1386236716-25163-1-git-send-email-olivier@sobrie.be>
Hi Olivier,
On Thu, Dec 05, 2013 at 10:45:16AM +0100, Olivier Sobrie wrote:
[...]
>
> Hi Ludovic,
>
> 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.
Thanks for your patch, before giving my ack I would like to test it on
other devices. I hope I could manage that next week.
Regards
Ludovic
>
> 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) {
> /* If size is different from modulo 4, transfer bytes */
> atmci_writel(host, counter_reg, host->data_size);
> atmci_writel(host, ATMCI_MR, host->mode_reg | ATMCI_MR_PDCFBYTE);
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2013-12-06 11:10 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 [this message]
2013-12-13 11:09 ` Ludovic Desroches
2013-12-18 8:09 ` Olivier Sobrie
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=20131206111038.GZ3582@odulo-laptop \
--to=ludovic.desroches@atmel.com \
--cc=linux-mmc@vger.kernel.org \
--cc=olivier@sobrie.be \
/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 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).