linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb()
@ 2020-12-02 14:15 Alex Elder
  2020-12-03  1:19 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2020-12-02 14:15 UTC (permalink / raw)
  To: davem, kuba
  Cc: jonathanh, evgreen, cpratapa, bjorn.andersson, subashab, netdev,
	linux-kernel

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: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Alex Elder <elder@linaro.org>
---
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(-)

diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index d0768452c15cf..84bb8ae927252 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb()
  2020-12-02 14:15 [PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb() Alex Elder
@ 2020-12-03  1:19 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-12-03  1:19 UTC (permalink / raw)
  To: Alex Elder
  Cc: davem, jonathanh, evgreen, cpratapa, bjorn.andersson, subashab,
	netdev, linux-kernel

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/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: Jon Hunter <jonathanh@nvidia.com>
> Tested-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Alex Elder <elder@linaro.org>

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-03  1:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 14:15 [PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb() Alex Elder
2020-12-03  1:19 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).