Commit 9693e08f authored by Alex Elder's avatar Alex Elder Committed by Jakub Kicinski

net: ipa: fix build-time bug in ipa_hardware_config_qsb()

Jon Hunter reported observing a build bug in the IPA driver:
  https://lore.kernel.org/netdev/5b5d9d40-94d5-5dad-b861-fd9bef8260e2@nvidia.com

The problem is that the QMB0 max read value set for IPA v4.5 (16) is
too large to fit in the 4-bit field.

The actual value we want is 0, which requests that the hardware use
the maximum it is capable of.
Reported-by: default avatarJon Hunter <jonathanh@nvidia.com>
Tested-by: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20201202141502.21265-1-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 05e3ecea
...@@ -288,7 +288,7 @@ static void ipa_hardware_config_qsb(struct ipa *ipa) ...@@ -288,7 +288,7 @@ static void ipa_hardware_config_qsb(struct ipa *ipa)
max1 = 0; /* PCIe not present */ max1 = 0; /* PCIe not present */
break; break;
case IPA_VERSION_4_5: case IPA_VERSION_4_5:
max0 = 16; max0 = 0; /* No limit (hardware maximum) */
break; break;
} }
val = u32_encode_bits(max0, GEN_QMB_0_MAX_READS_FMASK); val = u32_encode_bits(max0, GEN_QMB_0_MAX_READS_FMASK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment