Received: by 10.213.65.68 with SMTP id h4csp45221imn; Mon, 19 Mar 2018 19:02:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELtTh5FZw4xnBmyFne1MOc7eLxXudxDJhGRHca2xOpcGNyuldZ6UX6wKZa8790azCEjvPUN/ X-Received: by 10.101.99.149 with SMTP id h21mr8221950pgv.345.1521511340796; Mon, 19 Mar 2018 19:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521511340; cv=none; d=google.com; s=arc-20160816; b=RWr1dYde4hiAbSxixzX5KW9VpTsEVtHG6OWwT9Sl0us3qJHuAaVQ2Fi0HI8VZr6qWd WS+SXrtLvGKHf4RceaN4ZCH9G3OpKizEnaW8U2oLOeLRDXhBMGAZYQ8GAyYDLi40Szwn 0GVvaLOyFefnB4s3liHoTA5soEuaOF6l62Ocp+aTDNSrDXqTI+qJxzSj+kUs/AYRVqQ2 QgyUnXxZyYwJiQnug25uK91SE/MR20xPORd3pmVrdnSCzBjH5OYPHdUIRkdwlpD1jEKD dhscy5xtnAfUJ/je6clO1WkawH+2l9lPGAs2nVjDWalMhVUZnfX66RJs+bGeQDzOoFiU FKqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=b1uMP74PnenXRYGtMpwzo27SLbupXXXNIuI+8tUYTj4=; b=a5FHIylLH8AHmeKNJZRGa1oQ9fcoTuGxBKUFvbYT2GQZZHSBlQ783aBG2vM/PhqMWN nFbx0N8ek9rhpRS70gTYFmpKi4ilAEDOy4Ok/CdizsTJ9O7CGPQWny5WaT04Yq3OuggQ boHcBM1wfyzuQ3gW44aqlGYqe5ZIMmGbrpWwnxK+Tq9J1ji1++0g5Laacy/Us3h8wCZ1 gNpKIo7SI2z/bKF1f7TjZYrkXww60E+aDgmWrjDXBlyxrnLfgwK0JhBJLGgnfgjQt5Uv KL+WKkfT6BD/+q6llOjH08TpgPHiUIUrE4w1FHajQlnAgwmEwya2aC+vb5rVsRQ7oZrm gldg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=XHo4h7eu; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e67si456817pfa.140.2018.03.19.19.02.06; Mon, 19 Mar 2018 19:02:20 -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=@broadcom.com header.s=google header.b=XHo4h7eu; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755586AbeCSXQY (ORCPT + 99 others); Mon, 19 Mar 2018 19:16:24 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34629 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755312AbeCSXQS (ORCPT ); Mon, 19 Mar 2018 19:16:18 -0400 Received: by mail-wm0-f65.google.com with SMTP id a20so14807624wmd.1 for ; Mon, 19 Mar 2018 16:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=b1uMP74PnenXRYGtMpwzo27SLbupXXXNIuI+8tUYTj4=; b=XHo4h7euuXgipP7mmmgDqs2KliPep6H5SrvbdsccwCdAFEmFjyX3mProknnMVv9VJw IKRqn9ZG6Kdp6uottnNIOMivcHV35FsxCKYRV4/QevyJR47vL5PJK4ad4Xj5xY4Yvqv6 wqG/ciOyHu2BrCy8tfHKltZfhrKpaA1asz7EY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=b1uMP74PnenXRYGtMpwzo27SLbupXXXNIuI+8tUYTj4=; b=RodYJGCyeWghaUdmFz0TZmIrkUtHVtIjDzzTjjOXg5wA6DktTFAlGqvcdpp+eD3eUu XAA+U2rcUaHA2gtfuRJ5yf1RvmtBVi8B6yEGhnI8RERDkywRr2LYxiDlis536ixFV8xr sWb/bE46YP32eCLFEJP7wFsnUjsleP/RzsV1scGqfrksD5yFhl1EkVXdc1AbFVfKrT6b mSPpYIH85BbCy5cDDdgbzE+SUUHTpniU/ANMLpIzyTwcAZM73u9lh2E+eJX6CMiQYk1c ql3Eng1H2M1VtBfuflGn5tvq5tIopkVAnESzQRcEmLntIl51PddfeQI9ZNtYtJqcDMcY JHeg== X-Gm-Message-State: AElRT7G6/+ziLwM7ZjTNXMMWo7eGpq6gAurWFPue5WB9e94h2dYZx0Jk oatjDNltw7tkl9LYoTv8UGbZCw== X-Received: by 10.80.152.161 with SMTP id j30mr14887326edb.202.1521501377081; Mon, 19 Mar 2018 16:16:17 -0700 (PDT) Received: from [192.168.178.129] (f140230.upc-f.chello.nl. [80.56.140.230]) by smtp.gmail.com with ESMTPSA id c35sm809114edb.87.2018.03.19.16.16.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 16:16:16 -0700 (PDT) Subject: Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac To: Florian Fainelli , Alexey Roslyakov 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> Cc: Andrew Lunn , kvalo@codeaurora.org, 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 From: Arend van Spriel Message-ID: <5AB044C0.9060701@broadcom.com> Date: Tue, 20 Mar 2018 00:16:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <817418fd-6446-57ea-b03d-383b4df9a979@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + 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 >> >> >> > >