Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp404258rdd; Tue, 9 Jan 2024 07:41:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEryEWq7wrNmY7fLL4hPs3V1n3ErvrGo5iU+MoO5YTZdr4sgxoEPfpSfRO1h2YBdk61Waw2 X-Received: by 2002:a05:6a20:72aa:b0:199:9e6f:84f with SMTP id o42-20020a056a2072aa00b001999e6f084fmr2529737pzk.10.1704814913300; Tue, 09 Jan 2024 07:41:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704814913; cv=none; d=google.com; s=arc-20160816; b=X6GKxc0+Rvk7hCz/XlHQwZyJLaO0W6HYzfpNwh5+TZtEdm5Z+Qa8nrRXWjOMkRSvIv NzvD10zG4SuhtwiTLhtP7KTs/JO9P0K+elShRl7IG2P5QW3tE5IPKGqOppDJlMWR4X9D 7wDX53Ar/BhpWfnUPY8g9eyqn6uK5l4qqKE6eWL5/n3PUesuLfeDhNgFLrxAixXr7tFq afg0wK2KY/NiwxXkSkBSEMdILmJN3bhJ6KRaA/dokkpNuTCDqi8Tplbng+ITLMFnHKIm YWmudjl85f0gC1clLgtMymCwyq4tJB01k6rsfiBVtitHwkzsTGk4sKJkPeI/S55EWnzu 6zIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=WEZYhBsE9nJawc8wgkH4NEWuARH+t9pgx/s9ShaVuTc=; fh=2BCArwbV7BBjV5Ez2OmFkPXm1K8EE/Z9rOWE3Sz+PkA=; b=KPIDT14BJVVygBA0BqxLy1el59MRARF8Hm/WHrXb4RFfyXESW+M/5A2SLAXpWqrIK6 Y/HXiFn1aJWFZvXcZTt7BruiSCyWPVRUezEhUfw45C2mheb13WijSZvG0IxoXzIO/IZv DyIGX/d43wN23qI2pxlpXMUupcBJlQAcYgW2uqEPxKNWxepMur0idRLXj4yleKEFecDR wMFsu71rJSWzseN1PrZf2Ve3emb8JsY5BTB38CBIx5YrDsgTlbMeFYpTqgqZgaSeJrxP lem5fuglycVgP/8p4pEmPc1KI7iqL69EzvPdYBPimV1uuj0YDlDyHg5ZzYLA1jvKFvi1 gwIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pOW4ieNd; spf=pass (google.com: domain of linux-wireless+bounces-1634-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f27-20020a63755b000000b005cd887d976csi1655973pgn.17.2024.01.09.07.41.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 07:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1634-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pOW4ieNd; spf=pass (google.com: domain of linux-wireless+bounces-1634-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1634-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C5366286DB7 for ; Tue, 9 Jan 2024 15:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3FB239FE8; Tue, 9 Jan 2024 15:41:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pOW4ieNd" 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 D91D839FE7 for ; Tue, 9 Jan 2024 15:41:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B100C433F1; Tue, 9 Jan 2024 15:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704814909; bh=PrPT1PF1nLNq7MhFisgwCZbFl/aRMX6i5ALN/Gf296k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pOW4ieNdmUZyZvCWsn6W3U2etakpyFD/MyTR1IJWpwJwYB78Dr6s/utb4bh0fH8hX Q8TS39SQ5u/ca51wf9LQqK/61/a+Zv5bLJ77JYvUmlLsfBX3FUhloAdmctdsjSD2yI 6jEozcV2J789zxGYsUszOW2hD9g/7t82Kvytd/vWp5oMiOnM51Z0oyqDzyzXVtRyM7 WH5O0AuW2AQ1qTWGockk7eNDjQaHuOH5UfJbAlz+nBzwfTLAP066n0lIuw2Rqu6nu1 wxiY8NtlzafCl+mtao6lcQb6azj0FYUrPYfwlecl2odySLP0A7CpAcjRPCkCxdfIGu tfG2wM1eStGLQ== From: Kalle Valo To: Zhenghao Gu Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v2] wifi: ath11k: fix IOMMU errors on buffer rings References: <20231212031914.47339-1-imguzh@gmail.com> Date: Tue, 09 Jan 2024 17:41:46 +0200 In-Reply-To: <20231212031914.47339-1-imguzh@gmail.com> (Zhenghao Gu's message of "Mon, 11 Dec 2023 21:19:14 -0600") Message-ID: <8734v6ecp1.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Zhenghao Gu writes: > virt_to_phys doesn't work on systems with IOMMU enabled, > which have non-identity physical-to-IOVA mappings. Can you give an example of such system? Just curious where you are seeing this. > It leads to IO_PAGE_FAULTs like this: > [IO_PAGE_FAULT domain=0x0023 address=0x1cce00000 flags=0x0020] > and no link can be established. What do you mean with link in this context? Are you talking about 802.11 association? > This patch changes that to dma_map_single(), which works correctly. Good catch. And virt_to_phys() documentation even says this: * 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 Jeff, are you ok with this? I did some cosmetics changes in the pending branch (removed unnecessary parenthesis, reverse xmas tree etc), please check: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=fefa43d63e1928fce6e8c2bb626900e9ce98ca69 -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches