[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210813174406.5e7fc350@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 13 Aug 2021 17:44:06 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Alex Elder <elder@...aro.org>
Cc: davem@...emloft.net, bjorn.andersson@...aro.org,
evgreen@...omium.org, cpratapa@...eaurora.org,
subashab@...eaurora.org, elder@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 3/6] net: ipa: re-enable transmit in PM WQ
context
On Thu, 12 Aug 2021 14:50:32 -0500 Alex Elder wrote:
> +/**
> + * ipa_modem_wake_queue_work() - enable modem netdev queue
> + * @work: Work structure
> + *
> + * Re-enable transmit on the modem network device. This is called
> + * in (power management) work queue context, scheduled when resuming
> + * the modem.
> + */
> +static void ipa_modem_wake_queue_work(struct work_struct *work)
> +{
> + struct ipa_priv *priv = container_of(work, struct ipa_priv, work);
> +
> + netif_wake_queue(priv->ipa->modem_netdev);
> +}
> +
> /** ipa_modem_resume() - resume callback for runtime_pm
> * @dev: pointer to device
> *
> @@ -205,7 +226,8 @@ void ipa_modem_resume(struct net_device *netdev)
> ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_MODEM_TX]);
> ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_MODEM_RX]);
>
> - netif_wake_queue(netdev);
> + /* Arrange for the TX queue to be restarted */
> + (void)queue_pm_work(&priv->work);
> }
Why move the wake call to a work queue, tho? It's okay to call it
from any context.
Powered by blists - more mailing lists