net: ipa: fix build-time bug in ipa_hardware_config_qsb()
Subsystems (3)
PATCH v2 1/1 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/[email protected]
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.
---
v2: Got confirmation that 0 is the desired value to use (with comment).
drivers/net/ipa/ipa_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipa/ipa_main.c +1 -1
@@ -288,7 +288,7 @@ static void ipa_hardware_config_qsb(struct ipa *ipa) max1 =0 ;/* PCIe not present */ break ;case IPA_VERSION_4_5 : - max0 =16 ; + max0 =0 ;/* No limit (hardware maximum) */ break ; } val =u32_encode_bits (max0,GEN_QMB_0_MAX_READS_FMASK );
Signature · 1 line
2.20.1
Quoted 6 lines · On Wed, 2 Dec 2020 08:15:02 -0600 Alex Elder wrote:
Jon Hunter reported observing a build bug in the IPA driver:
https://lore.kernel.org/netdev/[email protected]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.
Quoted 6 lines
The actual value we want is 0, which requests that the hardware use the maximum it is capable of.
Reported-by Jon Hunter <[email protected]>Tested-by Jon Hunter <[email protected]>Signed-off-by Alex Elder <[email protected]>
Applied, thanks!