Re: [PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO

2014-08-13 Thread Linus Walleij
On Wed, Aug 13, 2014 at 7:14 AM, Srinivas Kandagatla
 wrote:

> In the past Ulf Hansson and Stefan Nilsson have submitted a patch to fix
> this issue for ux500v2. This patch adds new flag non_power_of_2_blksize /
> any_blksize to variant_data.

That's the right approach. It makes non-2^n support the exception rather
than the rule and applies only to the variants relevant so the logic is right.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO

2014-08-12 Thread Srinivas Kandagatla

Thankyou for the feedback.

On 12/08/14 15:12, Russell King - ARM Linux wrote:

On Tue, Aug 12, 2014 at 01:04:40PM +0100, Srinivas Kandagatla wrote:

From: Srinivas Kandagatla 

This patch adds condition in mmci_validate_data to skip checking
blocksize for SDIO card types. SDIO card type can issue blocksizes
which are not exactly power of 2 so this check always fails, resulting
in SDIO failures.


Do you understand why this check is there?

Do you realise that the standard MMCI from ARM Ltd can /only/ perform
power-of-2 block transfers?


Yes, I noticed that in pl180 TRM. I agree this patch will break standard 
MMCI.


In the past Ulf Hansson and Stefan Nilsson have submitted a patch to fix 
this issue for ux500v2. This patch adds new flag non_power_of_2_blksize 
/ any_blksize to variant_data.


http://www.spinics.net/lists/linux-mmc/msg12160.html
http://marc.info/?l=linux-mmc&m=131710963908853&w=2

This patch will fix the issue for Qcom too. If you are Ok with adding 
new flag non_power_of_2_blksize/any_blksize in the variant_data, I can 
rebase and include Ulf's patch in next version.



thanks,
--srini



Hence, NAK on this change as it stands.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO

2014-08-12 Thread Russell King - ARM Linux
On Tue, Aug 12, 2014 at 01:04:40PM +0100, Srinivas Kandagatla wrote:
> From: Srinivas Kandagatla 
> 
> This patch adds condition in mmci_validate_data to skip checking
> blocksize for SDIO card types. SDIO card type can issue blocksizes
> which are not exactly power of 2 so this check always fails, resulting
> in SDIO failures.

Do you understand why this check is there?

Do you realise that the standard MMCI from ARM Ltd can /only/ perform
power-of-2 block transfers?

Hence, NAK on this change as it stands.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO

2014-08-12 Thread Srinivas Kandagatla
From: Srinivas Kandagatla 

This patch adds condition in mmci_validate_data to skip checking
blocksize for SDIO card types. SDIO card type can issue blocksizes
which are not exactly power of 2 so this check always fails, resulting
in SDIO failures.

Relaxing this check for SDIO in mmci_validate_data solves the issue
encountered during WLAN ath6kl testing with Qualcomm APQ8064 SOC on
IFC6410 board.

Signed-off-by: Srinivas Kandagatla 
---
 drivers/mmc/host/mmci.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 99fe80a..747aba0 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -240,6 +240,10 @@ static int mmci_validate_data(struct mmci_host *host,
if (!data)
return 0;
 
+   /* sdio could have sizes which are not power of 2 */
+   if (host->mmc->card && mmc_card_sdio(host->mmc->card))
+   return 0;
+
if (!is_power_of_2(data->blksz)) {
dev_err(mmc_dev(host->mmc),
"unsupported block size (%d bytes)\n", data->blksz);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/