Commit 2b56b3d
committed
eth: bnxt: handle invalid Tx completions more gracefully
Invalid Tx completions should never happen (tm) but when they do
they crash the host, because driver blindly trusts that there is
a valid skb pointer on the ring.
The completions I've seen appear to be some form of FW / HW
miscalculation or staleness, they have typical (small) values
(<100), but they are most often higher than number of queued
descriptors. They usually happen after boot.
Instead of crashing, print a warning and schedule a reset.
Link: https://lore.kernel.org/r/20230720010440.1967136-4-kuba@kernel.org
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 9b1a00f commit 2b56b3d
3 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
334 | 350 | | |
335 | 351 | | |
336 | 352 | | |
| |||
690 | 706 | | |
691 | 707 | | |
692 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
693 | 714 | | |
694 | 715 | | |
695 | 716 | | |
| |||
2576 | 2597 | | |
2577 | 2598 | | |
2578 | 2599 | | |
2579 | | - | |
| 2600 | + | |
2580 | 2601 | | |
2581 | 2602 | | |
2582 | 2603 | | |
| |||
9429 | 9450 | | |
9430 | 9451 | | |
9431 | 9452 | | |
| 9453 | + | |
| 9454 | + | |
9432 | 9455 | | |
9433 | 9456 | | |
9434 | 9457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
| 1011 | + | |
1011 | 1012 | | |
1012 | 1013 | | |
1013 | 1014 | | |
| |||
2329 | 2330 | | |
2330 | 2331 | | |
2331 | 2332 | | |
| 2333 | + | |
| 2334 | + | |
2332 | 2335 | | |
2333 | 2336 | | |
2334 | 2337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
0 commit comments