Commit a2cea09
bnxt_en: Do not adjust max_cp_rings by the ones used by RDMA.
[ Upstream commit 00fe9c3 ]
Currently, the driver adjusts the bp->hw_resc.max_cp_rings by the number
of MSIX vectors used by RDMA. There is one code path in open that needs
to check the true max_cp_rings including any used by RDMA. This code
is now checking for the reduced max_cp_rings which will fail when the
number of cp rings is very small.
To fix this in a clean way, we don't adjust max_cp_rings anymore.
Instead, we add a helper bnxt_get_max_func_cp_rings_for_en() to get the
reduced max_cp_rings when appropriate.
Fixes: ec86f14 ("bnxt_en: Add ULP calls to stop and restart IRQs.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent e779d52 commit a2cea09
File tree
4 files changed
+9
-12
lines changed- drivers/net/ethernet/broadcom/bnxt
4 files changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5907 | 5907 | | |
5908 | 5908 | | |
5909 | 5909 | | |
5910 | | - | |
| 5910 | + | |
5911 | 5911 | | |
5912 | | - | |
| 5912 | + | |
5913 | 5913 | | |
5914 | 5914 | | |
5915 | 5915 | | |
| |||
8492 | 8492 | | |
8493 | 8493 | | |
8494 | 8494 | | |
8495 | | - | |
| 8495 | + | |
| 8496 | + | |
8496 | 8497 | | |
8497 | 8498 | | |
8498 | 8499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1468 | 1468 | | |
1469 | 1469 | | |
1470 | 1470 | | |
1471 | | - | |
| 1471 | + | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
| 548 | + | |
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| |||
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
641 | | - | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
181 | | - | |
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
| |||
187 | 185 | | |
188 | 186 | | |
189 | 187 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 188 | | |
194 | 189 | | |
195 | 190 | | |
| |||
0 commit comments