[PATCH v2 2/2] wifi: ath11k: Implement sram dump interface
Kalle Valo
kvalo at kernel.org
Tue Sep 13 00:14:14 PDT 2022
Baochen Qiang <quic_bqiang at quicinc.com> writes:
>>> + u32 i;
>>> +
>>> + /* for offset beyond BAR + 4K - 32, may
>>> + * need to wakeup the device to access.
>>> + */
>>> + wakeup_required = test_bit(ATH11K_FLAG_DEVICE_INIT_DONE, &ab->dev_flags) &&
>>> + end >= ATH11K_PCI_ACCESS_ALWAYS_OFF;
>>> + if (wakeup_required && ab->pci.ops->wakeup) {
>>> + ret = ab->pci.ops->wakeup(ab);
>>> + if (ret)
>>> + ath11k_warn(ab, "%s: failed to do wakeup: %d\n", __func__, ret);
>>> + }
>>
>> I changed the error handling so that if wakeup() fails we do not
>> continue and just return an error.
>
> I prefer to keep the original design, because in that case we still
> have something to check after firmware crashes.
>
> I admit that the dump content may be invalid if wakeup fails, but we
> can know that by checking kernel log, so we can avoid misleading.
Too late now, I already applied the patch. You need to submit a new
patch to change the logic. And if we really want to ignore the wakeup
failure there should be a proper comment in the code explaining the idea,
and maybe improve the warning message to make it more understandable for
the user.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath11k
mailing list