From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] wifi: ath11k: Implement sram dump interface
Date: Tue, 13 Sep 2022 10:14:14 +0300 [thread overview]
Message-ID: <87pmfz7nll.fsf@kernel.org> (raw)
In-Reply-To: <0e64e270-77c3-5c1a-08bc-577a82c8abac@quicinc.com> (Baochen Qiang's message of "Tue, 13 Sep 2022 11:06:33 +0800")
Baochen Qiang <quic_bqiang@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
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] wifi: ath11k: Implement sram dump interface
Date: Tue, 13 Sep 2022 10:14:14 +0300 [thread overview]
Message-ID: <87pmfz7nll.fsf@kernel.org> (raw)
In-Reply-To: <0e64e270-77c3-5c1a-08bc-577a82c8abac@quicinc.com> (Baochen Qiang's message of "Tue, 13 Sep 2022 11:06:33 +0800")
Baochen Qiang <quic_bqiang@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
next prev parent reply other threads:[~2022-09-13 7:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 7:55 [PATCH v2 0/2] wifi: ath11k: Add support for sram dump Baochen Qiang
2022-08-02 7:55 ` Baochen Qiang
2022-08-02 7:55 ` [PATCH v2 1/2] wifi: ath11k: Split PCI write/read functions Baochen Qiang
2022-08-02 7:55 ` Baochen Qiang
2022-09-09 10:42 ` Kalle Valo
2022-09-09 10:42 ` Kalle Valo
2022-09-10 6:26 ` Kalle Valo
2022-09-10 6:26 ` Kalle Valo
2022-08-02 7:55 ` [PATCH v2 2/2] wifi: ath11k: Implement sram dump interface Baochen Qiang
2022-08-02 7:55 ` Baochen Qiang
2022-09-09 10:48 ` Kalle Valo
2022-09-09 10:48 ` Kalle Valo
2022-09-13 3:06 ` Baochen Qiang
2022-09-13 3:06 ` Baochen Qiang
2022-09-13 7:14 ` Kalle Valo [this message]
2022-09-13 7:14 ` Kalle Valo
2022-09-13 7:32 ` Baochen Qiang
2022-09-13 7:32 ` Baochen Qiang
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=87pmfz7nll.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_bqiang@quicinc.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.