From patchwork Wed Nov 18 18:20:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaumik Bhatt X-Patchwork-Id: 11915557 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 532DCC63798 for ; Wed, 18 Nov 2020 18:20:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6A3324248 for ; Wed, 18 Nov 2020 18:20:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="h5kp+gnp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726602AbgKRSUq (ORCPT ); Wed, 18 Nov 2020 13:20:46 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:11957 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbgKRSUq (ORCPT ); Wed, 18 Nov 2020 13:20:46 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605723645; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=V5QH/vQSVKr3HElpyNLc6yOQyNNozrNzG76HGXqu0AA=; b=h5kp+gnpFo1Qzb+fLkSWYKE0BZrts1AyMiLHkDvoW7R1NWMVi/Ct0lBuy+/NzUEywA5fXjiN GeMKHmXF/PUNeqoetsaHZZVDhs4cjGi+7/cWQ8Z9EOfrEEihuhk0PdRlj/HCcokiNtZCGtXL nrqY3S1o9UHcgG76hZVTyACd8FM= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyJiZjI2MiIsICJuZXRkZXZAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5fb565f922377520ee4df07b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 18 Nov 2020 18:20:41 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 86648C43463; Wed, 18 Nov 2020 18:20:41 +0000 (UTC) Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4A73BC433ED; Wed, 18 Nov 2020 18:20:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4A73BC433ED Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, cjhuang@codeaurora.org, linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, linux-kernel@vger.kernel.org, ath11k@lists.infradead.org, clew@codeaurora.org, loic.poulain@linaro.org, netdev@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH] net: qrtr: Unprepare MHI channels during remove Date: Wed, 18 Nov 2020 10:20:25 -0800 Message-Id: <1605723625-11206-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Reset MHI device channels when driver remove is called due to module unload or any crash scenario. This will make sure that MHI channels no longer remain enabled for transfers since the MHI stack does not take care of this anymore after the auto-start channels feature was removed. Signed-off-by: Bhaumik Bhatt Acked-by: Jakub Kicinski --- net/qrtr/mhi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/qrtr/mhi.c b/net/qrtr/mhi.c index 7100f0b..2bf2b19 100644 --- a/net/qrtr/mhi.c +++ b/net/qrtr/mhi.c @@ -104,6 +104,7 @@ static void qcom_mhi_qrtr_remove(struct mhi_device *mhi_dev) struct qrtr_mhi_dev *qdev = dev_get_drvdata(&mhi_dev->dev); qrtr_endpoint_unregister(&qdev->ep); + mhi_unprepare_from_transfer(mhi_dev); dev_set_drvdata(&mhi_dev->dev, NULL); }