Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4225211pxb; Tue, 10 Nov 2020 10:51:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+Q/mMgjMtxJ9F+/qZ66qYVCQ9gfRkAVJeZ5KMimo/eXf6Fr9nTnuNpN1PGFCyw5a9PdZR X-Received: by 2002:a17:906:1412:: with SMTP id p18mr21091802ejc.480.1605034274564; Tue, 10 Nov 2020 10:51:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605034274; cv=none; d=google.com; s=arc-20160816; b=UqpEuY5q3sDxAV3hm+feL5cPmEebGgTexr4ltwQNeYznbRGdX/sYuu/BKc0KwR/yG0 /FzNeUxWIF9JqbEiK0pa7sSo6JBgEy7I3+082o3SlSVjMaNJmU43whxTfsUNQXK+Ci1F Fx3MeTs9oEQor9tpoKCWhtcVcK6aYrV/f4L5PmAr1RYvyj1vIP1dS0b4R3TAoyTWAjrs CR71LQpqVtkwuF3t7eOxJHF//ZXNLBnR8+Z0Z2uSk4cVsUVuQ3Go+IN9cvXOv1jwr0rc c59P3AmLnus8ar3cCPRzP5bGXL5SbHHLdkn43UGEOR9cr9rDYPWZykq2KcAQGu4QY0q6 kDiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dmarc-filter:sender:dkim-signature; bh=TLsCNsopTYgMfYxQI+Rv7Ueci5CyMDHLKfaVFZJXCjQ=; b=SkC6qg+hEG1AKaFAFhF0W0LWWciZ8EBdSKxGqv+UtK/G/UJz/dAn5hE8VbRqJRsWWW A/39IPbI3vRtkbwMb3CUPSkN0hiNrwL+iFEaKfs6Pe2PbZncxa7ISeJAWiQUQC1iRlEs Nb5lsl7XsIMskQ4ROT7wTqqTSJxjbe+VMZ4yFgJK7M+BDYMsfEP6zcpmnf3vwwzK8CFl FvibimRUAUl54C02tXQY1ddax+HCH8rt9MaftUSGPg7a70BiLVMMvgejFkydnEgGbmbB mQV1clH2lc5uvKPZ1qHBEj4joEzQ4w/Alvi7yUeM0XgacLSwAa4Tb07n5ttMfwOHKYu5 kDSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=XScreMz+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si9803353ejc.310.2020.11.10.10.50.49; Tue, 10 Nov 2020 10:51:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=XScreMz+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731220AbgKJSug (ORCPT + 99 others); Tue, 10 Nov 2020 13:50:36 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:48469 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbgKJSuf (ORCPT ); Tue, 10 Nov 2020 13:50:35 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605034233; h=Date: Message-Id: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=TLsCNsopTYgMfYxQI+Rv7Ueci5CyMDHLKfaVFZJXCjQ=; b=XScreMz+A4XRPcVz7eSmOW7JPAuzIkNoMedezBZErBhsXBj7X0ypG2QHfjD35YewEBCfse5d N4AxeqpFedpf/z2nKKHpICK0eGl4aB5vrSaZxugKzvhHynBDCOKlzwNctZ761ZKbx98Bm8pJ U5XssYm3NFuJav4IMMtIBqhnl8I= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 5faae0e60d87d63775d684a0 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 10 Nov 2020 18:50:14 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 36A35C433FE; Tue, 10 Nov 2020 18:50:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,BAYES_00, MISSING_DATE,MISSING_MID,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 71609C433C8; Tue, 10 Nov 2020 18:50:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 71609C433C8 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=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [1/2] mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure From: Kalle Valo In-Reply-To: <20201028142110.18144-2-kitakar@gmail.com> References: <20201028142110.18144-2-kitakar@gmail.com> To: Tsuchiya Yuto Cc: Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Maximilian Luz , Andy Shevchenko , verdre@v0yd.nl, Tsuchiya Yuto User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.5.2 Message-Id: <20201110185013.36A35C433FE@smtp.codeaurora.org> Date: Tue, 10 Nov 2020 18:50:13 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Tsuchiya Yuto wrote: > When a PCIe function level reset (FLR) is performed but without fw reset for > some reasons (e.g., on Microsoft Surface devices, fw reset requires other > quirks), it fails to reset wifi properly. You can trigger the issue on such > devices via debugfs entry for reset: > > $ echo 1 | sudo tee /sys/kernel/debug/mwifiex/mlan0/reset > > and the resulting dmesg log: > > [ 45.740508] mwifiex_pcie 0000:03:00.0: Resetting per request > [ 45.742937] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 3 > [ 45.744666] mwifiex_pcie 0000:03:00.0: info: shutdown mwifiex... > [ 45.751530] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.751539] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771691] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771695] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 45.771697] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771698] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 45.771699] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771701] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 45.771702] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771703] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 45.771704] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771705] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 45.771707] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed > [ 45.771708] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 53.099343] mwifiex_pcie 0000:03:00.0: info: trying to associate to '[SSID]' bssid [BSSID] > [ 53.241870] mwifiex_pcie 0000:03:00.0: info: associated to bssid [BSSID] successfully > [ 75.377942] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 > [ 85.385491] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 15 > [ 87.539408] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 > [ 87.539412] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 99.699917] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 > [ 99.699925] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [ 111.859802] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 > [ 111.859808] mwifiex_pcie 0000:03:00.0: deleting the crypto keys > [...] > > When comparing mwifiex_shutdown_sw() with mwifiex_pcie_remove(), it > lacks mwifiex_init_shutdown_fw(). > > This commit fixes mwifiex_shutdown_sw() by adding the missing > mwifiex_init_shutdown_fw(). > > Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") > Signed-off-by: Tsuchiya Yuto 2 patches applied to wireless-drivers-next.git, thanks. fa74cb1dc0f4 mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure 566b4cb9587e mwifiex: update comment for shutdown_sw()/reinit_sw() to reflect current state -- https://patchwork.kernel.org/project/linux-wireless/patch/20201028142110.18144-2-kitakar@gmail.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches