* [PATCH] ath10k: Fix qmi init error handling
@ 2019-11-06 23:16 Jeffrey Hugo
2019-11-12 8:42 ` Simon Horman
0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Hugo @ 2019-11-06 23:16 UTC (permalink / raw)
To: kvalo, davem
Cc: ath10k, linux-wireless, netdev, linux-arm-msm, linux-kernel,
Jeffrey Hugo
When ath10k_qmi_init() fails, the error handling does not free the irq
resources, which causes an issue if we EPROBE_DEFER as we'll attempt to
(re-)register irqs which are already registered.
Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
---
drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index fc15a0037f0e..f2a0b7aaad3b 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
ret = ath10k_qmi_init(ar, msa_size);
if (ret) {
ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret);
- goto err_core_destroy;
+ goto err_free_irq;
}
ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc probe\n");
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: Fix qmi init error handling
2019-11-06 23:16 [PATCH] ath10k: Fix qmi init error handling Jeffrey Hugo
@ 2019-11-12 8:42 ` Simon Horman
2019-11-12 15:51 ` Jeffrey Hugo
0 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2019-11-12 8:42 UTC (permalink / raw)
To: Jeffrey Hugo
Cc: kvalo, davem, ath10k, linux-wireless, netdev, linux-arm-msm,
linux-kernel
On Wed, Nov 06, 2019 at 03:16:50PM -0800, Jeffrey Hugo wrote:
> When ath10k_qmi_init() fails, the error handling does not free the irq
> resources, which causes an issue if we EPROBE_DEFER as we'll attempt to
> (re-)register irqs which are already registered.
>
> Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
> Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
> ---
> drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> index fc15a0037f0e..f2a0b7aaad3b 100644
> --- a/drivers/net/wireless/ath/ath10k/snoc.c
> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> @@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
> ret = ath10k_qmi_init(ar, msa_size);
> if (ret) {
> ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret);
> - goto err_core_destroy;
> + goto err_free_irq;
> }
From a casual examination of the code this seems like a step in the right
direction. But does this error path also need to call ath10k_hw_power_off() ?
>
> ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc probe\n");
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: Fix qmi init error handling
2019-11-12 8:42 ` Simon Horman
@ 2019-11-12 15:51 ` Jeffrey Hugo
2019-11-13 4:57 ` Kalle Valo
0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey Hugo @ 2019-11-12 15:51 UTC (permalink / raw)
To: Simon Horman; +Cc: kvalo, davem, ath10k, linux-wireless, netdev, MSM, lkml
On Tue, Nov 12, 2019 at 1:42 AM Simon Horman <simon.horman@netronome.com> wrote:
>
> On Wed, Nov 06, 2019 at 03:16:50PM -0800, Jeffrey Hugo wrote:
> > When ath10k_qmi_init() fails, the error handling does not free the irq
> > resources, which causes an issue if we EPROBE_DEFER as we'll attempt to
> > (re-)register irqs which are already registered.
> >
> > Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
> > Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
> > ---
> > drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> > index fc15a0037f0e..f2a0b7aaad3b 100644
> > --- a/drivers/net/wireless/ath/ath10k/snoc.c
> > +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> > @@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
> > ret = ath10k_qmi_init(ar, msa_size);
> > if (ret) {
> > ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret);
> > - goto err_core_destroy;
> > + goto err_free_irq;
> > }
>
> From a casual examination of the code this seems like a step in the right
> direction. But does this error path also need to call ath10k_hw_power_off() ?
It probably should. I don't see any fatal errors from the step being
skipped, although it might silence some regulator warnings about being
left on. Unlikely to be observed by most folks as I was initing the
driver pretty early to debug some things. Looks like Kalle already
picked up this patch though, so I guess your suggestion would need to
be a follow up.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: Fix qmi init error handling
2019-11-12 15:51 ` Jeffrey Hugo
@ 2019-11-13 4:57 ` Kalle Valo
2019-11-13 15:11 ` Jeffrey Hugo
0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2019-11-13 4:57 UTC (permalink / raw)
To: Jeffrey Hugo
Cc: Simon Horman, davem, ath10k, linux-wireless, netdev, MSM, lkml
Jeffrey Hugo <jeffrey.l.hugo@gmail.com> writes:
> On Tue, Nov 12, 2019 at 1:42 AM Simon Horman <simon.horman@netronome.com> wrote:
>>
>> On Wed, Nov 06, 2019 at 03:16:50PM -0800, Jeffrey Hugo wrote:
>> > When ath10k_qmi_init() fails, the error handling does not free the irq
>> > resources, which causes an issue if we EPROBE_DEFER as we'll attempt to
>> > (re-)register irqs which are already registered.
>> >
>> > Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
>> > Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
>> > ---
>> > drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
>> > index fc15a0037f0e..f2a0b7aaad3b 100644
>> > --- a/drivers/net/wireless/ath/ath10k/snoc.c
>> > +++ b/drivers/net/wireless/ath/ath10k/snoc.c
>> > @@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
>> > ret = ath10k_qmi_init(ar, msa_size);
>> > if (ret) {
>> > ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret);
>> > - goto err_core_destroy;
>> > + goto err_free_irq;
>> > }
>>
>> From a casual examination of the code this seems like a step in the right
>> direction. But does this error path also need to call ath10k_hw_power_off() ?
>
> It probably should. I don't see any fatal errors from the step being
> skipped, although it might silence some regulator warnings about being
> left on. Unlikely to be observed by most folks as I was initing the
> driver pretty early to debug some things. Looks like Kalle already
> picked up this patch though, so I guess your suggestion would need to
> be a follow up.
Actually it's only in the pending branch, which means that the patch can
be changed or a new version can be submitted:
https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#patch_flow
The easiest way to check the state of a wireless patch is from
patchwork:
https://patchwork.kernel.org/patch/11231325/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#checking_state_of_patches_from_patchwork
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: Fix qmi init error handling
2019-11-13 4:57 ` Kalle Valo
@ 2019-11-13 15:11 ` Jeffrey Hugo
0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Hugo @ 2019-11-13 15:11 UTC (permalink / raw)
To: Kalle Valo; +Cc: Simon Horman, davem, ath10k, linux-wireless, netdev, MSM, lkml
On Tue, Nov 12, 2019 at 9:57 PM Kalle Valo <kvalo@codeaurora.org> wrote:
>
> Jeffrey Hugo <jeffrey.l.hugo@gmail.com> writes:
>
> > On Tue, Nov 12, 2019 at 1:42 AM Simon Horman <simon.horman@netronome.com> wrote:
> >>
> >> On Wed, Nov 06, 2019 at 03:16:50PM -0800, Jeffrey Hugo wrote:
> >> > When ath10k_qmi_init() fails, the error handling does not free the irq
> >> > resources, which causes an issue if we EPROBE_DEFER as we'll attempt to
> >> > (re-)register irqs which are already registered.
> >> >
> >> > Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
> >> > Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
> >> > ---
> >> > drivers/net/wireless/ath/ath10k/snoc.c | 2 +-
> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
> >> > index fc15a0037f0e..f2a0b7aaad3b 100644
> >> > --- a/drivers/net/wireless/ath/ath10k/snoc.c
> >> > +++ b/drivers/net/wireless/ath/ath10k/snoc.c
> >> > @@ -1729,7 +1729,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
> >> > ret = ath10k_qmi_init(ar, msa_size);
> >> > if (ret) {
> >> > ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret);
> >> > - goto err_core_destroy;
> >> > + goto err_free_irq;
> >> > }
> >>
> >> From a casual examination of the code this seems like a step in the right
> >> direction. But does this error path also need to call ath10k_hw_power_off() ?
> >
> > It probably should. I don't see any fatal errors from the step being
> > skipped, although it might silence some regulator warnings about being
> > left on. Unlikely to be observed by most folks as I was initing the
> > driver pretty early to debug some things. Looks like Kalle already
> > picked up this patch though, so I guess your suggestion would need to
> > be a follow up.
>
> Actually it's only in the pending branch, which means that the patch can
> be changed or a new version can be submitted:
Thats an interesting flow. Ok.
>
> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#patch_flow
>
> The easiest way to check the state of a wireless patch is from
> patchwork:
>
> https://patchwork.kernel.org/patch/11231325/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#checking_state_of_patches_from_patchwork
>
> --
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-13 15:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 23:16 [PATCH] ath10k: Fix qmi init error handling Jeffrey Hugo
2019-11-12 8:42 ` Simon Horman
2019-11-12 15:51 ` Jeffrey Hugo
2019-11-13 4:57 ` Kalle Valo
2019-11-13 15:11 ` Jeffrey Hugo
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).