From: Kalle Valo <kvalo@codeaurora.org>
To: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Cc: Simon Horman <simon.horman@netronome.com>,
linux-wireless@vger.kernel.org,
lkml <linux-kernel@vger.kernel.org>,
ath10k@lists.infradead.org, netdev@vger.kernel.org,
MSM <linux-arm-msm@vger.kernel.org>,
davem@davemloft.net
Subject: Re: [PATCH] ath10k: Handle "invalid" BDFs for msm8998 devices
Date: Wed, 13 Nov 2019 06:58:25 +0200 [thread overview]
Message-ID: <878soks77y.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CAOCk7NoXv2-8GO=VYS8dNPJF6sj=S3RbkfqQGW0kvvVmR8V1kw@mail.gmail.com> (Jeffrey Hugo's message of "Tue, 12 Nov 2019 08:53:51 -0700")
Jeffrey Hugo <jeffrey.l.hugo@gmail.com> writes:
> On Tue, Nov 12, 2019 at 2:04 AM Simon Horman <simon.horman@netronome.com> 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 <jeffrey.l.hugo@gmail.com>
>> > ---
>> > 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.
Same here, it's only on the pending branch so changes are still
possible.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Cc: Simon Horman <simon.horman@netronome.com>,
davem@davemloft.net, ath10k@lists.infradead.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
MSM <linux-arm-msm@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ath10k: Handle "invalid" BDFs for msm8998 devices
Date: Wed, 13 Nov 2019 06:58:25 +0200 [thread overview]
Message-ID: <878soks77y.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CAOCk7NoXv2-8GO=VYS8dNPJF6sj=S3RbkfqQGW0kvvVmR8V1kw@mail.gmail.com> (Jeffrey Hugo's message of "Tue, 12 Nov 2019 08:53:51 -0700")
Jeffrey Hugo <jeffrey.l.hugo@gmail.com> writes:
> On Tue, Nov 12, 2019 at 2:04 AM Simon Horman <simon.horman@netronome.com> 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 <jeffrey.l.hugo@gmail.com>
>> > ---
>> > 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.
Same here, it's only on the pending branch so changes are still
possible.
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2019-11-13 4:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 23:47 [PATCH] ath10k: Handle "invalid" BDFs for msm8998 devices Jeffrey Hugo
2019-11-06 23:47 ` Jeffrey Hugo
2019-11-12 9:04 ` Simon Horman
2019-11-12 9:04 ` Simon Horman
2019-11-12 15:53 ` Jeffrey Hugo
2019-11-12 15:53 ` Jeffrey Hugo
2019-11-13 4:58 ` Kalle Valo [this message]
2019-11-13 4:58 ` Kalle Valo
2019-11-13 7:00 ` Simon Horman
2019-11-13 7:00 ` Simon Horman
2019-11-12 19:08 ` Bjorn Andersson
2019-11-12 19:08 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878soks77y.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=jeffrey.l.hugo@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.