From patchwork Mon Jun 3 18:37:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10973819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E211076 for ; Mon, 3 Jun 2019 18:38:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D10892858E for ; Mon, 3 Jun 2019 18:38:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C36352873C; Mon, 3 Jun 2019 18:38:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 728F32858E for ; Mon, 3 Jun 2019 18:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hdMLr9OWzTsYmJzzLcFQmon3rrnA7uOm8t+nHmgQAx0=; b=LUsMAE0r18Kx6Q z6uHhMND0jnznYez8E97mr6Thy5Nahj5ECNvriuoihjDYL0eDHpUvMtv+Hdo2crX/3SMUDloDnHcy a0EPa6QKK4rVO8zBgDYJDey4hHxDkRLiTt9AJIJ+kcPlcxOpYzYCn87RcC4D6sURxCeEZYH5KgukN /AN6fWod1krPo799CQoafXt4xstJtNuLFAZYupDr9++jksDhv0x3yQyabtF0m9YD8Xj3YJNkmGIc1 R8JJg1ROYKUy2XLYEZ+pTzA6vn/Jllco9TP+ieHOsJX7dwUt8RcM0Bwybwti+IPzigl6Fo0Zl3O3z ZvwM8YSOxy79w5iLIeTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXrqK-0003e8-TC; Mon, 03 Jun 2019 18:38:00 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXrqH-0003d4-TE for linux-rockchip@lists.infradead.org; Mon, 03 Jun 2019 18:37:59 +0000 Received: by mail-pg1-x542.google.com with SMTP id 196so8778449pgc.6 for ; Mon, 03 Jun 2019 11:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YZsnBAN22tVtHFJc56q+rxbdD8fX8T8HXkSym7OyHiQ=; b=Ps1O4MtbD2rEMRtRw6yvXGSxDXrH7HjPdY7KCq/lSlW7htShDFp+u033WFVJDjOXPb OLNlYon0Wpzph3sUz2BCPyDgUNjVZMpJf1kV0lUidQnpFyFPagCNB03AVdSVyyqUvAr/ bxUU+BnIId5lrXnzJ6D/l5svsqW8IvWW9U+R8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YZsnBAN22tVtHFJc56q+rxbdD8fX8T8HXkSym7OyHiQ=; b=Hr+vCj78hp0wAKERfGF6TpBLXTXiRHSS1Mbk+9xXXBvBfhZ2+bSa35Z8pAriNRKpA4 8eK7DGLlj92Rpi0yaQPddLsy3zB1oNFDgtYanF9Z/iXCGV7qONTRWuE2auDhmqm2jJ8I lrhU94rtC+eNuczierwUOybOtEnHwCFRAs5nbappfRwRYZK0M0FUGpdFOrda52iB0svc /2bmcYdQUyK6c4ClLUFaRUpLTWUyt5eYV4NpCxZy4vXUWZzac0JR1nPSdXa96h98MDTR eRgE6mfPgutzs5lwl+zeDEnreeLydldL8wJdJ7m5/BUjqnBqNcwvSW9M6GRHNm7DUYBL DVhA== X-Gm-Message-State: APjAAAXjVcrqNoZTtij2aYP6EAZozpzCCPNOLp3FjROF0dEYSNmx/Dcc zhr8oTiVhYFXUvRmqFOyowjmCg== X-Google-Smtp-Source: APXvYqwbLiM1y3Cof2KgcMMeZ8t9NIYK+vbdXny/5bFAdCAVPmxQ/CP9Y2AV9T+xZdprrAWMKhZjdw== X-Received: by 2002:a62:764d:: with SMTP id r74mr9422273pfc.110.1559587076759; Mon, 03 Jun 2019 11:37:56 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id t2sm14808969pfh.166.2019.06.03.11.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 11:37:56 -0700 (PDT) From: Douglas Anderson To: Ulf Hansson , Kalle Valo , Adrian Hunter , Arend van Spriel Subject: [PATCH v2 0/3] brcmfmac: sdio: Deal better w/ transmission errors waking from idle Date: Mon, 3 Jun 2019 11:37:37 -0700 Message-Id: <20190603183740.239031-1-dianders@chromium.org> X-Mailer: git-send-email 2.22.0.rc1.311.g5d7573a151-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_113757_943841_B86FBDBC X-CRM114-Status: GOOD ( 12.94 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mmc@vger.kernel.org, Chi-Hsien Lin , linux-kernel@vger.kernel.org, Wolfram Sang , brcm80211-dev-list@cypress.com, briannorris@chromium.org, YueHaibing , linux-rockchip@lists.infradead.org, mka@chromium.org, Michael Trimarchi , Shawn Lin , Madhan Mohan R , Hante Meuleman , Double Lo , Hans de Goede , Wright Feng , Naveen Gupta , Franky Lin , brcm80211-dev-list.pdl@broadcom.com, Avri Altman , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Douglas Anderson , "David S. Miller" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series attempts to deal better with the expected transmission errors that we get when waking up (from idle) the SDIO-based WiFi on rk3288-veyron-minnie, rk3288-veyron-speedy, and rk3288-veyron-mickey. Some details about those errors can be found in , but to summarize it here: if we try to send the wakeup command to the WiFi card at the same time it has decided to wake up itself then it will behave badly on the SDIO bus. This can cause timeouts or CRC errors. When I tested on 4.19 and 4.20 these CRC errors can be seen to cause re-tuning. Since I am currently developing on 4.19 this was the original problem I attempted to solve. On mainline it turns out that you don't see the retuning errors but you see tons of spam about timeouts trying to wakeup from sleep. I tracked down the commit that was causing that and have partially reverted it here. I have no real knowledge about Broadcom WiFi, but the commit that was causing problems sounds (from the descriptioin) to be a hack commit penalizing all Broadcom WiFi users because of a bug in a Cypress SD controller. I will let others comment if this is truly the case and, if so, what the right solution should be. There wasn't a good resolution on v1 and it's been a while, so I'm sending out a v2. Other than changing patch #1 to a full revert, the only other changes here are just to the patch descriptions. Changes in v2: - A full revert, not just a partial one (Arend). ...with explicit Cc. - Updated commit message to clarify based on discussion of v1. Douglas Anderson (3): Revert "brcmfmac: disable command decode in sdio_aos" mmc: core: API for temporarily disabling auto-retuning due to errors brcmfmac: sdio: Disable auto-tuning around commands expected to fail drivers/mmc/core/core.c | 27 +++++++++++++++++-- .../broadcom/brcm80211/brcmfmac/sdio.c | 9 +++---- include/linux/mmc/core.h | 2 ++ include/linux/mmc/host.h | 1 + 4 files changed, 32 insertions(+), 7 deletions(-)