Commit 3c163f3
bnxt_en: Optimize recovery path ULP locking in the driver
In the error recovery path (AER, firmware recovery, etc), the
driver notifies the RoCE driver via ULP_STOP before the reset
and via ULP_START after the reset, all under RTNL_LOCK. The
RoCE driver can take a long time if there are a lot of QPs to
destroy, so it is not ideal to hold the global RTNL lock.
Rely on the new en_dev_lock mutex instead for ULP_STOP and
ULP_START. For the most part, we move the ULP_STOP call before
we take the RTNL lock and move the ULP_START after RTNL unlock.
Note that SRIOV re-enablement must be done after ULP_START
or RoCE on the VFs will not resume properly after reset.
The one scenario in bnxt_hwrm_if_change() where the RTNL lock
is already taken in the .ndo_open() context requires the ULP
restart to be deferred to the bnxt_sp_task() workqueue.
Reviewed-by: Selvin Thyparampil Xavier <[email protected]>
Reviewed-by: Vikas Gupta <[email protected]>
Reviewed-by: Pavan Chebbi <[email protected]>
Signed-off-by: Kalesh AP <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent de21ec4 commit 3c163f3
File tree
3 files changed
+44
-26
lines changed- drivers/net/ethernet/broadcom/bnxt
3 files changed
+44
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11556 | 11556 | | |
11557 | 11557 | | |
11558 | 11558 | | |
11559 | | - | |
| 11559 | + | |
11560 | 11560 | | |
11561 | 11561 | | |
11562 | 11562 | | |
| |||
12111 | 12111 | | |
12112 | 12112 | | |
12113 | 12113 | | |
12114 | | - | |
12115 | | - | |
12116 | | - | |
12117 | | - | |
| 12114 | + | |
| 12115 | + | |
| 12116 | + | |
12118 | 12117 | | |
12119 | 12118 | | |
12120 | 12119 | | |
| |||
13270 | 13269 | | |
13271 | 13270 | | |
13272 | 13271 | | |
13273 | | - | |
13274 | 13272 | | |
13275 | 13273 | | |
13276 | 13274 | | |
| |||
13351 | 13349 | | |
13352 | 13350 | | |
13353 | 13351 | | |
| 13352 | + | |
13354 | 13353 | | |
13355 | 13354 | | |
13356 | 13355 | | |
| |||
13382 | 13381 | | |
13383 | 13382 | | |
13384 | 13383 | | |
| 13384 | + | |
13385 | 13385 | | |
13386 | 13386 | | |
13387 | 13387 | | |
| |||
13506 | 13506 | | |
13507 | 13507 | | |
13508 | 13508 | | |
| 13509 | + | |
| 13510 | + | |
| 13511 | + | |
| 13512 | + | |
| 13513 | + | |
| 13514 | + | |
13509 | 13515 | | |
13510 | 13516 | | |
13511 | 13517 | | |
| |||
13517 | 13523 | | |
13518 | 13524 | | |
13519 | 13525 | | |
| 13526 | + | |
| 13527 | + | |
| 13528 | + | |
| 13529 | + | |
| 13530 | + | |
13520 | 13531 | | |
13521 | 13532 | | |
13522 | 13533 | | |
| |||
13973 | 13984 | | |
13974 | 13985 | | |
13975 | 13986 | | |
13976 | | - | |
13977 | | - | |
| 13987 | + | |
13978 | 13988 | | |
13979 | | - | |
13980 | 13989 | | |
13981 | 13990 | | |
13982 | 13991 | | |
| |||
14007 | 14016 | | |
14008 | 14017 | | |
14009 | 14018 | | |
14010 | | - | |
| 14019 | + | |
14011 | 14020 | | |
14012 | 14021 | | |
14013 | 14022 | | |
| |||
14017 | 14026 | | |
14018 | 14027 | | |
14019 | 14028 | | |
14020 | | - | |
| 14029 | + | |
14021 | 14030 | | |
14022 | 14031 | | |
14023 | 14032 | | |
| |||
14110 | 14119 | | |
14111 | 14120 | | |
14112 | 14121 | | |
14113 | | - | |
| 14122 | + | |
14114 | 14123 | | |
14115 | 14124 | | |
14116 | 14125 | | |
| |||
14122 | 14131 | | |
14123 | 14132 | | |
14124 | 14133 | | |
14125 | | - | |
14126 | | - | |
14127 | | - | |
14128 | | - | |
14129 | 14134 | | |
14130 | 14135 | | |
14131 | 14136 | | |
14132 | 14137 | | |
14133 | 14138 | | |
14134 | 14139 | | |
14135 | 14140 | | |
| 14141 | + | |
| 14142 | + | |
| 14143 | + | |
| 14144 | + | |
| 14145 | + | |
| 14146 | + | |
14136 | 14147 | | |
14137 | 14148 | | |
14138 | 14149 | | |
| |||
14148 | 14159 | | |
14149 | 14160 | | |
14150 | 14161 | | |
| 14162 | + | |
| 14163 | + | |
14151 | 14164 | | |
14152 | 14165 | | |
14153 | 14166 | | |
| |||
15534 | 15547 | | |
15535 | 15548 | | |
15536 | 15549 | | |
15537 | | - | |
15538 | 15550 | | |
| 15551 | + | |
| 15552 | + | |
15539 | 15553 | | |
15540 | 15554 | | |
15541 | 15555 | | |
| |||
15590 | 15604 | | |
15591 | 15605 | | |
15592 | 15606 | | |
| 15607 | + | |
15593 | 15608 | | |
15594 | 15609 | | |
15595 | 15610 | | |
15596 | | - | |
15597 | 15611 | | |
15598 | 15612 | | |
15599 | 15613 | | |
| |||
15623 | 15637 | | |
15624 | 15638 | | |
15625 | 15639 | | |
| 15640 | + | |
| 15641 | + | |
15626 | 15642 | | |
15627 | 15643 | | |
15628 | 15644 | | |
15629 | | - | |
15630 | | - | |
15631 | 15645 | | |
15632 | 15646 | | |
15633 | 15647 | | |
| |||
15763 | 15777 | | |
15764 | 15778 | | |
15765 | 15779 | | |
15766 | | - | |
15767 | | - | |
15768 | | - | |
| 15780 | + | |
15769 | 15781 | | |
15770 | | - | |
15771 | 15782 | | |
15772 | 15783 | | |
| 15784 | + | |
| 15785 | + | |
| 15786 | + | |
15773 | 15787 | | |
15774 | 15788 | | |
15775 | 15789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2440 | 2440 | | |
2441 | 2441 | | |
2442 | 2442 | | |
| 2443 | + | |
2443 | 2444 | | |
2444 | 2445 | | |
2445 | 2446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| 451 | + | |
449 | 452 | | |
450 | 453 | | |
451 | | - | |
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
| |||
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
519 | | - | |
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
| |||
570 | 571 | | |
571 | 572 | | |
572 | 573 | | |
| 574 | + | |
| 575 | + | |
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
| |||
0 commit comments