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: 98868 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1643606qge; Mon, 8 May 2017 21:37:15 -0700 (PDT) X-Received: by 10.84.218.142 with SMTP id r14mr14791683pli.69.1494304635633; Mon, 08 May 2017 21:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494304635; cv=none; d=google.com; s=arc-20160816; b=CGJtEc49KRT7h+7NQEFatnOK5X7ye7fAdoy+YhbIzwZltrKx5GoxP8FT4lCAH5/Yfn 6SYraBe59EuPa78ZpbfOS4ictBXImAa4D8CUSQ1kLs7sW5oMiwgvxW7rIZfzcr5m54fz I9YCZTw1xRpTd4l2WU6hbc3Z+PyuEBSN04nKZvt0Z+H1GYiLpp3lnkuU0alyB8eI5U/j 9LIZYvc8dUtBhLzyX30+jEjkiAKVfVXEYkEWvkGiKBJGv1PyOO6XgR6mMUxbjz9Tw9nv rOzaNnTaKy8ODLhZvBMJcMaOApEYPSm/x28bSfVn3gp+9vDtXVXvetY+7UnvJnjoDg10 9I6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=e+hpzgy4JNUgS85WZ8eJZpCfAZuaVnb66h37vL3h5rs=; b=al02zqBLPWZutFSpyl0Wo8+lyLXBvs8L1ZqoYrYT5TnMo5d+HmGSQCs6mNARaX5sqj 9WKC9eB3G0XcWy5A1VERb2gTSi4V9KhSSmLa8esczYInpb5oZ4rWD0j6Cc21xt05laKn +3hOQdEaq2nKo6jEt4L5GWL+1iHdUYPNPpU6Mb5AWy9fJz2Ny+VgJizoYz9B6FInTlMg 7zKuo0IQcYkjuEX1lNUoJ0rRYdq46BeZtc4AfxY3GJnny94oGzHjgcy8Y7m5QKWEmx/f N2Dz+1uM0pDF83hyR3XJzkVCuR1dc+PXoZeKkwGQ1/VJy/VDSzhfxM1dhZQE83LGnqzk tx2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v128si15147291pfb.156.2017.05.08.21.37.15; Mon, 08 May 2017 21:37:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdEIEgn (ORCPT + 6 others); Tue, 9 May 2017 00:36:43 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35631 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbdEIEgl (ORCPT ); Tue, 9 May 2017 00:36:41 -0400 Received: by mail-pf0-f179.google.com with SMTP id v14so43128461pfd.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=sHswBEriiyuM+hYRNEK9ClKd/pSHZU4YnJ2AWOmEw7EiIsDzn0BYTKvtQ/AZKYkyba 3stwxS5gmywF1qcHUdXK2NT7AgC8jeY9aJP/CtUyGwNhIW1Ycf+72Tyo1sIk9iSvV1DT ejyC35t590yEl8hegVotnibSaCr2N5p6KV6sPR3RWgjWmp7uZpdJgRUsrlNfyZacugGi oDibbKin3xZrY8JV5d1I7B5jst8iVcVNyul647dNJD9Tzst3OawuxJEWm372wuG6u2P2 AO+VzdTZwzveMTbT5qEegDHiiDhXyognHERVM5+n3VBtmDNbqDr2Yw2jp4n5HLOPqUmV dZQA== X-Gm-Message-State: AN3rC/7X9pGoDVzBK7V4MSdGUM/dOlXnnrBlr731ooxyrARyJDP8WzTN JoNHippDOQysG9/m 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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(+) -- 2.12.0 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);