diff mbox

brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok)

Message ID CAEZVCP6FzA8c95hxoBm_cDjT8MuoxaijsA1Wx69dO1z8eBoZuQ@mail.gmail.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Steeve Morin Feb. 10, 2015, 8:03 p.m. UTC
Okay I've managed to fix it, it was due to a faulty mmc setting in the
kernel driver from the chip maker.

Basically it was setting a wrong max_blk_count and max_blk_size for
the MMC host.

Basically, max_blk_count was set wrong, causing a BUG_ON assertion,
and when patched, because the max_blk_size was wrong, it was
overflowing the MMC buffer (this is 128k according to the device
tree).

Thank you for your time, actually talking about it and laying it out
made me look in the right direction.

Here is the fix.

From 6c92e578748e039dfcfd8e737efdead6cd3e7568 Mon Sep 17 00:00:00 2001
From: Steeve Morin <steeve.morin@gmail.com>
Date: Mon, 9 Feb 2015 16:25:49 +0100
Subject: [PATCH 4/4] Properly set max_blk_count and max_blk_size for the host
 mmc

Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
---
 drivers/amlogic/mmc/aml_sdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Arend van Spriel Feb. 10, 2015, 9:42 p.m. UTC | #1
On 02/10/15 21:03, Steeve Morin wrote:
> Okay I've managed to fix it, it was due to a faulty mmc setting in the
> kernel driver from the chip maker.
>
> Basically it was setting a wrong max_blk_count and max_blk_size for
> the MMC host.
>
> Basically, max_blk_count was set wrong, causing a BUG_ON assertion,
> and when patched, because the max_blk_size was wrong, it was
> overflowing the MMC buffer (this is 128k according to the device
> tree).
>
> Thank you for your time, actually talking about it and laying it out
> made me look in the right direction.

Glad to help. Did not expect I would get off that easy ;-)

Regards,
Arend

> Here is the fix.
>
>  From 6c92e578748e039dfcfd8e737efdead6cd3e7568 Mon Sep 17 00:00:00 2001
> From: Steeve Morin<steeve.morin@gmail.com>
> Date: Mon, 9 Feb 2015 16:25:49 +0100
> Subject: [PATCH 4/4] Properly set max_blk_count and max_blk_size for the host
>   mmc
>
> Signed-off-by: Steeve Morin<steeve.morin@gmail.com>
> ---
>   drivers/amlogic/mmc/aml_sdio.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/amlogic/mmc/aml_sdio.c b/drivers/amlogic/mmc/aml_sdio.c
> index 680b95a..8b42f0e 100755
> --- a/drivers/amlogic/mmc/aml_sdio.c
> +++ b/drivers/amlogic/mmc/aml_sdio.c
> @@ -1322,10 +1322,10 @@ static int aml_sdio_probe(struct platform_device *pdev)
>           mmc->alldev_claim =&aml_sdio_claim;
>           mmc->ios.clock = 400000;
>           mmc->ios.bus_width = MMC_BUS_WIDTH_1;
> -        mmc->max_blk_count = 4095;
> -        mmc->max_blk_size = 4095;
> +        mmc->max_blk_count = 256;
>           mmc->max_req_size = pdata->max_req_size;
>           mmc->max_seg_size = mmc->max_req_size;
> +        mmc->max_blk_size = mmc->max_req_size / mmc->max_blk_count;
>           mmc->max_segs = 1024;
>           mmc->ocr_avail = pdata->ocr_avail;
>           mmc->ocr = pdata->ocr_avail;

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/amlogic/mmc/aml_sdio.c b/drivers/amlogic/mmc/aml_sdio.c
index 680b95a..8b42f0e 100755
--- a/drivers/amlogic/mmc/aml_sdio.c
+++ b/drivers/amlogic/mmc/aml_sdio.c
@@ -1322,10 +1322,10 @@  static int aml_sdio_probe(struct platform_device *pdev)
         mmc->alldev_claim = &aml_sdio_claim;
         mmc->ios.clock = 400000;
         mmc->ios.bus_width = MMC_BUS_WIDTH_1;
-        mmc->max_blk_count = 4095;
-        mmc->max_blk_size = 4095;
+        mmc->max_blk_count = 256;
         mmc->max_req_size = pdata->max_req_size;
         mmc->max_seg_size = mmc->max_req_size;
+        mmc->max_blk_size = mmc->max_req_size / mmc->max_blk_count;
         mmc->max_segs = 1024;
         mmc->ocr_avail = pdata->ocr_avail;
         mmc->ocr = pdata->ocr_avail;