lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240130192305.250915-7-elder@linaro.org>
Date: Tue, 30 Jan 2024 13:23:03 -0600
From: Alex Elder <elder@...aro.org>
To: davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com
Cc: mka@...omium.org,
	andersson@...nel.org,
	quic_cpratapa@...cinc.com,
	quic_avuyyuru@...cinc.com,
	quic_jponduru@...cinc.com,
	quic_subashab@...cinc.com,
	elder@...nel.org,
	netdev@...r.kernel.org,
	linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH net-next 6/7] net: ipa: kill ipa_power_modem_queue_active()

All ipa_power_modem_queue_active() does now is call netif_wake_queue().
Just call netif_wake_queue() in the two places it's needed, and get
rid of ipa_power_modem_queue_active().

Signed-off-by: Alex Elder <elder@...aro.org>
---
 drivers/net/ipa/ipa_modem.c |  4 ++--
 drivers/net/ipa/ipa_power.c | 19 ++++---------------
 drivers/net/ipa/ipa_power.h |  6 ------
 3 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c
index 08e1202f12863..0c298060468eb 100644
--- a/drivers/net/ipa/ipa_modem.c
+++ b/drivers/net/ipa/ipa_modem.c
@@ -163,7 +163,7 @@ ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 	if (ret < 1) {
 		/* If a resume won't happen, just drop the packet */
 		if (ret < 0 && ret != -EINPROGRESS) {
-			ipa_power_modem_queue_active(ipa);
+			netif_wake_queue(netdev);
 			pm_runtime_put_noidle(dev);
 			goto err_drop_skb;
 		}
@@ -173,7 +173,7 @@ ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 		return NETDEV_TX_BUSY;
 	}
 
-	ipa_power_modem_queue_active(ipa);
+	netif_wake_queue(netdev);
 
 	ret = ipa_endpoint_skb_tx(endpoint, skb);
 
diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c
index 812359c7977da..fd2abce043fa5 100644
--- a/drivers/net/ipa/ipa_power.c
+++ b/drivers/net/ipa/ipa_power.c
@@ -227,30 +227,19 @@ void ipa_power_suspend_handler(struct ipa *ipa, enum ipa_irq_id irq_id)
 	ipa_interrupt_suspend_clear_all(ipa->interrupt);
 }
 
-/* The next two functions are used when stopping and starting the modem
- * network device transmit queue.
- *
- * Transmit can run concurrent with power resume.  When transmitting,
+/* Transmit can run concurrent with power resume.  When transmitting,
  * we disable further transmits until we can determine whether power
  * is ACTIVE.  If it is, future transmits are re-enabled and the buffer
  * gets sent (or dropped).  If power is not ACTIVE, it will eventually
- * be, and transmits stay disabled until after it is.
- *
- * The first function starts the transmit queue and is used in the power
- * resume path after power has become ACTIVE.  The second function also
- * enables transmits again, and is used by ipa_start_xmit() once it
- * knows power is active.
+ * be, and transmits stay disabled until after it is.  This function
+ * starts the transmit queue and is used in the power resume path after
+ * power has become ACTIVE.
  */
 void ipa_power_modem_queue_wake(struct ipa *ipa)
 {
 	netif_wake_queue(ipa->modem_netdev);
 }
 
-void ipa_power_modem_queue_active(struct ipa *ipa)
-{
-	netif_wake_queue(ipa->modem_netdev);
-}
-
 static int ipa_power_retention_init(struct ipa_power *power)
 {
 	struct qmp *qmp = qmp_get(power->dev);
diff --git a/drivers/net/ipa/ipa_power.h b/drivers/net/ipa/ipa_power.h
index f51653399a07d..dcd36a6a718f2 100644
--- a/drivers/net/ipa/ipa_power.h
+++ b/drivers/net/ipa/ipa_power.h
@@ -29,12 +29,6 @@ u32 ipa_core_clock_rate(struct ipa *ipa);
  */
 void ipa_power_modem_queue_wake(struct ipa *ipa);
 
-/**
- * ipa_power_modem_queue_active() - Report modem netdev TX queue active
- * @ipa:	IPA pointer
- */
-void ipa_power_modem_queue_active(struct ipa *ipa);
-
 /**
  * ipa_power_retention() - Control register retention on power collapse
  * @ipa:	IPA pointer
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ