Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp783569pxb; Wed, 18 Aug 2021 14:12:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2iUuNvose5kNwBgSt5vfcvt3YPgRwZJumGahGtxFjNcynp+eX/d5+I8KhKXaYYxY/TYVP X-Received: by 2002:a5d:94c6:: with SMTP id y6mr8839142ior.202.1629321164108; Wed, 18 Aug 2021 14:12:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629321164; cv=none; d=google.com; s=arc-20160816; b=B8qbgfjgPvinYdAvkLSFZS7Cg4CKB9YqgHpwZUS3cfDke0ELYPRfLH6Eo36s9Vdrfw kLrUNHawVCHctjWpYEbkUncPsKrWQx9N8xM1eb1kImnDzRroTgDgz2V/LzQYGNFzTHKp 00PUDAqVvF+fMcv7Jg92TQJXxeY/fjpokvjlGZC7Q6CgwGbEwfT8/uRBnRIfVgSz8pxG yJutMYQyHf1xkTrIW3pQOGf5T0KhYmF+6FXGctMoLyutV/FwvWH3AHarDmqHpxUpDiWY 5HXyTngMDF5q6ZI8A7GkSIh21uhNKVWl44CUDfT90s8aP4RvVpZO28ef7Y97kh19aXrA ArHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qjXrcIOgVKk1mPzvCDdPM89T7IRAJPhj3erq4tB0vv8=; b=lh8Ls8+d/ylH775gvbZGptFAiuy1wmtVBOjIcKq5euXGsa9XDAI7+a03m15uyqvyGx +HX+sEQIqgQa/aw6C/xCM16pasRzG0g6xbRMvQsUJUV/WCjzN2LQ6/V4XdNgS3tve/oB rdJ6LR2ExLjnsUza0pTKo8fanIGeJ3JtpMrYmE/k7zNdWfk9CjjCGvJ68uAmrBIZj+EO vCjMw5rscKMrKfT/yCpmEB5Jbj4fZ/p4o7gX+Zvqy0h0jAou/9WfYzMgk+uEt+dsxri8 sZTMfsNzb87VXevBkxkFtsWqZTZfIQi9KmmMCJW3uO1RBfBXAeeQh7rqf7fRS5+/VlIk u2SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IAGuXZNB; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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. [23.128.96.18]) by mx.google.com with ESMTP id i12si697365jal.113.2021.08.18.14.12.28; Wed, 18 Aug 2021 14:12:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IAGuXZNB; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S233958AbhHRVJt (ORCPT + 99 others); Wed, 18 Aug 2021 17:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233915AbhHRVJt (ORCPT ); Wed, 18 Aug 2021 17:09:49 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EE06C061764 for ; Wed, 18 Aug 2021 14:09:14 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id i28so7597437lfl.2 for ; Wed, 18 Aug 2021 14:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qjXrcIOgVKk1mPzvCDdPM89T7IRAJPhj3erq4tB0vv8=; b=IAGuXZNBtJmAbMdUhqC7E8KnSq78nSFb7TeRpra2h/nIwoCi4li37yOLsIAfpFhzAG ElR1A1zxGPsnh/weuzxoVwIypaI7o9SkS4eLUn+znPLeUpI4k8lbZLzKsuWg6XaaTnNE nKVr0yMeh/s+mxNcJL5VifZx0Z388DvO8d8aEgUVVRXGJzl/XGm13d4/cRLKe5KP7Ynz 7hjo0dTJg4VdEEOyITpL5jeFeUVLpbz0UaJM8aYEoGfizl2uWC9+/A4x3TQOKdOrpy2c DU7JBmblBuEaxYxvrZdpmFB/EuyrFDuASnYqGIhhHvhNJVy2dVPthUGp7peZi4L9J3bn TqoQ== 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=qjXrcIOgVKk1mPzvCDdPM89T7IRAJPhj3erq4tB0vv8=; b=Dm/Ice+jN8bQZLsreKSDaoPm772pKUoplxECZ4258SMrNed64UOWe54HoJwiYLstyz bJaU0s3UP0K9VAH9cxnv9gYYuPK5JYPMaUodAPGWt8QO4UsZ5MoYHrwbZz7rUZLxxmBr r+mipnvieUzyPuCEr6I/VGoRhuM8t2/AUzenIoclvl89NvYGxuwdBJrsN3IqgGzht28n n1rSzjL9lUQoUTkR1j+RVLZKHEEOFZz1rTfOPMnuv2nGnF2O4HAeUdtOLSZRT750iHUd CKajzAHL3dOgbkpSegk6qZVMovYKcl3a/WjvSKcwAcU29odZvezR7djahXZbQpWV0fWI nxjg== X-Gm-Message-State: AOAM5316BAXJKsjmoOENjTa9Z94vzxWPQoJFo1LtT31QjufcatWaCVZS mb6AnWVCwYi/xQmb/PH/jkBYaM9kY7/d6wWTKQs= X-Received: by 2002:ac2:5b46:: with SMTP id i6mr7436547lfp.500.1629320952285; Wed, 18 Aug 2021 14:09:12 -0700 (PDT) MIME-Version: 1.0 References: <20210818150943.1630199-1-festevam@denx.de> <17b5a29d098.279b.9696ff82abe5fb6502268bdc3b0467d4@gmail.com> <369c1f89-df33-455b-773e-a2e0dbf582ff@eero.com> In-Reply-To: <369c1f89-df33-455b-773e-a2e0dbf582ff@eero.com> From: Fabio Estevam Date: Wed, 18 Aug 2021 18:09:01 -0300 Message-ID: Subject: Re: [PATCH] ath10k: Do not call dma_alloc_coherent() for SDIO and USB To: Peter Oh Cc: Arend van Spriel , Fabio Estevam , Kalle Valo , ath10k@lists.infradead.org, linux-wireless , Christoph Hellwig , erik.stromdahl@gmail.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Peter, On Wed, Aug 18, 2021 at 2:35 PM Peter Oh wrote: > > > >> Fix the problem by not calling dma_alloc_coherent() when the device > >> is not DMA capable, such as SDIO and USB. > >> > ath10k calls dma_alloc_coherent multiple places including > ath10k_htt_rx_alloc. > > Do SDIO and USB not use such data path function at all? Now that I look closer: no, SDIO and USB do not reach the dma_alloc_coherent() inside ath10k_htt_rx_alloc. drivers/net/wireless/ath/ath10k/usb.c and drivers/net/wireless/ath/ath10k/sdio.c both set: bus_params.dev_type = ATH10K_DEV_TYPE_HL; ath10k_htt_rx_alloc() has: if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) return 0; So it returns early in the USB and SDIO cases and does not call dma_alloc_coherent(). Thanks