Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1500172ybc; Tue, 12 Nov 2019 23:01:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwpEMApt85vwIIdz9l8ojw5XqyqzQc4ySEbkfdwvd6sO4M9hoinkP33JJcVxToqtK4m84mE X-Received: by 2002:a17:906:3490:: with SMTP id g16mr1299989ejb.189.1573628504710; Tue, 12 Nov 2019 23:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573628504; cv=none; d=google.com; s=arc-20160816; b=lv6rLA9lw2228uWncD5qQ0laOFhup0bCTs/N3oQAlS2XRaFJuswjCqdmJ64FqbMvIp 9qfGvv9q4ajs+SVWsmJYhTttoPqO2PPsYwsoDqPmOtrJoeu6DpM/IWsGBEeK4Q8jBGRm NLqVNwXKjGgwUSplarJnvC5ojQC82YrSrf0oN4IV+Bp9zBgxiWn0JgVwM+HgSQSJa1Tj HO0HSjdfkh8k96ZdSACLTVtcWQdARbPpxFJE/B9VGBOXoUVk2b+Z+/qCgQsBvM+lRloD 7dyjk3GlXE9fSC8m9XScpv1FQVbg2jR0x5fcYETPe4wJzzsy64hI45ZoZi+JiL4cnt9b J+lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rugrYaxZCiP2gM4hsS0PmTY/T9FiVMFS6xWRRwp7Uks=; b=AbvBhDLGT6G58kQVmAHCFw9d0aN5rHceLYABnLV6vgkV9XEeY8Uz5cF7UYwFGjiGiK nsOjh1I5I5w6MBYQSGLivn02PR8SO7/CqSaK2xaWCvpMEuC9C7cHt65FOq6hQkE40OaX 8jCxZRkpy5hkqP7hw9xCzNUe1vlBBmd7SUF1CbIPeztMyQaPGu70Npbx9qSbBTgxjDYE gssnVLTW4oRsTGbArf2wrrTz0crCnoTBRmh1neQ4L040wDaZiKyEUDpsAy0Qhz0mM6Av Wgj3EjHAFPnNU2/1nh/O3XZStGneBpYvqDRpG150eZ/1v4xblx+DDSRGnx+alLDcQ/wM 0+DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=iLRBNzKe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r20si675142edm.17.2019.11.12.23.01.19; Tue, 12 Nov 2019 23:01:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=iLRBNzKe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726378AbfKMHAe (ORCPT + 99 others); Wed, 13 Nov 2019 02:00:34 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41363 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbfKMHAe (ORCPT ); Wed, 13 Nov 2019 02:00:34 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so977482wrm.8 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=SEYikwFMMhs03Wg6dQeSM6GRVoOM/Fy6EZKe7ZIZiJn8rDAtJ+BjtUuaPkYOEJmBES d+yyMvU9fyLGkLhUNVtOiWvfcCnQH6UuAIvJhTQvcwIsTY+9RIbtNMspOHQk7gOOvsJH Fr9RVRbQu+Vjo7j3WZar6PTwDuSc41T39gq/c1pyCFchgqrtzwyfHWvuMmDwmbgsDBaa onIwxHDJk6NjO+zCfuzGNlS/MUNE5kyolo+kJ8tenK4SUO/M2ELAIvTUV8bSM+BO0A5t IImjU2tl9TQ8+HkqDldRti7+r7W/jhiw8wSZV6jxQow2XZgNTTucsCQfvdzPRAsZe/8N 6aVA== X-Gm-Message-State: APjAAAV3NEkamWRAD2kiYyQjBNiDLrD5UHrUDhUSmvam66rciixCB0xY SJe4c2VeHv5H3gCPhCEdCh+zcA== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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