From patchwork Wed Dec 8 06:27:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Mosberger-Tang X-Patchwork-Id: 523047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F138C433FE for ; Wed, 8 Dec 2021 06:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239930AbhLHGb1 (ORCPT ); Wed, 8 Dec 2021 01:31:27 -0500 Received: from o1.ptr2625.egauge.net ([167.89.112.53]:57530 "EHLO o1.ptr2625.egauge.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239797AbhLHGb0 (ORCPT ); Wed, 8 Dec 2021 01:31:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=egauge.net; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type; s=sgd; bh=cU7a7l2hUokyjWAVxGR44X/SZoxT7Ra+h9paRR3oMk8=; b=RKz31+dhMlqjVtbHKq3Wkm+rsoOCTedN2hh2w6Qt4IhHNEr6zJ4KHdfbEUaJsmYOojf+ to0u/CCPVNkrJi/kdWANeS1x955qFm3Vlk9Hg6wMcF8qEsVbWXkuIULi5VZAtu9NRVqyiW tggNCt5IwMAcCYVHLl7+p6scR/jkuXuLQq09zKDSJXEWO/nci3WQOgIFn+wdh2znidhkBP bR4XfEttWxX1euFO9z2M1uVeyhEa86C+EX5Qj9dqJhgIF/XpIZQGupd3mwRosTXutUKVJk r2Md0Rezyn9kkKBit6Ab09CUouGUwQ88dGJYQBSGLvxYN5S9Rfu3af0A66TpLP8Q== Received: by filterdrecv-7bc86b958d-n76s9 with SMTP id filterdrecv-7bc86b958d-n76s9-1-61B0506A-31 2021-12-08 06:27:55.052284633 +0000 UTC m=+8410090.793158700 Received: from pearl.egauge.net (unknown) by ismtpd0057p1las1.sendgrid.net (SG) with ESMTP id NpgNFnvoT5aqygQKbqhhUA Wed, 08 Dec 2021 06:27:54.773 +0000 (UTC) Received: by pearl.egauge.net (Postfix, from userid 1000) id CE68E700371; Tue, 7 Dec 2021 23:27:53 -0700 (MST) From: David Mosberger-Tang Subject: [PATCH] wilc1000: Fix spurious "FW not responding" error Date: Wed, 08 Dec 2021 06:27:55 +0000 (UTC) Message-Id: <20211208062747.3405221-1-davidm@egauge.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-SG-EID: +kMxBqj35EdRUKoy8diX1j4AXmPtd302oan+iXZuF8m2Nw4HRW2irNspffT/khET6RJF6+Prbl0h/EtF1rRLvLjPqF1dYkzQ4i9aTAfhF9bpA1AGHFo/BAzRPqqedO32QpdHnxgt4WSBQT0BdUhpMaN3ttCdobzcgqUTuy7CrfecfHdjm5as43Hre61Q8khGWqf1hoxVVfQ8nKTjNoc1G6JJJ/1gXZGDzmm7etMFUJ/NMbMCvlLw6/YadvfU18oxWLWO9bojgt35JEpSx7wAUA== To: Ajay Singh Cc: Claudiu Beznea , Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Mosberger-Tang X-Entity-ID: Xg4JGAcGrJFIz2kDG9eoaQ== Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When deinitializing the driver, one or more "FW not responding" error appears on the console. This appears to be due to wilc_wlan_stop() disabling host/WILC1000 communication, but then right afterwards, it tries to release the bus with chip-sleep enabled. The problem is enabling the chip-sleep cannot success once host/WILC1000 communication is disabled. Fix by only releasing the bus. Signed-off-by: David Mosberger-Tang --- drivers/net/wireless/microchip/wilc1000/wlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index f1e4ac3a2ad5..5d7f5b52f6de 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -1224,7 +1224,8 @@ int wilc_wlan_stop(struct wilc *wilc, struct wilc_vif *vif) ret = 0; release: - release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); + /* host comm is disabled - we can't issue sleep command anymore: */ + release_bus(wilc, WILC_BUS_RELEASE_ONLY); return ret; }