From patchwork Mon Oct 18 23:17:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 515931 Delivered-To: patch@linaro.org Received: by 2002:ac0:cd8c:0:0:0:0:0 with SMTP id d12csp32701imp; Mon, 18 Oct 2021 16:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1WRa50tvPaRRJAgepjtYE9+1umpp3ZhET/k3ckyXf2DlJ4SDzgpto3ZYWdVhoKJO2/f8q X-Received: by 2002:a05:6830:1656:: with SMTP id h22mr2255244otr.123.1634598935783; Mon, 18 Oct 2021 16:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634598935; cv=none; d=google.com; s=arc-20160816; b=0NxYD2pmELwl2IDMxkxX6aEUqh33FsHnBsVkuioumZiiIMlG5/N7fTbDTUA2uUWUb0 UKzwY4jchAcbTnA6LoUi91rPw3B+9pNHKvOL77TN9Om6/N/HOzR6mOoWjVoD+VkR/NZF 4L4zBDU42SPLI17SqUwjVdKYQySKA+TOHJJ4CFgIuz1F14Rx34/s9Du7ZTZhAEr9gt/T Bpd+Nf+5n0eM6nDRsyuP7bRnOyL7awPBFmVzhnrHZn/D/fcoL0DrziJ8k6IdALz5vc4e HwLm2IowHqMLiRCpLxQjWH7rxLtfx52U30lFSVHbqFZjQfFwyMd7CUhAvkfD5em3CF5k 2K5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=jc55AFFekw9X6l0tNOCBhlmrzzfkpts0vjuTbqPx/vo=; b=j6aAdybYLv1Q7xNlImFOoYET94XMDgouAXc/hXcwlvsBOgD4ZIbd1gsrR3Iun4FcDH gS+wStkqIUYJt+e2odhbGtC7WcxQ7XkEGw+Jy4wsttzHSaLGP+suLnvm/fGQqGMuoMTC B0XwXlt0iMiEJ0HszYV+J8FpIhW/N748i9M0yWs1yCZWdUyFi6LFmE6qcH2WnXEoIYZg tnBc3N42IFsUNzvx+tGNyez1fLpzv7eVvKiCkPJ3rt8H8BxFhCEOkIjp/IGaMFuByIlM gm/HaeBMCsPyEgEyZudU5D9aruen+tK5RaPt6DGD1fIHmaf9AlxuvnnoTyLpqMnSo9nB 61og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=i9M9NScW; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hAIrENvH; spf=neutral (google.com: 2607:7c80:54:e::133 is neither permitted nor denied by best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by mx.google.com with ESMTPS id q132si16554224oib.220.2021.10.18.16.15.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 16:15:35 -0700 (PDT) Received-SPF: neutral (google.com: 2607:7c80:54:e::133 is neither permitted nor denied by best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=i9M9NScW; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hAIrENvH; spf=neutral (google.com: 2607:7c80:54:e::133 is neither permitted nor denied by best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jc55AFFekw9X6l0tNOCBhlmrzzfkpts0vjuTbqPx/vo=; b=i9M9NScW/Aq5Oy ygHyYfp/4yaMkxSRV/dNWf9xb4go7AmhW1q5yfMz0J0ENIWR2tele4Mpam9dyW0CDZp5t16/DItdN 0SsOn93d+uy4Zw/sUmvCNhpM57iAIirVueFNxki+821SaZVH7ZSDrmkBNiqVt15bfF22u3GDAzjTY cKFSaD6zCbB3Qu62y1U5cW20yYRlpDCypDnUVYMY3e96V2OCAiSZLLOjgAKeNwje5uhVz4P6JXJVi I9O74HrJEAGvVoIMRfahT1/8/hhiBe/WSpNIceHUnvA+Uz13DrE8hFgl3JkjiCAgRBFrMfTgD5+Sc KgNUy4+AQHY+z2J+gtsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcbqw-00HRCi-DW; Mon, 18 Oct 2021 23:15:34 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcbqs-00HR9h-HY for wcn36xx@lists.infradead.org; Mon, 18 Oct 2021 23:15:31 +0000 Received: by mail-wr1-x42f.google.com with SMTP id i12so44078153wrb.7 for ; Mon, 18 Oct 2021 16:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GbLM5Z3jD8SPQEozMJryUhBVooDo33aFTB2Os0auzZc=; b=hAIrENvHRnb4RSIeGT/YWT7oVggO3TgS+sD3kWQ/0yA+1biY1bh6snfeNIpAmdBmmI 2WlL6CSXl3HxWwFJpCPICwkoY/Vyv68aa1khsfHcwcXFiCv6Ql84UDkHa/NTyZTyBGd1 Hzk+LT3iAYZ9F29nfhP7jx1F5+6UtzEwUqUj5J++sefpeUIeVfYhz9beDSqj8pW/3ZdE x49l/OLkuGjxcr8J59p72kTPXqr30JJA9jWIb6uUNNQZEsuGge9NYJajTthIIxN1iylD Ws0sXHCxxezrcf6CwrFKgIJuMD1/Bx/6lJTItcMPKUI31M+2IbXoKLU33l2kGnevv9xy 2Qtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GbLM5Z3jD8SPQEozMJryUhBVooDo33aFTB2Os0auzZc=; b=seS7eO2JmduFKJdbBnkZC2dtLsh/rF+BPv/1unGt/mCXEd397l2TrQ/JC37vyHfXTq C4EM67kHBT2ve4nUP/vHxPjBRWHDlVKTq/y68IKAmd3W5xcFuTR5b2T/9JjscZPCQ2Wl 5vUcBXQW78jHC86AdhoJXNHgByTgwcxxR6PKJIbobrvlzlDuFy7Fb0ogL1oFjIz1mmMH qvZC8fvVG7AQrJGB9fpX7ivxiqT/+E71v55l8mJQaYpLdXj+Xx5GVglxoZbBMZFvpXzC PFt+gaMY6wrQIAZuOLSneoOU9A5+9AHsUwK0NmaeqKu99LkNd+9D6QLFZ0ITbgcUel34 b4NQ== X-Gm-Message-State: AOAM532ykE9tNyzU1u8CeJ5yl7mP7Z/oAQfGMP+7yG1e7Cvcaob4DKB9 mzRRqSDtBuh62GZE5Ln/gketgg== X-Received: by 2002:adf:bbc3:: with SMTP id z3mr40159667wrg.10.1634598929207; Mon, 18 Oct 2021 16:15:29 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s8sm3685379wrr.15.2021.10.18.16.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 16:15:28 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org Cc: loic.poulain@linaro.org, benl@squareup.com, daniel.thompson@linaro.org, johannes@sipsolutions.net, bryan.odonoghue@linaro.org Subject: [PATCH v2 5/5] wcn36xx: Put DXE block into reset before freeing memory Date: Tue, 19 Oct 2021 00:17:22 +0100 Message-Id: <20211018231722.873525-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211018231722.873525-1-bryan.odonoghue@linaro.org> References: <20211018231722.873525-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211018_161530_607162_5A9A0B97 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When deiniting the DXE hardware we should reset the block to ensure there is no spurious DMA write transaction from the downstream WCNSS to upstream MSM at a skbuff address we will have released. Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/dxe.c | 3 +++ 1 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org When deiniting the DXE hardware we should reset the block to ensure there is no spurious DMA write transaction from the downstream WCNSS to upstream MSM at a skbuff address we will have released. Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/dxe.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.33.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/dxe.c b/drivers/net/wireless/ath/wcn36xx/dxe.c index d4f5746d9b10a..cf85b0cd11be4 100644 --- a/drivers/net/wireless/ath/wcn36xx/dxe.c +++ b/drivers/net/wireless/ath/wcn36xx/dxe.c @@ -1089,6 +1089,9 @@ void wcn36xx_dxe_deinit(struct wcn36xx *wcn) wcn->tx_ack_skb = NULL; } + /* Put the DXE block into reset before freeing memory */ + wcn36xx_dxe_reset(wcn); + wcn36xx_dxe_ch_free_skbs(wcn, &wcn->dxe_rx_l_ch); wcn36xx_dxe_ch_free_skbs(wcn, &wcn->dxe_rx_h_ch);