]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: ipa: don't use ipa_clock_get() in "ipa_smp2p.c"
authorAlex Elder <elder@linaro.org>
Thu, 19 Aug 2021 22:19:24 +0000 (17:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Aug 2021 13:45:47 +0000 (14:45 +0100)
commitc43adc75dc2dee8cc5a29a722c1c1d5a00b434c3
treeaf156be7fec8cf2f0b16b99568bbfdd0c4560d4c
parent4c6a4da84431415b1f451e2715a17487f9b3474e
net: ipa: don't use ipa_clock_get() in "ipa_smp2p.c"

If the "modem-init" Device Tree property is present for a platform,
the modem performs early IPA hardware initialization, and signals
this is complete with an "ipa-setup-ready" SMP2P interrupt.  This
triggers a call to ipa_setup(), which requires the hardware to be
powered.

Replace the call to ipa_clock_get() in this case with a call to
pm_runtime_get_sync().  And replace the corresponding calls to
ipa_clock_put() with calls to pm_runtime_put() instead.

There is a chance we get an error when taking this power reference.
This is an unlikely scenario, where system suspend is initiated just
before the modem signals it has finished initializing the IPA
hardware.  For now we'll just accept that this could occur, and
report it if it does.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_smp2p.c