Commit 4b8e27a
cxgb4: Allocate dynamic mem. for egress and ingress queue maps
QIDs (egress/ingress) from firmware in FW_*_CMD.alloc command
can be anywhere in the range from EQ(IQFLINT)_START to EQ(IQFLINT)_END.
For eg, in the first load eqid can be from 100 to 300.
In the next load it can be from 301 to 500 (assume eq_start is 100 and eq_end is
1000).
The driver was assuming them to always start from EQ(IQFLINT)_START till
MAX_EGRQ(INGQ). This was causing stack overflow and subsequent crash.
Fixed it by dynamically allocating memory (of qsize (x_END - x_START + 1)) for
these structures.
Based on original work by Santosh Rastapur <santosh@chelsio.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent f243e5a commit 4b8e27a
File tree
3 files changed
+83
-15
lines changed- drivers/net/ethernet/chelsio/cxgb4
3 files changed
+83
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
| |||
616 | 614 | | |
617 | 615 | | |
618 | 616 | | |
| 617 | + | |
619 | 618 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
923 | | - | |
| 923 | + | |
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
| |||
941 | 941 | | |
942 | 942 | | |
943 | 943 | | |
944 | | - | |
| 944 | + | |
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
974 | | - | |
| 973 | + | |
| 974 | + | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
986 | 999 | | |
987 | 1000 | | |
988 | 1001 | | |
| |||
4733 | 4746 | | |
4734 | 4747 | | |
4735 | 4748 | | |
4736 | | - | |
4737 | | - | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
4738 | 4752 | | |
4739 | 4753 | | |
4740 | 4754 | | |
| |||
5293 | 5307 | | |
5294 | 5308 | | |
5295 | 5309 | | |
| 5310 | + | |
| 5311 | + | |
| 5312 | + | |
| 5313 | + | |
| 5314 | + | |
| 5315 | + | |
| 5316 | + | |
| 5317 | + | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
| 5321 | + | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
| 5325 | + | |
| 5326 | + | |
| 5327 | + | |
| 5328 | + | |
| 5329 | + | |
| 5330 | + | |
| 5331 | + | |
| 5332 | + | |
| 5333 | + | |
| 5334 | + | |
| 5335 | + | |
| 5336 | + | |
| 5337 | + | |
| 5338 | + | |
| 5339 | + | |
| 5340 | + | |
| 5341 | + | |
| 5342 | + | |
| 5343 | + | |
| 5344 | + | |
| 5345 | + | |
| 5346 | + | |
| 5347 | + | |
| 5348 | + | |
| 5349 | + | |
| 5350 | + | |
| 5351 | + | |
| 5352 | + | |
| 5353 | + | |
| 5354 | + | |
5296 | 5355 | | |
5297 | 5356 | | |
5298 | 5357 | | |
| |||
5501 | 5560 | | |
5502 | 5561 | | |
5503 | 5562 | | |
| 5563 | + | |
| 5564 | + | |
| 5565 | + | |
| 5566 | + | |
5504 | 5567 | | |
5505 | 5568 | | |
5506 | 5569 | | |
| |||
5912 | 5975 | | |
5913 | 5976 | | |
5914 | 5977 | | |
| 5978 | + | |
| 5979 | + | |
| 5980 | + | |
| 5981 | + | |
5915 | 5982 | | |
5916 | 5983 | | |
5917 | 5984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2171 | 2171 | | |
2172 | 2172 | | |
2173 | 2173 | | |
2174 | | - | |
| 2174 | + | |
2175 | 2175 | | |
2176 | 2176 | | |
2177 | 2177 | | |
| |||
2259 | 2259 | | |
2260 | 2260 | | |
2261 | 2261 | | |
2262 | | - | |
| 2262 | + | |
2263 | 2263 | | |
2264 | 2264 | | |
2265 | 2265 | | |
| |||
2741 | 2741 | | |
2742 | 2742 | | |
2743 | 2743 | | |
2744 | | - | |
| 2744 | + | |
| 2745 | + | |
2745 | 2746 | | |
2746 | 2747 | | |
2747 | 2748 | | |
| |||
0 commit comments