($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH] netdev: move power save disabling until after interface is up
Date: Thu, 23 Nov 2023 09:22:01 -0600	[thread overview]
Message-ID: <9bbd446d-75b6-4aff-955d-483cbeb8c08a@gmail.com> (raw)
In-Reply-To: <20231121183321.179230-1-prestwoj@gmail.com>

Hi James,

On 11/21/23 12:33, James Prestwood wrote:
> Very rarely on ath10k (potentially other ath cards), disabling
> power save while the interface is down causes a timeout when
> bringing the interface back up. This seems to be a race in the
> driver or firmware but it causes IWD to never start up properly
> since there is no retry logic on that path.
> 
> Retrying is an option, but a more straight forward approach is
> to just reorder the logic to set power save off after the
> interface is already up. If the power save setting fails we can
> just log it, ignore the failure, and continue. From a users point
> of view there is no real difference in doing it this way as
> PS still gets disabled prior to IWD connecting/sending data.
> 
> Changing behavior based on a buggy driver isn't something we
> should be doing, but in this instance the change shouldn't have
> any downside and actually isn't any different than how it has
> been done prior to the driver quirks change (i.e. use network
> manager, iw, or iwconfig to set power save after IWD starts).
> 
> For reference, this problem is quite rare and difficult to say
> exactly how often but certainly <1% of the time:
> 
> iwd[1286641]: src/netdev.c:netdev_disable_ps_cb() Disabled power save for ifindex 54
> kernel: ath10k_pci 0000:02:00.0: wmi service ready event not received
> iwd[1286641]: Error bringing interface 54 up: Connection timed out
> kernel: ath10k_pci 0000:02:00.0: Could not init core: -110
> 
> After this IWD just sits idle as it has no interface to start using.
> 
> This is even reproducable outside of IWD if you loop and run:
> 
> ip link set <wlan> down
> iw dev <wlan> set power_save off
> ip link set <wlan> up
> 
> Eventually the 'up' command will fail with a timeout.
> 
> I've brought this to the linux-wireless/ath10k mailing list but
> even if its fixed in future kernels we'd still need to support
> older kernels, so a workaround/change in IWD is still required.
> ---
>   src/netdev.c | 86 +++++++++++++++++++++++++++-------------------------
>   1 file changed, 44 insertions(+), 42 deletions(-)
> 

Applied, thanks.

Regards,
-Denis



      reply	other threads:[~2023-11-23 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 18:33 [PATCH] netdev: move power save disabling until after interface is up James Prestwood
2023-11-23 15:22 ` Denis Kenzior [this message]

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=9bbd446d-75b6-4aff-955d-483cbeb8c08a@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.linux.dev \
    --cc=prestwoj@gmail.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).