]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: don't reset an ALLOCATED channel
authorAlex Elder <elder@linaro.org>
Thu, 19 Nov 2020 22:49:25 +0000 (16:49 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 Nov 2020 02:45:51 +0000 (18:45 -0800)
commit9c39a4b32f8333d6f0db66d0fadf695ff9a295f5
tree7c1c2e066e1eeaba74846fe2b57adfb9369b30f0
parent762d5678414f8bd5a4b76c86e109478423c12f2d
net: ipa: don't reset an ALLOCATED channel

If the rmnet_ipa0 network device has not been opened at the time
we remove or shut down the IPA driver, its underlying TX and RX
GSI channels will not have been started, and they will still be
in ALLOCATED state.

The RESET command on a channel is meant to return a channel to
ALLOCATED state after it's been stopped.  But if it was never
started, its state will still be ALLOCATED, the RESET command
is not required.

Quietly skip doing the reset without printing an error message if a
channel is already in ALLOCATED state when we request it be reset.

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