Commit 465b777
net: dsa: b53: properly bound ARL searches for < 4 ARL bin chips
[ Upstream commit e57723f ]
When iterating over the ARL table we stop at max ARL entries / 2, but
this is only valid if the chip actually returns 2 results at once. For
chips with only one result register we will stop before reaching the end
of the table if it is more than half full.
Fix this by only dividing the maximum results by two if we have a chip
with more than one result register (i.e. those with 4 ARL bins).
Fixes: cd169d7 ("net: dsa: b53: Bound check ARL searches")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20251102100758.28352-4-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent a991025 commit 465b777
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2087 | 2087 | | |
2088 | 2088 | | |
2089 | 2089 | | |
| 2090 | + | |
2090 | 2091 | | |
2091 | 2092 | | |
2092 | | - | |
2093 | 2093 | | |
2094 | 2094 | | |
2095 | 2095 | | |
2096 | 2096 | | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
2097 | 2100 | | |
2098 | 2101 | | |
2099 | 2102 | | |
| |||
2115 | 2118 | | |
2116 | 2119 | | |
2117 | 2120 | | |
2118 | | - | |
| 2121 | + | |
2119 | 2122 | | |
2120 | 2123 | | |
2121 | 2124 | | |
| |||
2125 | 2128 | | |
2126 | 2129 | | |
2127 | 2130 | | |
2128 | | - | |
| 2131 | + | |
2129 | 2132 | | |
2130 | 2133 | | |
2131 | 2134 | | |
| |||
0 commit comments