All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
To: Simon Horman <simon.horman@netronome.com>
Cc: kvalo@codeaurora.org, 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: Fix qmi init error handling
Date: Tue, 12 Nov 2019 08:51:28 -0700	[thread overview]
Message-ID: <CAOCk7NpNgtTSus2KtBMe=jGLFyBumVfRVxKxtHoEDUEt2-6tqQ@mail.gmail.com> (raw)
In-Reply-To: <20191112084225.casuncbo7z54vu4g@netronome.com>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
To: Simon Horman <simon.horman@netronome.com>
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	lkml <linux-kernel@vger.kernel.org>,
	ath10k@lists.infradead.org, MSM <linux-arm-msm@vger.kernel.org>,
	davem@davemloft.net, kvalo@codeaurora.org
Subject: Re: [PATCH] ath10k: Fix qmi init error handling
Date: Tue, 12 Nov 2019 08:51:28 -0700	[thread overview]
Message-ID: <CAOCk7NpNgtTSus2KtBMe=jGLFyBumVfRVxKxtHoEDUEt2-6tqQ@mail.gmail.com> (raw)
In-Reply-To: <20191112084225.casuncbo7z54vu4g@netronome.com>

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.

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2019-11-12 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 23:16 [PATCH] ath10k: Fix qmi init error handling Jeffrey Hugo
2019-11-06 23:16 ` Jeffrey Hugo
2019-11-12  8:42 ` Simon Horman
2019-11-12  8:42   ` Simon Horman
2019-11-12 15:51   ` Jeffrey Hugo [this message]
2019-11-12 15:51     ` Jeffrey Hugo
2019-11-13  4:57     ` Kalle Valo
2019-11-13  4:57       ` Kalle Valo
2019-11-13 15:11       ` Jeffrey Hugo
2019-11-13 15:11         ` Jeffrey Hugo

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='CAOCk7NpNgtTSus2KtBMe=jGLFyBumVfRVxKxtHoEDUEt2-6tqQ@mail.gmail.com' \
    --to=jeffrey.l.hugo@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=kvalo@codeaurora.org \
    --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.