From patchwork Fri Oct 15 13:17:40 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: 515850 Delivered-To: patch@linaro.org Received: by 2002:adf:a11e:0:0:0:0:0 with SMTP id o30csp544077wro; Fri, 15 Oct 2021 06:15:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsoWNsOFpMQVy2/9mR08XvK4LHUiy/EJOPjLODh4AKx7M/vA4etkg5wTyBH9k+QfArjmTw X-Received: by 2002:a62:1806:0:b0:44c:5c79:59a7 with SMTP id 6-20020a621806000000b0044c5c7959a7mr11610268pfy.22.1634303753915; Fri, 15 Oct 2021 06:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634303753; cv=none; d=google.com; s=arc-20160816; b=l5F2V3HsFoa2a8+sUzZiR6F8ieublV0tdJ9W2XeRLwFm9zSDhUyWboASmR8TTmadFt r32q7j4wrAmGKs4cTZBpV8HwX/8eodD619i7zwCCHeuRFHiaI71YYQD+eM9pHp/safEI epudJWINpw/5Zl6BtQxukR7NIQkNMbQycqBRhkLGcPt3p7jwOJ8pxCzI+oNPk2gGTWl2 KEqW8kNgayxMAuIS4oVkQukBEQCDm7MKPEGA4dWNLbqjzpeKBlqFWuNGtf0YEFQYXHoR NnC8PAKHFZkFGPK9Lnsypa52rrA4ShswkuSQT2mGmwN3zJpTNHtn68uMVQKAndiXwN59 f1lg== 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=rzGydkz8si3qdyvO/Gm/KM6ulIt55WWt7m4fqgC8Vfc=; b=h1w4MHtmCJaetaaEA1pA6WTL+P8UXdBNC+g1EY6aW10uZSRVA6KsL5pXgMIXCo15RY jguCk0J/ufUMG5jlmEIRBGKbnloz1NwsXAT7SHX7RwSQzu/pywySKZO5H+HfkkQhI4uZ L0cHWFaQEU0QO6tMgE78qETQBvkBCprZjhk7AkoxCtuCuFeEy808ksb/JcVVMTce/vyZ c5zpjDRu2xzfgD2BoBMXktLxsqfQJMPBDYyMKJLWGepUTS3A4fIFRPc8fxKieQzzHGqH ODcdsGFCXul3Ze/FHUmtZZwBCu+VYar2I5qr+PecdSbpAQfU9OMSIsQqc0cGkhCALgR7 JJHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=hDjFPgaS; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=G296r4PI; 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 mh15si11041517pjb.45.2021.10.15.06.15.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 06:15:53 -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=hDjFPgaS; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=G296r4PI; 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=rzGydkz8si3qdyvO/Gm/KM6ulIt55WWt7m4fqgC8Vfc=; b=hDjFPgaS+3ycp7 bKsHsQ8Ab3YSS8lwMoqM8KtNGKS7bcnZvtPwK9lAZbly5XwZ4rF6s1sk7x5WznS6W6c4Wo0cyWlzL +wRLMxDF1FIO8FYXgE49YhIKPg9lxZeH4HJbM0wGWkmE9IulMDz+WpDUNVVsKmVm1RZtjmOKz/4mF YLMAnsve7N8zGrY6FCBpm5YprWLd6nKaqErSR3+w8YsFa0h+pqPNMBKJyKFr/ZPyKIaAuexXjXidc b2MLUT8L8pEZmbwqny3ij+yXn9o/aq2oKY8G1hdZoSFEk3KNcU+UwH8KSy2pR7cMlrZ0HB6oZiobl 9IUrPj8Pm9JQrFCj837g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbN3w-007ATq-A4; Fri, 15 Oct 2021 13:15:52 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbN3s-007ARF-Eh for wcn36xx@lists.infradead.org; Fri, 15 Oct 2021 13:15:51 +0000 Received: by mail-wr1-x42e.google.com with SMTP id e12so26489626wra.4 for ; Fri, 15 Oct 2021 06:15:47 -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=gPQUXx6r43e3Va6Xi24ZwKwKL/BEA8D/kNRa5oz8574=; b=G296r4PIby4v3IZVzR/9IYrP/h0gNhSuQaY3Khm2sxUIAxlok1520KstWLMF8qgJLF /+ypUIMdu3Ay64kqhzg+U/9O7sdxnY8JMzYeoZPcqlvQ4F/j4UVIq3Gj8LQ5jj2ln4Hn AA4K68Tsce4m7t0AW+Dg3fMUmrpJpH5pINJJSxu/r4N9DbHPJQ5tlI48oFamsHs4welh 6waWm+FGs/eOGyiqG7727UwWG7WgTFZNS6iB1IYDj2n9YGP+gDCVfzaZQmHx/1PM+ipE nueGq0ZKGhVMxRXKe1En13C6RF3pA9lENdw8dAgkyREf/wfeqPUnC8Kd+PjJsqQarhQJ SFlw== 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=gPQUXx6r43e3Va6Xi24ZwKwKL/BEA8D/kNRa5oz8574=; b=SdDAVf0xxA5sd9h+s9Pira5So6Knk49j2RR7abxouawYdYO0Krs8WA83fvSehKJi5j aVr7gGEjeGdVDVfOxUneMpyuAbO3N+kmIiLhT1m1If68hcLOfyc9+ek6afr+crdC15lf 690L/S7Wv7HaQ1/krJPmJbboZnGzuxFzorG2u81DEcSELEGs1VQ9zfE51xONUYZWAEHy RyS25eC2rkQKHHsvy3A21+teWuQ7JSBYbGAG0ljTYP8OwOc+0clptQjqLEdtUdg/uBkZ ULYSr4r4H3UWZlcYNddS7sx41kYMj5n7ths9hbEUXTzG6WmHs/Ph2QVVFLBiS+JfaOq5 pOnA== X-Gm-Message-State: AOAM532kJChans56YRfzcI4MbAvyI6/FXSaP+hLh8JDP7ipaBI1M40k1 ZAFb1+FGQ+vHwajSK9WA6p67dZ29350IBg== X-Received: by 2002:adf:b31d:: with SMTP id j29mr14267046wrd.429.1634303746417; Fri, 15 Oct 2021 06:15:46 -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 e8sm7091716wrg.48.2021.10.15.06.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 06:15:45 -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, bryan.odonoghue@linaro.org Subject: [PATCH 3/4] wcn36xx: Release DMA channel descriptor allocations Date: Fri, 15 Oct 2021 14:17:40 +0100 Message-Id: <20211015131741.2455824-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211015131741.2455824-1-bryan.odonoghue@linaro.org> References: <20211015131741.2455824-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-20211015_061548_520788_4C9D7E4A X-CRM114-Status: UNSURE ( 8.39 ) 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 doing a stop callback we are not releasing the DMA descriptors which we previously allocated. The start and stop callbacks can happen incrementally depending on usage. Failure to release the DMA descriptors leads to a reallocation of the DMA descriptors leaking more and more memory over time. 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:42e 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 doing a stop callback we are not releasing the DMA descriptors which we previously allocated. The start and stop callbacks can happen incrementally depending on usage. Failure to release the DMA descriptors leads to a reallocation of the DMA descriptors leaking more and more memory over time. Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/dxe.c | 5 +++++ 1 file changed, 5 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 13e9a274fa26a..e89002502869a 100644 --- a/drivers/net/wireless/ath/wcn36xx/dxe.c +++ b/drivers/net/wireless/ath/wcn36xx/dxe.c @@ -1037,4 +1037,9 @@ void wcn36xx_dxe_deinit(struct wcn36xx *wcn) wcn36xx_dxe_ch_free_skbs(wcn, &wcn->dxe_rx_l_ch); wcn36xx_dxe_ch_free_skbs(wcn, &wcn->dxe_rx_h_ch); + + wcn36xx_dxe_deinit_descs(wcn->dev, &wcn->dxe_tx_l_ch); + wcn36xx_dxe_deinit_descs(wcn->dev, &wcn->dxe_tx_h_ch); + wcn36xx_dxe_deinit_descs(wcn->dev, &wcn->dxe_rx_l_ch); + wcn36xx_dxe_deinit_descs(wcn->dev, &wcn->dxe_rx_h_ch); }