From patchwork Tue May 9 04:36:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 9717027 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 44A5160365 for ; Tue, 9 May 2017 04:37:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AF3820243 for ; Tue, 9 May 2017 04:37:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F56B282E8; Tue, 9 May 2017 04:37:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B68CF20243 for ; Tue, 9 May 2017 04:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbdEIEgn (ORCPT ); Tue, 9 May 2017 00:36:43 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:35631 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdEIEgl (ORCPT ); Tue, 9 May 2017 00:36:41 -0400 Received: by mail-pf0-f180.google.com with SMTP id v14so43128462pfd.2 for ; Mon, 08 May 2017 21:36:41 -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; bh=e+hpzgy4JNUgS85WZ8eJZpCfAZuaVnb66h37vL3h5rs=; b=hMYwOgAyk5DA5BTrEoERZoYS/MCJNq+GVOf6/QYVswJeBRTafPyFCtsuvtmeQcS00J TTNny3/w1EgZEkS/aEu6vC3SrRBSHfTzxl9DVst8UROPEVFQtjnbTOnlPiwDvfhb6xun W7dXs3aNZfF21jsvENtJuj5wWn7rJ3+vwinIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=e+hpzgy4JNUgS85WZ8eJZpCfAZuaVnb66h37vL3h5rs=; b=l1S2ufeOgldDCuJJJtYLyP7ZtIY/EJfT7hyku9PX6J8j7xad4GM6084rNPwgC2cvk+ rElhz44P8mEIGajgC06ZZ5vLIiW8B8FSg98xEQTbZHojn9J5pYCUuwV0GiYK4JmoVATT ly1171Q/2J7HYnZNo1Do9WWzvqmWMeR99f3+dfRj9vSevN4T8UzuJRXLttYKe0OcHPZk 1HVJdIWUvkpOVNuNKcIw27ryhC0AHpMohOagG/lecUdmGNxzkVwSV0+y2PkoQU4pCyaA 1I0cn9RjkF1VmWPL4LAD1r8AFggzVven7QiE957vCT2e7nGqK3lDfZCllSl6KT47ge3s jqLA== X-Gm-Message-State: AN3rC/7IpPbmD9TsMd/MZOXOL2YYQiSiPyLxyE0zS88M+uU/yU+UrntN GwICbuEvG7ZK54hU X-Received: by 10.84.129.131 with SMTP id b3mr90823150plb.1.1494304600969; Mon, 08 May 2017 21:36:40 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id h15sm18772031pfk.120.2017.05.08.21.36.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2017 21:36:40 -0700 (PDT) From: Bjorn Andersson To: Eugene Krasnikov , Kalle Valo , Eyal Ilsar Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] wcn36xx: Close SMD channel on device removal Date: Mon, 8 May 2017 21:36:37 -0700 Message-Id: <20170509043637.28179-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.12.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The SMD channel is not the primary WCNSS channel and must explicitly be closed as the device is removed, or the channel will already by open on a subsequent probe call in e.g. the case of reloading the kernel module. This issue was introduced because I simplified the underlying SMD implementation while the SMD adaptions of the driver sat on the mailing list, but missed to update these patches. The patch does however only apply back to the transition to rpmsg, hence the limited Fixes. Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg") Reported-by: Eyal Ilsar Signed-off-by: Bjorn Andersson --- drivers/net/wireless/ath/wcn36xx/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index d5e993dc9b23..517a315e259b 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1271,6 +1271,8 @@ static int wcn36xx_remove(struct platform_device *pdev) qcom_smem_state_put(wcn->tx_enable_state); qcom_smem_state_put(wcn->tx_rings_empty_state); + rpmsg_destroy_ept(wcn->smd_channel); + iounmap(wcn->dxe_base); iounmap(wcn->ccu_base);