From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 6ADB8C43331 for ; Wed, 13 Nov 2019 07:00:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C9DD222C2 for ; Wed, 13 Nov 2019 07:00:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="iLRBNzKe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726216AbfKMHAe (ORCPT ); Wed, 13 Nov 2019 02:00:34 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39933 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbfKMHAe (ORCPT ); Wed, 13 Nov 2019 02:00:34 -0500 Received: by mail-wr1-f65.google.com with SMTP id l7so990336wrp.6 for ; Tue, 12 Nov 2019 23:00:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rugrYaxZCiP2gM4hsS0PmTY/T9FiVMFS6xWRRwp7Uks=; b=iLRBNzKe3Ty81HmbP7CV1b8+p7WvR524FmbkGbeQglx6vlgdPRIEtlT5aQ667wL1tT fa5Jk+lPWh5Aba5vbf7Qv0SxdNsfarPP+m89qaVpdBD6q1y1SSlKcVdKojOZpKOD6o6d jEoXGrwvFyn1VDH2BV6jkMVVKdGisEZ2TLc3U1/71aFYAsETXJS68fekfL7x/wRPQzTg d/pWhoDmZkQTwAmliusnRed7o+iNesnwRFxbNsvtQbpgkOmFNOCfJIHBwFSiHBHwIe+b t9EiLrDZ3+fQ7fkIi/BH3hCQgdP8zNfLg+akdBk7LMt23LTHtzUqpviZYkD8Uxx8o59Z 8yWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rugrYaxZCiP2gM4hsS0PmTY/T9FiVMFS6xWRRwp7Uks=; b=V6lI7FUDaN0LjDH2sK4IFqEgtftmRPBGaOW0xcpz3tiofiBfashCrrLv8gVI+I4UIO k3P+Fc9JuNOuvEO7nXPwxX/FtEhTImMblhSZRrAGVOlkv7tlae7N6FEzaojC5xbVBzKt Z+2D09z4TNYjPA6ULOmz2xlfXtAVgG5cEw1O9/iRhxIl34cbtdGUvFyz3q/+eOD5vZgC B5G6oZnsWdo/vCLhZKTaOTwd6Sb5Xx+I3JXi85bfsjbtTmUfC0uwZxvizlC84AZSLBvz SsD6l7vdLnx608hnoIO1DmUuNxZBOBNjNLdTTR3DyWhowqtA62PpjMuM861wCjIEn/md CF0Q== X-Gm-Message-State: APjAAAWI8NP5Tg63acFB/ROPuuEvxrRnE8SvkFvjXSUBQkOmTkRcMj7N m2++Pu194wM0ao1y6k87eFaZIQ== X-Google-Smtp-Source: APXvYqzxXo5+THKRrJBHRbmsw/q0KRwfVf5UnS3F6vDui9Ylkubka0wc+vrYEI1WSLZkHjvVSA2Odw== X-Received: by 2002:adf:e8ce:: with SMTP id k14mr1149133wrn.393.1573628432175; Tue, 12 Nov 2019 23:00:32 -0800 (PST) Received: from netronome.com ([2001:982:756:703:d63d:7eff:fe99:ac9d]) by smtp.gmail.com with ESMTPSA id 4sm1292022wmd.33.2019.11.12.23.00.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Nov 2019 23:00:32 -0800 (PST) Date: Wed, 13 Nov 2019 08:00:31 +0100 From: Simon Horman To: Kalle Valo Cc: Jeffrey Hugo , davem@davemloft.net, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, MSM , lkml Subject: Re: [PATCH] ath10k: Handle "invalid" BDFs for msm8998 devices Message-ID: <20191113070031.qlikjctfnoxtald5@netronome.com> References: <20191106234712.2380-1-jeffrey.l.hugo@gmail.com> <20191112090444.ak2xu67eawfgpdgb@netronome.com> <878soks77y.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878soks77y.fsf@kamboji.qca.qualcomm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Nov 13, 2019 at 06:58:25AM +0200, Kalle Valo wrote: > Jeffrey Hugo writes: > > > On Tue, Nov 12, 2019 at 2:04 AM Simon Horman wrote: > >> > >> On Wed, Nov 06, 2019 at 03:47:12PM -0800, Jeffrey Hugo wrote: > >> > When the BDF download QMI message has the end field set to 1, it signals > >> > the end of the transfer, and triggers the firmware to do a CRC check. The > >> > BDFs for msm8998 devices fail this check, yet the firmware is happy to > >> > still use the BDF. It appears that this error is not caught by the > >> > downstream drive by concidence, therefore there are production devices > >> > in the field where this issue needs to be handled otherwise we cannot > >> > support wifi on them. So, attempt to detect this scenario as best we can > >> > and treat it as non-fatal. > >> > > >> > Signed-off-by: Jeffrey Hugo > >> > --- > >> > drivers/net/wireless/ath/ath10k/qmi.c | 11 +++++++---- > >> > 1 file changed, 7 insertions(+), 4 deletions(-) > >> > > >> > diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c > >> > index eb618a2652db..5ff8cfc93778 100644 > >> > --- a/drivers/net/wireless/ath/ath10k/qmi.c > >> > +++ b/drivers/net/wireless/ath/ath10k/qmi.c > >> > @@ -265,10 +265,13 @@ static int ath10k_qmi_bdf_dnld_send_sync(struct ath10k_qmi *qmi) > >> > goto out; > >> > > >> > if (resp.resp.result != QMI_RESULT_SUCCESS_V01) { > >> > - ath10k_err(ar, "failed to download board data file: %d\n", > >> > - resp.resp.error); > >> > - ret = -EINVAL; > >> > - goto out; > >> > + if (!(req->end == 1 && > >> > + resp.resp.result == QMI_ERR_MALFORMED_MSG_V01)) { > >> > >> Would it make sense to combine the inner and outer condition, > >> something like this (completely untested) ? > > > > I guess, make sense from what perspective? Looks like the assembly > > ends up being the same, so it would be down to "readability" which is > > subjective - I personally don't see a major advantage to one way or > > the other. It does look like Kalle already picked up this patch, so > > I'm guessing that if folks feel your suggestion is superior, then it > > would need to be a follow on. My feeling is that it would reduce the churn in the patch making the patch more readable and likewise improving the readability of the code. But I do agree this does not affect run-time and I am ambivalent about updating the patch if it has already been (semi-)accepted. > > Same here, it's only on the pending branch so changes are still > possible. > > -- > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches