Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1572982rdd; Thu, 11 Jan 2024 03:23:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiXCKtxLSVhybnYajJ02pTPpWAPI3dY2yH62O9wSJkqD6yFZ5qmm4lWNJSTZNnEqBbuZkV X-Received: by 2002:a05:6a20:748a:b0:19a:60bf:3567 with SMTP id p10-20020a056a20748a00b0019a60bf3567mr272488pzd.72.1704972198004; Thu, 11 Jan 2024 03:23:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704972197; cv=none; d=google.com; s=arc-20160816; b=c+X4YKZBUbqfnVPmskbzT+9+PXOym6++FnZfPlmSrlxFw8KS/6vn8zuj28p5Qg4dN2 ykQEnXsxEI2HApPDH27t6qodhMBnT+ref7NrvQqjGMeuuQHZXLzIYl7W+smkg18yzqe0 D5SIkGEL/SThx4voKDdYvrM6FNs/L4OD9oP2zcfRYRR5JBT7OA4nooODv/GVX1N4YJH0 tkW6ADZweozTW4KwaENEOARFR1zbWhSrN3NYFhbOXuD35NsPGLuD2g7PsvEbdW7AjOAy sbdx/4Rha9sgsCqyPiEbgR5YDC5qLhzVg3OuAdx/itiaOZRze5vPWP/WqAbu+Zgq8zGC UbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=LCpHewP0jB6Ti/qhlfUnfxomLJfTCmKYQ/eSlKtxlcw=; fh=06EToXP8Cfv4f3i15xCIibp/MFuLz9CQYjrzXs9l9Qc=; b=gwcoOJWK22EPxrZpt2vHBZk8PwnJsQ3P7yAIDVnM8y6QDwaVS8xhH/vPUtuNvtFA9+ d4DZhVHgP/1YI3uou6cuEn+A97m6aGJeT5i57xkps6Z1sTKgSlzVgUwhsNcAvxJPObOQ rUcgvJaJS+GMVOBozxAPJ82w9qeLqvt59P4iixC1ZNmORvzMXrcyt+UnlueT89D/2I7J 8rh/FmfHsKwt1x+cOE7dq426qHXYyC5iHthN0XXKIgkUeZGJ6d0UZQh1jZRiBZ38HmNX zsgPpzbaPacM4bKJjYz61yCMZT7SkmJ+ND2EtI6UrHWj6TG0lNrG29vb972C5uMARXxn TgrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d1s59qoE; spf=pass (google.com: domain of linux-wireless+bounces-1710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i2-20020a1709026ac200b001d4ab4d9da0si857896plt.499.2024.01.11.03.23.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 03:23:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d1s59qoE; spf=pass (google.com: domain of linux-wireless+bounces-1710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 31B6BB2760C for ; Thu, 11 Jan 2024 11:19:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF9661549B; Thu, 11 Jan 2024 11:18:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d1s59qoE" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C67FD15496 for ; Thu, 11 Jan 2024 11:18:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EF51C433F1; Thu, 11 Jan 2024 11:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704971938; bh=5Cix56vFM6aAxtW3khDlrq6pP687nQKFNumsJmKbMYY=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=d1s59qoECwgrm6ZwVOwT2yWKfAPFlbPs2RlqLtly+eh9VLMhj0djZQfdeTNNprcX+ 7jiFdqzGYx1Clmtp9dg+4cI3//xlpQASap+IeZBSmfriMYos5uJDkaDpd4HENUQadr Nt3SBGpQ6Tyc7E/PH3mjXgkIbNF4FsS2RaXi0IXY7CFQVYwgR9mtt+uL3aJIwKLiiU 6Mo3OMuok+ORxOn/1g02YWDVMrCMT/Dd44Qe3EyhNenEo1g42AG6bljsIE6L0OzOZq u2wqrVJVmWH68w8pQ8rXYnrwxB2NBl8WlSqhlcyMIIF1nrp5RdqfOtYBG0AlNTNAuv U5GrRaQppYikg== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] wifi: ath11k: fix IOMMU errors on buffer rings From: Kalle Valo In-Reply-To: <20231212031914.47339-1-imguzh@gmail.com> References: <20231212031914.47339-1-imguzh@gmail.com> To: Zhenghao Gu Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Zhenghao Gu User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170497193566.659902.18362636200509021901.kvalo@kernel.org> Date: Thu, 11 Jan 2024 11:18:57 +0000 (UTC) Zhenghao Gu wrote: > virt_to_phys() doesn't work on systems with IOMMU enabled, which have > non-identity physical-to-IOVA mappings. It leads to IO_PAGE_FAULTs like this: > > [IO_PAGE_FAULT domain=0x0023 address=0x1cce00000 flags=0x0020] > > And no association to the AP can be established. > > This patch changes that to dma_map_single(), which works correctly. Even > virt_to_phys() documentation says device drivers should not use it: > > This function does not give bus mappings for DMA transfers. In > almost all conceivable cases a device driver should not be using > this function > > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Zhenghao Gu > Acked-by: Jeff Johnson > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. aaf244141ed7 wifi: ath11k: fix IOMMU errors on buffer rings -- https://patchwork.kernel.org/project/linux-wireless/patch/20231212031914.47339-1-imguzh@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches