On Thu, 12 Aug 2021 14:50:32 -0500 Alex Elder wrote:
quoted hunk ↗ jump to hunk
+/**
+ * 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.