git: 89d87c1864b8 - stable/13 - cxgbe(4): Initialize mps_bg_map to an invalid value if it's not known.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Jul 2024 14:24:40 UTC
The branch stable/13 has been updated by np:
URL: https://cgit.FreeBSD.org/src/commit/?id=89d87c1864b8982e9a2b3244086ed438a602bb0b
commit 89d87c1864b8982e9a2b3244086ed438a602bb0b
Author: Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2024-04-30 19:51:29 +0000
Commit: Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2024-07-17 07:15:24 +0000
cxgbe(4): Initialize mps_bg_map to an invalid value if it's not known.
Sponsored by: Chelsio Communications
(cherry picked from commit 9de0036b55dcdabc54fa69ea6e583b22d739818c)
---
sys/dev/cxgbe/common/t4_hw.c | 2 +-
sys/dev/cxgbe/t4_main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index 8d109b389f0d..755062909e14 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -6742,7 +6742,7 @@ static unsigned int t4_get_mps_bg_map(struct adapter *adap, int idx)
{
u32 n;
- if (adap->params.mps_bg_map)
+ if (adap->params.mps_bg_map != UINT32_MAX)
return ((adap->params.mps_bg_map >> (idx << 3)) & 0xff);
n = adap->params.nports;
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 8895e22d18ac..80e798049aa4 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -5406,7 +5406,7 @@ get_params__post_init(struct adapter *sc)
if (rc == 0)
sc->params.mps_bg_map = val[0];
else
- sc->params.mps_bg_map = 0;
+ sc->params.mps_bg_map = UINT32_MAX; /* Not a legal value. */
/*
* Determine whether the firmware supports the filter2 work request.