Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1583703lkv; Wed, 19 May 2021 13:21:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDhu+DPmSQrBwpIDsJegjocVRIUrLRPZ6jU9L/4putyi1VG58hmCLbHMNwUq4KP51D5Z3z X-Received: by 2002:a05:6638:3010:: with SMTP id r16mr1081060jak.126.1621455691150; Wed, 19 May 2021 13:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455691; cv=none; d=google.com; s=arc-20160816; b=kxFQz+NN/Scy2lODPZ85l+i6ZfV501lJVJkhT+EVXLa6baHSvp6wdxBMcPunv8H8R9 c/JthS+nMGYhESM57q2l7a2ufUUCIx+c1wQ4k5ilaSRoiJjc4U3RijtG6DjK8IhD08sP 6M+CXSuaapr06jt2uUhzEFM1j5QQEXcI71Yb4eR1MTGjKMnAdhuEcOMFI6eypHKBa9FC oRI5b8YiJ/6AjZwZP0SqPbvsQXDQmVTkHJbwQ7cux0/qThaK6LIE4Jroz3LzjzwIH1z+ jvAE5Hh2CDY4L36RUpGlA/dVWoifVxDTjmXRvwu1fKm5RJLUPhiiwAdjaqCO6q9cxsYd /Ldg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :user-agent:message-id:references:in-reply-to:subject:cc:to:from :date:mime-version; bh=ZzpC85Xv4Cb2bHJAXt44ho3OyPZO3NRrH207lXMuyzE=; b=hOyWUehUnOPJflkFeNKcCvwYyTJRk7EZLFgu5U2yeBBN2nod/gO4TLII6gpGri2Cmi 7joERtyqTi2B3EBpfU5YMnbLAwbssFgIuuAPbTQ+ahoUD3uFswaisgvIn/1UP/G+DaRL FqQpO7/f6L1omT8or5XDOy4VxEKVgt4BYd64kcQqgs4jPsRTat0H9H1ojr9ME1O/bCM+ P/tcH+ikFpfoJg1uQBZ9MQdTITWAanjpHPgt2C1+T/U+kTPG7l6nLL90G0YZwknVhwWi 3ogqLN6skF3+9a/3RH5KMk6urSAksB600V9Ql3qLCdTNgmZp74AIDjBi7cMC0iv7fUCI XUqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bewaar.me header.s=transip-a header.b=kOWJ6cDu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewaar.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si575876ilj.128.2021.05.19.13.21.17; Wed, 19 May 2021 13:21:30 -0700 (PDT) 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=@bewaar.me header.s=transip-a header.b=kOWJ6cDu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewaar.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbhESTVr (ORCPT + 99 others); Wed, 19 May 2021 15:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhESTVq (ORCPT ); Wed, 19 May 2021 15:21:46 -0400 Received: from outbound1.mail.transip.nl (outbound1.mail.transip.nl [IPv6:2a01:7c8:7c8::72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A254EC06175F; Wed, 19 May 2021 12:20:23 -0700 (PDT) Received: from submission14.mail.transip.nl (unknown [10.103.8.165]) by outbound1.mail.transip.nl (Postfix) with ESMTP id 4FljPd30KGzRjlT; Wed, 19 May 2021 21:20:21 +0200 (CEST) Received: from transip.email (unknown [10.103.8.118]) by submission14.mail.transip.nl (Postfix) with ESMTPA id 4FljPb1nVZz2SSZt; Wed, 19 May 2021 21:20:19 +0200 (CEST) MIME-Version: 1.0 Date: Wed, 19 May 2021 21:20:19 +0200 From: Dave Olsthoorn To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: Sharvari Harisangam , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: mwifiex firmware crash In-Reply-To: <20210515165338.7lqe6nqtkevpc5lh@pali> References: <20210515024227.2159311-1-briannorris@chromium.org> <713286ddc100bd63a9dbefdece39c935@bewaar.me> <20210515154042.mscvvyfapuvwdgzy@pali> <20210515165338.7lqe6nqtkevpc5lh@pali> Message-ID: <61c5c6ef663d01f8505cadba47104bb5@bewaar.me> X-Sender: dave@bewaar.me User-Agent: Webmail Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: ClueGetter at submission14.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=bewaar.me; t=1621452019; h=from:subject:to:cc: references:in-reply-to:date:mime-version:content-type; bh=ZzpC85Xv4Cb2bHJAXt44ho3OyPZO3NRrH207lXMuyzE=; b=kOWJ6cDuKf7y8GEX4QI0EroFyrhgefjqUfjtqfqgJOqkMY1wLRBVSUr9EmggVf+ELNjrg0 6T8rjqAfFBWi5EWIwVunPFlTCLPYoSlLJot+feqNL2mwbBuckTVk5nq9gyTKl2v5FdrQMw TEbFdGMDnrt8hBqohYy2FMFbs8AiA/qAeDBdhheJyBLd78NBdMCsXgt5Oe8c/4uYoqaDqS P/xm2Fw388q4JNMinfQLtcjtZvhP9xRZQMlM9DbxEBnf7m5DtaIBnc9oujAjvjAim4BXHA f2mpahM1wS+UDSJUMXG8efEjHUcSQpStw5f8Nf2zJeQHprUf5QREoPPDXmVJzQ== X-Report-Abuse-To: abuse@transip.nl Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, I'll drop some of the people since this is a sub-thread of the original, I'll keep the lists for access to this using lore.kernel.org. On 2021-05-15 18:53, Pali Rohár wrote: > Hello! > > On Saturday 15 May 2021 18:32:30 Dave Olsthoorn wrote: >> Hi, >> >> On 2021-05-15 17:40, Pali Rohár wrote: >> > On Saturday 15 May 2021 17:10:31 Dave Olsthoorn wrote: >> > > The firmware still seems to crash quicker than previously, but >> > > that's a >> > > unrelated problem. >> > >> > Hello! Do you have some more details (or links) about mentioned firmware >> > crash? >> >> Sure, firmware crashes have always been a problem on the Surface >> devices. > > What wifi chip you have on these devices? Because very similar firmware > crashes I see on 88W8997 chip (also with mwifiex) when wifi card is > configured in SDIO mode (not PCIe). > The Surface Pro 2017 has an 88W8897. > I know that there are new version of firmwares for these 88W8xxx chips, > but they are available only under NXP NDA and only for NXP customers. > So it looks like that end users with NXP wifi chips are out of luck. > >> They seem to be related, at least for some of the crashes, to power >> management. For this reason I disabled powersaving in NetworkManager >> which >> used to make it at least stable enough for me, in 5.13 this trick does >> not >> seem to work. >> >> The dmesg log attached shows a firmware crash happening, the card does >> not >> work even after a reset or remove & rescan on the pci(e) bus. > > Similar issue, card start working again only after whole system > restart. > > So this is something which can be resolved only in NXP. After a conversation with the author of the patches, the problem is not the power management itself (for most hardware revisions [1]) but a race where pci commands are being written while the device is being put to sleep. A fix for this problem is included in the patches which make all pci commands synchronous instead of asynchronous [2]. After that a the wakeup patch seems relevant [3]. >> There are patches [1] which have not been submitted yet and where >> developed >> as part of the linux-surface effort [2]. From my experience these >> patches >> resolve most if not all of the firmware crashes. > > Is somebody going to cleanup these patches and send them for inclusion > into mainline kernel? I see that most of them are PCIe related, but due > to seeing same issues also on SDIO bus, I guess adding similar hooks > also for SDIO could make also SDIO more stable... The author plans to upstream them, he just hasn't gotten around to it. Regards, Dave [1]: https://github.com/linux-surface/linux-surface/blob/master/patches/5.12/0002-mwifiex.patch#L2237-L2338 [2]: https://github.com/linux-surface/linux-surface/blob/master/patches/5.12/0002-mwifiex.patch#L1152-L1207 [3]: https://github.com/linux-surface/linux-surface/blob/master/patches/5.12/0002-mwifiex.patch#L1992-L2079