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: 759898 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wMRRP5d1Wz9s75 for ; Tue, 9 May 2017 14:37:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hMYwOgAy"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdEIEgn (ORCPT ); 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(+) 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);