Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7050307ybi; Thu, 13 Jun 2019 08:44:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwl1TJyKv2UJIhGZMGY7mWFdYNtTOnnOhcai0pYrDrioT8ZFEfJqif6Jy0zPa9oHn+kUbhH X-Received: by 2002:a62:1990:: with SMTP id 138mr93907430pfz.133.1560440657499; Thu, 13 Jun 2019 08:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560440657; cv=none; d=google.com; s=arc-20160816; b=hPdE0gSJSZ+LU/R6NHCczBF/oyE5GYK4fxwOv/5AsdejCq3vJED4YCIPL168i/gVpt w0dEwWcqyyQT1Tg94JiBj7ItS1aor8rAiR2DKaw3v5+ZY0DuhUwmagaGFDRHWJi1keK5 BF82bvFQquIdOky8pQa7Thwl4KKs4TTL9VbtMgsdW+0GBSm24IevDB8eO+fDSOSZZvOV 2Mhb6OCIJitsV0QuTVZ8VZbpTRsiN08uEJMVohqNiqb7K1XdlbUKmFTi3i8hKBLiNJso /6C30HcCGgC1jlTeUPNt4dGoIjyjgKmuE6mjHmtg4VCguiOWre6n4oEPQTpbLTIwi3JI ClPg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=NdS6xN6Z4DlPhoXqfSjLt1MlPeGtM/DFz1IwvW9UGoo=; b=yTL0f2HtknWPpAKcM/c8l5DXH34/hXRcK/f8p4yIdJ0FwHdNN+SOD3gRzHy6Ga3ytO h8aDD0XrcqZXNKMUFlyBCDvP+cxLIFtR71M7XAklGgi3mbcHqmpVnMOgAicWlC3S2EqN 3MIZkIGE5Dr2DLkDDxPd6bkMyWpRiKZ3XHvvGtPwtM8JrQFah2W9cpR2q/NcFHNMRKmi Fha5RvGrmHaglMmJo6efCr8b9MV+ugs+9Z0BikwKGQHwVrmpPTtgRjOpCW4w625i4q8g VZvTLPqs/S/MUxUgdfZ6m91H8MJu7RLaoLWH3u4JPuZjv4hDi0vi9Ew34BP66fozsZdO zJ8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRY3cBMo; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si104228pgd.64.2019.06.13.08.44.02; Thu, 13 Jun 2019 08:44:17 -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=@linaro.org header.s=google header.b=gRY3cBMo; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727167AbfFMPmQ (ORCPT + 99 others); Thu, 13 Jun 2019 11:42:16 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:41838 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731864AbfFMJtS (ORCPT ); Thu, 13 Jun 2019 05:49:18 -0400 Received: by mail-vs1-f66.google.com with SMTP id g24so12223997vso.8 for ; Thu, 13 Jun 2019 02:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NdS6xN6Z4DlPhoXqfSjLt1MlPeGtM/DFz1IwvW9UGoo=; b=gRY3cBMoBbyhUq/TwCPef50CCDKrv4iYze6tdunxTeCUZpRTxfdIbcrZIu3rL9nBmA IKu5OYITIeL6ltUdiFp9D/dQv5KZKcAv6V+fmHeGkWIe6jriJiht2zz2XO9FjHTjfRib NIvsg+FMfLXlxWpsnz2tVCHJTpT0XY2bvwC63A4K1b6VMqRrNgGbsb2LGvdXDeeBaEPZ m4z3ddfPasyoIKb3AqQ46OdJR6zCS6DXa7xNtmQomcyAaTessCVDKoSiccxpgKSHLEJM v8OJqfkxY2CdFdgcNZGppzV0c9uPWuWj07PpFzImXtu18YgRdm3Z/Qdd3ycwG99TvFSh 91pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NdS6xN6Z4DlPhoXqfSjLt1MlPeGtM/DFz1IwvW9UGoo=; b=KOyNG4LkAmGKHYu4soKZH23uqSDWLieU77WBOSRfweAnStzwK6mA2Xq10h/xY/zqod MrtEu4YWFBkgJYhmLC4MAiomNR1OFy5jOi2yXvJKCUjud3roAdCxIW7kW+mcwbIxA+q0 4CysU3KuOGacVLOrv9gbhFe6dasWBfCWgc7GC2YjNb4SxbgzGcSr0xunpGdD/vEWoRhR FPcm6h3npZL04Ga3ofbObdd+CUHo3k52jVYOuzpfD7Zob6jQDIc05JNkkXM2UJxF3lnF e2j/A1xHjpAIfur/BH/xabDoh9dXBH67j/+EL3M0sA9VvMk1NYr1DTLK68GI+9xDCv5i aiBA== X-Gm-Message-State: APjAAAXOndHLafutT5G02ODUbxpkci+0U+ROZ71H8HPRrf7BZy2klfi0 A31VQ66p9SKaurynTegaw9MNj87pac0mF7rNPgOBAw== X-Received: by 2002:a67:ed8b:: with SMTP id d11mr48182216vsp.35.1560419357888; Thu, 13 Jun 2019 02:49:17 -0700 (PDT) MIME-Version: 1.0 References: <20190607223716.119277-1-dianders@chromium.org> <20190607223716.119277-4-dianders@chromium.org> <363DA0ED52042842948283D2FC38E4649C52F8A0@IRSMSX106.ger.corp.intel.com> <16b4bfb39e0.2764.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> In-Reply-To: <16b4bfb39e0.2764.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> From: Ulf Hansson Date: Thu, 13 Jun 2019 11:48:41 +0200 Message-ID: Subject: Re: [PATCH v3 3/5] brcmfmac: sdio: Disable auto-tuning around commands expected to fail To: Arend Van Spriel Cc: Doug Anderson , "Hunter, Adrian" , Kalle Valo , brcm80211-dev-list.pdl@broadcom.com, "open list:ARM/Rockchip SoC..." , Double Lo , Brian Norris , linux-wireless , Naveen Gupta , Madhan Mohan R , Matthias Kaehlcke , Wright Feng , Chi-Hsien Lin , netdev@vger.kernel.org, brcm80211-dev-list@cypress.com, Franky Lin , Linux Kernel Mailing List , Hante Meuleman , YueHaibing , "David S. Miller" 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 On Wed, 12 Jun 2019 at 15:58, Arend Van Spriel wrote: > > > On 6/12/2019 1:48 PM, Ulf Hansson wrote: > > On Wed, 12 Jun 2019 at 13:11, Arend Van Spriel > > wrote: > >> > >> On 6/12/2019 12:10 PM, Ulf Hansson wrote: > >>>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c: > >>>> mmc_set_data_timeout(md, func->card); > >>>> mmc_wait_for_req(func->card->host, mr); > >>> These are not okay, none of these things calls should really be done > >>> from an SDIO func driver. > >>> > >>> It tells me that the func driver is a doing workaround for something > >>> that should be managed in a common way. > >> > >> We are using some low-level functions passing chain of skbuff to the > >> device using CMD53 with scatterlist. If I recall correctly Marvell made > >> an attempt to have a similar function for it in the mmc stack. Not sure > >> if that ever made it in. If so I can rework our driver using that API. > >> If not, I can make a new attempt. > > > > I recall there were some patches, but not sure why we didn't merge them. > > > > Anyway, if you want to move this forward, that would be awesome! > > Let's scope it before moving forward. Our use-case is to transfer a > chain of skbuff's. I am pretty sure that is not something we want to > deal with in mmc stack api. So I suppose passing a scatterlist is more > sensible, right? Maybe on sdio layer of the stack we could consider > dealing with skbuff's for network func drivers? Passing a scatter gather list seems reasonable. Ideally we should be highly influenced with how buffers and dealt with for mmc block requests. Some information that may be needed by upper SDIO layers is the segment/block constraints set by the MMC/SDIO host controller/driver. The below is what we have today (see include/linux/mmc/host.h): max_seg_size; /* see blk_queue_max_segment_size */ max_segs; /* see blk_queue_max_segments */ max_req_size; /* maximum number of bytes in one req */ max_blk_size; /* maximum size of one mmc block */ max_blk_count; /* maximum number of blocks in one req */ Ideally we don't want SDIO func drivers to access these directly from the ->host pointer, but rather via new SDIO func APIs. > > Let me see if I can find those Marvell patches. Might be a good start. Great! Thanks! Kind regards Uffe