net: ipa: begin simplifying TX queue stop
authorAlex Elder <elder@linaro.org>
Tue, 30 Jan 2024 19:22:59 +0000 (13:22 -0600)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Feb 2024 04:50:36 +0000 (20:50 -0800)
commit844ecc4aa78e2f291071025cf76a98287b38856a
tree1efe56cfb0fb01c2c2b61cd0c22f84641079b824
parent102c28b83ddf021c9902dc59e6436278a0975916
net: ipa: begin simplifying TX queue stop

There are a number of flags used in the IPA driver to attempt to
manage race conditions that can occur between runtime resume and
netdev transmit.  If we disable TX before requesting power, we can
avoid these races entirely, simplifying things considerably.

This patch implements the main change, disabling transmit always in
the net_device->ndo_start_xmit() callback, then re-enabling it again
whenever we find power is active (or when we drop the skb).

The patches that follow will refactor the "old" code to the point
that most of it can be eliminated.

Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20240130192305.250915-3-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_modem.c
drivers/net/ipa/ipa_power.c