Commit 8ccd692
scsi: lpfc: Fix RSCN timeout due to incorrect gidft counter
In configs with a large number of initiators in the same zone (>250), RSCN
timeouts are seen when creating or deleting vports:
lpfc 0000:07:00.1: 5:(0):0231 RSCN timeout Data: x0 x3
During RSCN processing driver issues GID_FT command to nameserver. A
counter for number of simultaneous GID_FT commands is maintained (an
unsigned value). The counter is incremented when the GID_FT is issued. If
the GID_FT command fails for some reason the driver retries the GID_FT from
the completion call back. But the counter was decremented before the retry
was issued. When the second GID_FT completes, the callback again tries to
decrement the counter, possibly wrapping to a very large non-zero value,
which causes the RSCN cleanup code to not execute. Thus the RSCN timeout
failure.
Do not decrement the counter on a retry. Also add defensive checks to
ensure the counter is not decremented if already zero.
Link: https://lore.kernel.org/r/20200803210229.23063-4-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 9e3e365 commit 8ccd692
1 file changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
| 716 | + | |
| 717 | + | |
717 | 718 | | |
718 | 719 | | |
719 | 720 | | |
| |||
741 | 742 | | |
742 | 743 | | |
743 | 744 | | |
744 | | - | |
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
| |||
825 | 829 | | |
826 | 830 | | |
827 | 831 | | |
828 | | - | |
| 832 | + | |
| 833 | + | |
829 | 834 | | |
830 | 835 | | |
831 | 836 | | |
| |||
918 | 923 | | |
919 | 924 | | |
920 | 925 | | |
921 | | - | |
| 926 | + | |
| 927 | + | |
922 | 928 | | |
923 | 929 | | |
924 | 930 | | |
| |||
942 | 948 | | |
943 | 949 | | |
944 | 950 | | |
945 | | - | |
946 | 951 | | |
947 | 952 | | |
948 | 953 | | |
949 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
950 | 959 | | |
951 | 960 | | |
952 | 961 | | |
| |||
1027 | 1036 | | |
1028 | 1037 | | |
1029 | 1038 | | |
1030 | | - | |
| 1039 | + | |
| 1040 | + | |
1031 | 1041 | | |
1032 | 1042 | | |
1033 | 1043 | | |
| |||
0 commit comments