]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: introduce ipa_endpoint_program_suspend()
authorAlex Elder <elder@linaro.org>
Mon, 4 May 2020 23:37:12 +0000 (18:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 00:37:54 +0000 (17:37 -0700)
commita20896ce8f537c757271969ea5b97ab325414026
tree3af6c7debfd275850778c08a6da576023f046c35
parentf3c1c90195b595ebb2126976f1ff0c742795b660
net: ipa: introduce ipa_endpoint_program_suspend()

Create a new helper function that encapsulates enabling or disabling
suspend on an RX endpoint.  It returns the previous state of the
endpoint (true means suspend mode was enabled).

Create another function that handles enabling or disabling delay mode
on a TX endpoint.  Delay mode does not work correctly on IPA version
4.2, so we don't currently use it (and shouldn't).

We only set delay mode in one case, and although we don't expect an
endpoint to already be in delay mode, it doesn't really matter if it
was.  So the delay function doesn't return a value.

Stop issuing warnings if the previous suspend or delay mode state
differs from what is expected.

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