From patchwork Tue Feb 10 20:03:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steeve Morin X-Patchwork-Id: 5808771 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 13D629F30C for ; Tue, 10 Feb 2015 20:04:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E121320154 for ; Tue, 10 Feb 2015 20:04:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8023620117 for ; Tue, 10 Feb 2015 20:04:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753423AbbBJUEB (ORCPT ); Tue, 10 Feb 2015 15:04:01 -0500 Received: from mail-ie0-f182.google.com ([209.85.223.182]:44080 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751220AbbBJUEA (ORCPT ); Tue, 10 Feb 2015 15:04:00 -0500 Received: by iecar1 with SMTP id ar1so4695882iec.11 for ; Tue, 10 Feb 2015 12:03:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=GxjKMxmSAIQvskeYCiSWc2xPaGZxjngkydk9923tfZ0=; b=sv20XJEvwP1OFAE4voa9Ks7fi4mweGcnKgR+0FlEBXWOsq3V/d/cQgdCJA0r+NG2yq J+3g1jkmdMZMFSLxh2vlJIvvzmk3klDHoLclHpa3RM5f+SGQUvFr+ZxVKTTu47zlxPkV Y0qdgvHR7zchuKaQIf+ZeiAOSS7hkd1BCSRuXzqv2FoJIE3E6CZeeu3HXxnS9heuReMI AH2/JDbHtZ12R5YJ+nNhgntokopX2qzEVV9wPsjkcxWlukIRtVXdji86EV2mzycen7p4 VYoRjCHpgHRdbCblnPnccovF+wCb9EfOYPmc+ghsRiGTEv12r+fS/QlVBBgY9iupTf/q oKuQ== X-Received: by 10.107.11.17 with SMTP id v17mr34245371ioi.18.1423598639685; Tue, 10 Feb 2015 12:03:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.73.193 with HTTP; Tue, 10 Feb 2015 12:03:39 -0800 (PST) In-Reply-To: <54DA4070.8080002@broadcom.com> References: <54D92DFC.1080604@broadcom.com> <54DA4070.8080002@broadcom.com> From: Steeve Morin Date: Tue, 10 Feb 2015 21:03:39 +0100 Message-ID: Subject: Re: brcmfmac + AP6120 (brcm43362) doesn't connect to WPA2 AP (unprotected ok) To: Arend van Spriel Cc: linux-wireless@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- 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;