linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Gonzalez <mgonzalez@freebox.fr>
To: Kalle Valo <kvalo@kernel.org>
Cc: Jeff Johnson <quic_jjohnson@quicinc.com>,
	ath10k <ath10k@lists.infradead.org>,
	wireless <linux-wireless@vger.kernel.org>,
	DT <devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Pierre-Hugues Husson <phhusson@freebox.fr>,
	Jami Kettunen <jamipkettunen@gmail.com>,
	Jeffrey Hugo <quic_jhugo@quicinc.com>
Subject: Re: [PATCH 1/2] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
Date: Wed, 28 Feb 2024 18:19:03 +0100	[thread overview]
Message-ID: <c58e67e6-6a7f-4963-86b9-580165bf05ba@freebox.fr> (raw)
In-Reply-To: <87wmqoilzf.fsf@kernel.org>

On 28/02/2024 17:37, Kalle Valo wrote:

> Marc Gonzalez writes:
> 
>> On 28/02/2024 15:03, Kalle Valo wrote:
>>
>>> Marc Gonzalez writes:
>>>
>>>> +  qcom,no-msa-ready-indicator:
>>>> +    type: boolean
>>>> +    description:
>>>> +      The driver waits for this indicator before proceeding,
>>>> +      yet some WCNSS firmwares apparently do not send it.
>>>> +      On those devices, it seems safe to ignore the indicator,
>>>> +      and continue loading the firmware.
>>>
>>> This sounds more like a firmware feature, not a hardware feature. What
>>> about having a flag in enum ath10k_fw_features in firmware-2.bin?
>>
>> Are you using the word "feature" as in "it was done purposefully" ?
> 
> No, there's no bigger meaning like that. It's more like ath10k has to do
> something differently when a certain bit is enabled in the firmware. I
> just had to pick a word for the enum and from my limited vocabulary I
> chose "feature" :)

Understood!

>> Is enum ath10k_fw_features also supposed to include work-arounds?
> 
> Yes, and we already use.
> 
>> Sorry, I've grepped over the entire Linux source code,
>> and I cannot find where ath10k_fw_features is used,
>> other than in ath10k_core_get_fw_feature_str().
> 
> Here's one example where in ath10k we use a feature bit as a workaround:
> 
> 	/* Don't trust error code from otp.bin */
> 	ATH10K_FW_FEATURE_IGNORE_OTP_RESULT = 7,
> 
>         ....
> 
> 	if (!(skip_otp || test_bit(ATH10K_FW_FEATURE_IGNORE_OTP_RESULT,
> 				   ar->running_fw->fw_file.fw_features)) &&
> 	    result != 0) {
> 		ath10k_err(ar, "otp calibration failed: %d", result);
> 		return -EINVAL;
> 	}
> 
> BTW for modifying firmware-N.bin files we have a script here:
> 
> https://github.com/qca/qca-swiss-army-knife/blob/master/tools/scripts/ath10k/ath10k-fwencoder

If I understand correctly, you are saying that there is
(maybe... probably) a bug in the FW, so it makes sense to
tag that specific FW file with a special bit which the kernel
will interpret as "this FW is broken in a specific way;
and here's how to work around the issue."

So this bit would serve the same purpose as my proposed
"qcom,no-msa-ready-indicator" bit (that bit existed instead
in my board's device tree).

The problem I see is that the firmware files are signed.
Thus, changing a single bit breaks the verification...
UNLESS the FW format allows for a signed section ALONG-SIDE
an unsigned section?

>> As mentioned in my other reply, there are several msm8998-based
>> devices affected by this issue. Is it not appropriate to consider
>> a kernel-based work-around?
> 
> Sorry, not following you here. But I'll try to answer anyway:
> 
> I have understood that Device Tree is supposed to describe hardware, not
> software. This is why having this property in DT does not look right
> place for this. For example, if the ath10k firmware is fixed then DT
> would have to be changed even though nothing changed in hardware. But of
> course DT maintainers have the final say.

At some point, we start wandering into meta-physical considerations
such as "if FW cannot ever be changed, when does FIRM become HARD?"
(and other GPLv3 niceties). But this is a discussion for another list.

Regards


  reply	other threads:[~2024-02-28 17:19 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 13:22 [PATCH 0/2] Work around missing MSA_READY indicator from ath10k FW Marc Gonzalez
2024-02-28 13:24 ` [PATCH 1/2] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop Marc Gonzalez
2024-02-28 14:03   ` Kalle Valo
2024-02-28 16:12     ` Marc Gonzalez
2024-02-28 16:37       ` Kalle Valo
2024-02-28 17:19         ` Marc Gonzalez [this message]
2024-03-01  8:10           ` Kalle Valo
2024-03-04 15:51             ` Marc Gonzalez
2024-03-05 14:31               ` Kalle Valo
2024-03-05 17:32                 ` Marc Gonzalez
2024-03-05 19:20                   ` Kalle Valo
2024-03-13 15:09                     ` Marc Gonzalez
2024-03-13 15:48                       ` Konrad Dybcio
2024-03-13 15:53                       ` Dmitry Baryshkov
2024-03-14 12:31                         ` Marc Gonzalez
2024-03-14 12:52                           ` Dmitry Baryshkov
2024-03-18 16:56                         ` Marc Gonzalez
2024-03-19 13:47                           ` Marc Gonzalez
2024-03-19 14:39                             ` Marc Gonzalez
2024-03-19 17:05                               ` Marc Gonzalez
2024-03-26 15:04                       ` Marc Gonzalez
2024-03-26 17:45                         ` Marc Gonzalez
2024-03-26 17:51                           ` Dmitry Baryshkov
2024-03-26 20:21                             ` Jeff Johnson
2024-03-28 17:09                               ` Marc Gonzalez
2024-02-29 18:40         ` Conor Dooley
2024-02-29 19:46           ` Jeff Johnson
2024-03-07 15:29             ` Marc Gonzalez
2024-03-07 16:46               ` Jeff Johnson
2024-03-14 14:33                 ` Jeff Johnson
2024-03-14 17:52                   ` Marc Gonzalez
2024-03-14 19:28                     ` Jeff Johnson
2024-03-04 16:21           ` Marc Gonzalez
2024-03-04 19:34             ` Conor Dooley
2024-03-04 19:37               ` Dmitry Baryshkov
2024-03-04 19:45                 ` Conor Dooley
2024-03-04 19:59                   ` Dmitry Baryshkov
2024-03-04 20:17                     ` Conor Dooley
2024-03-04 20:21                       ` Dmitry Baryshkov
2024-03-05  8:04                         ` Krzysztof Kozlowski
2024-03-05 13:41               ` Marc Gonzalez
2024-03-05 15:02             ` Kalle Valo
2024-03-05 14:45           ` Kalle Valo
2024-02-28 14:59   ` Jeff Johnson
2024-02-28 16:00     ` Marc Gonzalez
2024-02-29 15:49     ` Marc Gonzalez
2024-02-28 13:25 ` [PATCH 2/2] wifi: ath10k: work around missing MSA_READY indicator Marc Gonzalez

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=c58e67e6-6a7f-4963-86b9-580165bf05ba@freebox.fr \
    --to=mgonzalez@freebox.fr \
    --cc=ath10k@lists.infradead.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jamipkettunen@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=phhusson@freebox.fr \
    --cc=quic_jhugo@quicinc.com \
    --cc=quic_jjohnson@quicinc.com \
    --cc=robh+dt@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).