net: ipa: support more endpoints
authorAlex Elder <elder@linaro.org>
Mon, 30 Jan 2023 21:01:51 +0000 (15:01 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 1 Feb 2023 05:45:51 +0000 (21:45 -0800)
commit07abde549bc1204685b0aec29acc8c75b18ac1f5
tree7835b2bb31a461bda246a54063e3ebc6698bda3c
parent71af6a2ddf146db4120ea220b93815e3993dcd94
net: ipa: support more endpoints

Increase the number of endpoints supported by the driver to 36,
which IPA v5.0 supports.  This makes it impossible to check at build
time whether the supported number is too big to fit within the
(5-bit) PACKET_INIT destination endpoint field.  Instead, convert
the build time check to compare against what fits in 8 bits.

Add a check in ipa_endpoint_config() to also ensure the hardware
reports an endpoint count that's in the expected range.  Just
open-code 32 as the limit (the PACKET_INIT field mask is not
available where we'd want to use it).

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_cmd.c
drivers/net/ipa/ipa_endpoint.c
drivers/net/ipa/ipa_endpoint.h