Received: by 10.213.65.68 with SMTP id h4csp203482imn; Tue, 20 Mar 2018 01:00:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELt9tnDeH7iAqVhM0hAmgEE0TlR2gjBNqEC9UO89UEM0CI6KLUDS5Wg24cboeJ4XbegSx5zf X-Received: by 10.98.130.140 with SMTP id w134mr3422406pfd.127.1521532838104; Tue, 20 Mar 2018 01:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521532838; cv=none; d=google.com; s=arc-20160816; b=lW7HQUNEF3AMf8F2ZuQaCayKjBeMxRHHVnSXv8X1MtLx6e6nQVMRVn+ypxlZaOTWG0 HchOX2xE288sKy89hUiXZoyr1NZfi/PPoDLJQOhIgC+p1I+OeCyF5+PBNM2fYb9C4OOb 7/UjR4ixmHQ4HVeSpaBCJPQBO9B8G+UBgEv2UM1PbkVwTgYOe4iMs2I3wVhjllf9o/Rn q2hlzfn3tZWPSLA4vCiOkaGifXq4vk/FfWNFVydcKRfFy6TkoR7Nd6QA3vYZrul7Wu35 /IlUoroRbziwSPQVcYqND8M/Pev+eQMXqRqTWNm0ETNx8XOlSxWtnasYfMQzEOn1z36W TrYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Iko87ahDyU0uZbwTP1pVbpsUobZ6vO3LBJ/xHp1AqG4=; b=k+neBeXUgaBVJlIoss6b6ZohMBzspiKy4Gf//ti3ykMCkJHX/Ax54WmIQkK4N7rThq 4WAm108MO+Zb/8fRMa+neFPj9zalWpIYKF3T20phc3gt5zhEH5mm+by4z94WxtHmDtkt jqzy3p46rtcIBeB62htIfmeKd8040Qbvv5/G/Dj5eLjOGfc1/2te05krY0dfiIsg8oSK Hkt/oPUQL/4eUsduJWvevgizvHfMjkKS8JvOdKjGa4cTNviMxcIUDUfK4wsE+I03AQoI f6SJ0Bq97aJUposfLnSriiP9nyT+qcsQvu/FY0esk4Z7R5/1wu7crwOV0YB9WEiQ4RpF 5b7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R8B/jRyM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si1113794plx.24.2018.03.20.01.00.23; Tue, 20 Mar 2018 01:00:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R8B/jRyM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbeCTH6o (ORCPT + 99 others); Tue, 20 Mar 2018 03:58:44 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37735 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeCTH6l (ORCPT ); Tue, 20 Mar 2018 03:58:41 -0400 Received: by mail-wm0-f67.google.com with SMTP id 139so1570768wmn.2; Tue, 20 Mar 2018 00:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Iko87ahDyU0uZbwTP1pVbpsUobZ6vO3LBJ/xHp1AqG4=; b=R8B/jRyM0D9rhJNSmKRcbdKSA8wPmOX/P43g6Z0YV+wLn1/aOXp5PLFQCS0m2zxV+Q N9QFBhoUWeDbvfz1va2dbdZGNzXIsVMeSwzfz+lz9s4X1oZpUjxIRpreNM06K2x+SSZN gPcHthc3pta5HqCpgHgUx42ZlFKXEJgsJ0QXShGQXt0E6gsab0Sygeu+C44NWNDcQcvM Zf4ADCvtuxmHtoNwLYyP5vYHP+LdTrgatzlyJs1wAO34k0Ute2P389t0IN3X2s+5pjkM gyrLbrhgGyyJhFoal+B3HCPZz1bSVL538doBy76Hfvch0Bxryi0tyHUQFijbbuNldO/G 7E/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Iko87ahDyU0uZbwTP1pVbpsUobZ6vO3LBJ/xHp1AqG4=; b=Gi0BZ16zljd/Yxm600lMv2eM6ivDaT2C2PxLf0cjdz6CkSrqlXbJ9eVcyKTeuRGDey a95enHFMN9+dvFJcCMbPVg/RaV2va7zReePxuSnAsrOKu4JP+lV2YZzn1H9tDyId3jmP 98GuBGjBl14AcQLsJNYKXX2QC4izwJ/N/iAgjz/LvL3PC+p1HTSIuo4OZi/1sued1oQ9 JVgES1B/vnnyqgO2ogSxcOiBXfbI4zSD8ZIjdkiriRQ9Nw1p01NBCNKHXFi5NzFAHZZG SElMxY52FraNnq1L7U2/eZGsv5CGjUbk4fwZg45l4SHGCxTOHHhfBDBhKTXaCyC7Cyac e1Kw== X-Gm-Message-State: AElRT7H/Zcwmy+zU7XUtQlNCo/Geei3sq2m8XIAM9imW/ZCpwhE2+pEt L0lZQjPSiZFm6oufgpxb4KKT5+u3qXgZ24zdYnDEc9V95+s= X-Received: by 10.28.177.215 with SMTP id a206mr1242057wmf.142.1521532719138; Tue, 20 Mar 2018 00:58:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.156.2 with HTTP; Tue, 20 Mar 2018 00:58:38 -0700 (PDT) In-Reply-To: <5AB044C0.9060701@broadcom.com> References: <20180319014032.9394-1-alexey.roslyakov@gmail.com> <20180319014032.9394-3-alexey.roslyakov@gmail.com> <5AAF838D.2030105@broadcom.com> <817418fd-6446-57ea-b03d-383b4df9a979@gmail.com> <5AB044C0.9060701@broadcom.com> From: Alexey Roslyakov Date: Tue, 20 Mar 2018 14:58:38 +0700 Message-ID: Subject: Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac To: Arend van Spriel Cc: Florian Fainelli , Andrew Lunn , Kalle Valo , robh+dt@kernel.org, mark.rutland@arm.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, chi-hsien.lin@cypress.com, wright.feng@cypress.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Ulf Hansson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arend, >Also I am not sure if the broken-sg-support is still needed. We added that for omap_hsmmc, but that has since changed to scatter-gather emulation so it might not be needed anymore. I can confirm it doesn't impact wifi performance in case of rk3288+ap6335. But I still have to set settings->bus.sdio.sd_head_align = 4 and settings->bus.sdio.sd_sgentry_align = 512, otherwise brcmf_sdiod_sglist_rw fails: 974.888452] net_ratelimit: 8 callbacks suppressed [ 974.888457] brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 [ 974.901527] brcmfmac: brcmf_sdio_rxglom: glom read of 6144 bytes failed: -5 [ 974.910248] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame [ 975.018041] brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 [ 975.025833] brcmfmac: brcmf_sdio_rxglom: glom read of 6144 bytes failed: -5 [ 975.033634] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame [ 975.033924] dwmmc_rockchip ff0d0000.dwmmc: Unexpected command timeout, state 0 [ 975.049209] brcmfmac: brcmf_sdio_readframes: RXHEADER FAILED: -84 [ 975.056034] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK [ 975.068367] brcmfmac: brcmf_sdio_hdparse: HW header length too long [ 975.075379] brcmfmac: brcmf_sdio_rxfail: terminate frame Regards, Alex On 20 March 2018 at 06:16, Arend van Spriel wrote: > + Uffe > > On 3/19/2018 6:55 PM, Florian Fainelli wrote: >> >> On 03/19/2018 07:10 AM, Alexey Roslyakov wrote: >>> >>> Hi Arend, >>> I appreciate your response. In my opinion, it has nothing to do with >>> SDIO host, because it defines "quirks" in the driver itself. >> >> >> It is not clear to me from your patch series whether the problem is that: >> >> - the SDIO device has a specific alignment requirements, which would be >> either a SDIO device driver limitation/issue or maybe the underlying >> hardware device/firmware requiring that >> >> - the SDIO host controller used is not capable of coping nicely with >> these said limitations >> >> It seems to me like what you are doing here is a) applicable to possibly >> more SDIO devices and host combinations, and b) should likely be done at >> the layer between the host and device, such that it is available to more >> combinations. > > > Indeed. That was my thought exactly and I can not imagine Uffe would push > back on that reasoning. > >>> If I get it right, you mean something like this: >>> >>> mmc3: mmc@1c12000 { >>> ... >>> broken-sg-support; >>> sd-head-align = 4; >>> sd-sgentry-align = 512; >>> >>> brcmf: wifi@1 { >>> ... >>> }; >>> }; >>> >>> Where dt: bindings documentation for these entries should reside? >>> In generic MMC bindings? Well, this is the very special case and >>> mmc-linux maintainer will unlikely to accept these changes. >>> Also, extra kernel code modification might be required. It could make >>> quite trivial change much more complex. >> >> >> If the MMC maintainers are not copied on this patch series, it will >> likely be hard for them to identify this patch series and chime in... > > > The main question is whether this is indeed a "very special case" as Alexey > claims it to be or that it is likely to be applicable to other device and > host combinations as you are suggesting. > > If these properties are imposed by the host or host controller it would make > sense to have these in the mmc bindings. > >>> >>>> Also I am not sure if the broken-sg-support is still needed. We added >>>> that for omap_hsmmc, but that has since changed to scatter-gather emulation >>>> so it might not be needed anymore. >>> >>> >>> I've experienced the problem with rk3288 (dw-mmc host) and sdio >>> settings like above solved it. >>> Frankly, I haven't investigated any deeper which one of the settings >>> helped in my case yet... >>> I will try to get rid of broken-sg-support first and let you know if >>> it does make any difference. > > > Are you using some chromebook. I have some lying around here so I could also > look into it. What broadcom chipset do you have? > > Regards, > Arend > > >>> All the best, >>> Alex. >>> >>> On 19 March 2018 at 16:31, Arend van Spriel >>> wrote: >>>> >>>> On 3/19/2018 2:40 AM, Alexey Roslyakov wrote: >>>>> >>>>> >>>>> In case if the host has higher align requirements for SG items, allow >>>>> setting device-specific aligns for scatterlist items. >>>>> >>>>> Signed-off-by: Alexey Roslyakov >>>>> --- >>>>> Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt >>>>> | 5 >>>>> +++++ >>>>> 1 file changed, 5 insertions(+) >>>>> >>>>> diff --git >>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt >>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt >>>>> index 86602f264dce..187b8c1b52a7 100644 >>>>> --- >>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt >>>>> +++ >>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt >>>>> @@ -17,6 +17,11 @@ Optional properties: >>>>> When not specified the device will use in-band SDIO >>>>> interrupts. >>>>> - interrupt-names : name of the out-of-band interrupt, which must >>>>> be >>>>> set >>>>> to "host-wake". >>>>> + - brcm,broken-sg-support : boolean flag to indicate that the SDIO >>>>> host >>>>> + controller has higher align requirement than 32 bytes for each >>>>> + scatterlist item. >>>>> + - brcm,sd-head-align : alignment requirement for start of data >>>>> buffer. >>>>> + - brcm,sd-sgentry-align : length alignment requirement for each sg >>>>> entry. >>>> >>>> >>>> >>>> Hi Alexey, >>>> >>>> Thanks for the patch. However, the problem with these is that they are >>>> characterizing the host controller and not the wireless device. So from >>>> device tree perspective , which is to describe the hardware, these >>>> properties should be SDIO host controller properties. Also I am not sure >>>> if >>>> the broken-sg-support is still needed. We added that for omap_hsmmc, but >>>> that has since changed to scatter-gather emulation so it might not be >>>> needed >>>> anymore. >>>> >>>> Regards, >>>> Arend >>> >>> >>> >>> >> >> > -- With best regards, Alexey Roslyakov Email: alexey.roslyakov@gmail.com