Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp709007pxa; Thu, 27 Aug 2020 13:38:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQYnXEh55tzhJr4nDN6uIUBnu9qy/GXhzIcAjlE5MdgaLF/t71RfkY/LfbxKVaAXrCe03d X-Received: by 2002:aa7:c389:: with SMTP id k9mr5489527edq.220.1598560700229; Thu, 27 Aug 2020 13:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598560700; cv=none; d=google.com; s=arc-20160816; b=gCZOkXKy8TGNsOARIz7AztP7rO6BLwNrBtB/R6xu0yFImLDJBwMRMW1UITnD0F4aqQ utapHdMm92ApfqZaGIVrr71Tezf+IuT2X5XKpL5fdl+0b1p0EXO7+T4CDGAmh8ojePuf qVLVbr47VmZ/Rszbz9KGud+W9meafGPB2HthRhzbKrP9NboeMaanIHorIaJ0zFK7+jJY G6XxJ9lPETTFtPWb+H42NycHG27JhXHfWyqaNzH6fRAy6jtuHGPW379bnZawc07UAf0Y LLkOLt9BbJAtLnIoc31F9ECXea+kVXs52YdBy02vDhxgM2om7sNJiBycyXR/bTW+mMnc ByWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lLI7KZEcm6pK/DDnWR2PxemX1EjkQ7OUHds3UQLACGM=; b=ysLBBPB+zSm8S00KY2UjDXwbWH0VDO0tx3ygFLrVx8PNOluVOHKWfo8iGKR5m6+a4B PRLTiHG6TlNskxKn83leczRPqo8a0iPb2yPSpA6+4/AZytJxk6yKpCMoZpwtT9GvnPD3 PoDFyaxU64JSPPuEXYxzHIzTSOxbsGfxrxEcQgisClMUq05JYFR8wod2dARCQ1cBdjr2 rEVjgPwirngtu1bKb4INR4dP6ksKvWhp4YAzNl6gUyw388oaTIqR4reJX7G3hqWOfmxt 2QGM2YWs0ottEmInaCMBSyzQWVNsC/IhI+h4tKVUjmjfQH6VyzR9VAgk0IhwZaogh8re Vdhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=stowNP4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si2090940ejf.666.2020.08.27.13.37.57; Thu, 27 Aug 2020 13:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=stowNP4s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbgH0UhG (ORCPT + 99 others); Thu, 27 Aug 2020 16:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbgH0UhF (ORCPT ); Thu, 27 Aug 2020 16:37:05 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2241C061264; Thu, 27 Aug 2020 13:37:05 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id b14so7377402qkn.4; Thu, 27 Aug 2020 13:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lLI7KZEcm6pK/DDnWR2PxemX1EjkQ7OUHds3UQLACGM=; b=stowNP4s4FnAKpm3wilVDwZ2UBtbYh7M9bYohbaviVrLBO95Vh6XN9u2R0G+63fI7K hSZvrXvBMAkyyfql/9f091cLTBZhyQxaO7MnxyRnZEow4QKjXL+fEjxXXRi/AVTxEaSB UpRr2zVU3BGr98hRdGVLHMx+hz6Nfv8/P9FwuwDbdk3kEw73ehEF4MXpkVhE1RiBZx4J tsr2G0hNVhxT9MJbkrNYf28MnGxpqd8FYI6HdJAkfnQmheB3aNec6sF8mgOte3Pl/Lrt /T1gBgEng2HPz1vp6p0Yl7WE4znbptOkS0dMGeppvpUus0oArYvNPxs8PeW9RUVgVFZj 5YSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lLI7KZEcm6pK/DDnWR2PxemX1EjkQ7OUHds3UQLACGM=; b=mRIlK84ANlDZZDcaHYBOj+OyD7X5gyfnB5unCRDm+WkCMwsVw7P9mbgpw+xjK5SjdX vmYg62ZZbqRtQq98bBwa87E3x+skAlZ9wYs5Sg2nXkdu1+xM+pE9njfrQ+wG+M2CtkXU lGT/TZXR8KqQp9KV3jpAoeEQxEK1a5uNocKhKzFh2BTxI/npQIZBhaowQl/3mzxcoR6O d3BNkMjDSliRiJKQad/5WtYasB0iuZrnTWrHPzAYa/l17kyyOChicihpAfEf7r773p3d Zk4vW0sRy3E+F6lJe412FAlzdFYXhX6BCj8LjnngYGEysE3sK2KGDFJfPAIB5zRmI3uu q5aQ== X-Gm-Message-State: AOAM530mCHx1KLsoQ64+92obJUc1dPgEGRe8v5h1DV8OvM/2zir8+OBV 6iaq4c0/s/BaiaE+q1BbPtQOj27NKQnTx9YWBWo= X-Received: by 2002:a37:9d4f:: with SMTP id g76mr19685247qke.395.1598560624726; Thu, 27 Aug 2020 13:37:04 -0700 (PDT) MIME-Version: 1.0 References: <20200827194225.281eb7dc@coco.lan> In-Reply-To: <20200827194225.281eb7dc@coco.lan> From: Steve deRosier Date: Thu, 27 Aug 2020 13:36:28 -0700 Message-ID: Subject: Re: [PATCH] Revert "wlcore: Adding suppoprt for IGTK key in wlcore driver" To: Mauro Carvalho Chehab Cc: Kalle Valo , linuxarm@huawei.com, mauro.chehab@huawei.com, John Stultz , Manivannan Sadhasivam , "David S. Miller" , Jakub Kicinski , Maital Hahn , "Gustavo A. R. Silva" , Raz Bouganim , Tony Lindgren , Dinghao Liu , Johannes Berg , Fuqian Huang , linux-wireless , Network Development , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mauro, On Thu, Aug 27, 2020 at 10:42 AM Mauro Carvalho Chehab wrote: > > Em Thu, 27 Aug 2020 08:48:30 -0700 > Steve deRosier escreveu: > > > On Tue, Aug 25, 2020 at 10:49 PM Mauro Carvalho Chehab > > wrote: > > > > > > This patch causes a regression betwen Kernel 5.7 and 5.8 at wlcore: > > > with it applied, WiFi stops working, and the Kernel starts printing > > > this message every second: > > > > > > wlcore: PHY firmware version: Rev 8.2.0.0.242 > > > wlcore: firmware booted (Rev 8.9.0.0.79) > > > wlcore: ERROR command execute failure 14 > > > > Only if NO firmware for the device in question supports the `KEY_IGTK` > > value, then this revert is appropriate. Otherwise, it likely isn't. > > Yeah, that's what I suspect too: some specific firmware is required > for KEY_IGTK to work. > > > My suspicion is that the feature that `KEY_IGTK` is enabling is > > specific to a newer firmware that Mauro hasn't upgraded to. What the > > OP should do is find the updated firmware and give it a try. > > I didn't try checking if linux-firmware tree has a newer version on > it. I'm using Debian Bullseye on this device. So, I suspect that > it may have a relatively new firmware. > > Btw, that's also the version that came together with Fedora 32: > > $ strings /lib/firmware/ti-connectivity/wl18xx-fw-4.bin |grep FRev > FRev 8.9.0.0.79 > FRev 8.2.0.0.242 > > Looking at: > https://git.ti.com/cgit/wilink8-wlan/wl18xx_fw/ > > It sounds that there's a newer version released this year: > > 2020-05-28 Updated to FW 8.9.0.0.81 > 2018-07-29 Updated to FW 8.9.0.0.79 > > However, it doesn't reached linux-firmware upstream yet: > > $ git log --pretty=oneline ti-connectivity/wl18xx-fw-4.bin > 3a5103fc3c29 wl18xx: update firmware file 8.9.0.0.79 > 65b1c68c63f9 wl18xx: update firmware file 8.9.0.0.76 > dbb85a5154a5 wl18xx: update firmware file > 69a250dd556b wl18xx: update firmware file > dbe3f134bb69 wl18xx: update firmware file, remove conf file > dab4b79b3fbc wl18xx: add version 4 of the wl18xx firmware > > > AND - since there's some firmware the feature doesn't work with, the > > driver should be fixed to detect the running firmware version and not > > do things that the firmware doesn't support. AND the firmware writer > > should also make it so the firmware doesn't barf on bad input and > > instead rejects it politely. > > Agreed. The main issue here seems to be that the current patch > assumes that this feature is available. A proper approach would > be to check if this feature is available before trying to use it. > > Now, I dunno if version 8.9.0.0.81 has what's required for it to > work - or if KEY_IGTK require some custom firmware version. > > If it works with such version, one way would be to add a check > for this specific version, disabling KEY_IGTK otherwise. > > Also, someone from TI should be sending the newer version to > be added at linux-firmware. > > I'll try to do a test maybe tomorrow. > I think we're totally agreed on all of the above points. Fundamentally: the orig patch should've been coded defensively and tested properly since clearly it causes certain firmwares to break. Be nice if TI would both update the firmware and also update the driver to detect the relevant version for features. I don't know about this one, but I do know the QCA firmwares (and others) have a set of feature flags that are detected by the drivers to determine what is supported. I look forward to hearing the results of your test. This whole thing has gotten me interested. I'd be tempted to pull out the relevant dev boards and play with them myself, but IIRC they got sent back to a previous employer and I don't have access to them anymore. > > But I will say I'm making an educated guess; while I have played with > > the TI devices in the past, it was years ago and I won't claim to be > > an expert. I also am unable to fix it myself at this time. > > > > I'd just rather see it fixed properly instead of a knee-jerk reaction > > of reverting it simply because the OP doesn't have current firmware. > > > And let's revisit the discussion of having a kernel splat because an > > unrelated piece of code fails yet the driver does exactly what it is > > supposed to do. We shouldn't be dumping registers and stack-trace when > > the code that crashed has nothing to do with the registers and > > stack-trace outputted. It is a false positive. A simple printk WARN > > or ERROR should output notifying us that the chip firmware has crashed > > and why. IMHO. > > Thanks, > Mauro Thanks, - Steve