]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: introduce channel flow control
authorAlex Elder <elder@linaro.org>
Wed, 24 Nov 2021 19:44:15 +0000 (13:44 -0600)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Nov 2021 04:03:20 +0000 (20:03 -0800)
commit6c3a209cd7bc288bfe739b7c40d7199efb49a68c
tree14c6ca62b0a80db6f5be734314a553c62b3e450f
parent75e2e5e9624728ecc0c41d4506e73ca3dad2ecce
net: ipa: introduce channel flow control

One quirk for certain versions of IPA is that endpoint DELAY mode
does not work properly.  IPA DELAY mode prevents any packets from
being delivered to the IPA core for processing on a TX endpoint.
The AP uses DELAY mode when the modem crashes, to prevent modem TX
endpoints from generating traffic during crash recovery.  Without
this, there is a chance the hardware will stall during recovery from
a modem crash.

To achieve a similar effect, a GSI FLOW_CONTROLLED channel state
was created.  A STARTED TX channel can be placed in FLOW_CONTROLLED
state, which prevents the transfer of any more packets.  A channel
in FLOW_CONTROLLED state can be either returned to STARTED state, or
can be transitioned to STOPPED state.

Because this operates on GSI channels, two generic commands were
added to allow the AP to control this state for modem channels
(similar to the ALLOCATE and HALT channel commands).

Previously the code assumed this quirk only applied to IPA v4.2.
In fact, channel flow control (rather than endpoint DELAY mode)
should be used for all versions *starting* with IPA v4.2.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c
drivers/net/ipa/gsi.h
drivers/net/ipa/gsi_reg.h
drivers/net/ipa/ipa_endpoint.c