diff options
author | James Smart <jsmart2021@gmail.com> | 2021-03-01 20:18:13 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-05 01:37:05 +0300 |
commit | 309b477462df7542355ac984674a6e89c01c89aa (patch) | |
tree | b2110c3e87239f341da9f6fd560e3e979f478a59 /drivers/pinctrl | |
parent | 143753059b8b957f1cf4355338a3e3a32f3a85bf (diff) | |
download | linux-309b477462df7542355ac984674a6e89c01c89aa.tar.xz |
scsi: lpfc: Fix ADISC handling that never frees nodes
While testing target port swap test with ADISC enabled, several nodes
remain in UNUSED state. These nodes are never freed and rmmod hangs for
long time before finising with "0233 Nodelist not empty" error.
During PLOGI completion lpfc_plogi_confirm_nport() looks for existing nodes
with same WWPN. If found, the existing node is used to continue discovery.
The node on which plogi was performed is freed. When ADISC is enabled, an
ADISC els request is triggered in response to an RSCN. It's possible that
the ADISC may be rejected by the remote port causing the ADISC completion
handler to clear the port and node name in the node. If this occurs, if a
PLOGI is received it causes a node lookup based on wwpn to now fail,
causing the port swap logic to kick in which allocates a new node and swaps
to it. This effectively orphans the original node structure.
Fix the situation by detecting when the lookup fails and forgo the node
swap and node allocation by using the node on which the PLOGI was issued.
Link: https://lore.kernel.org/r/20210301171821.3427-15-jsmart2021@gmail.com
Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.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>
Diffstat (limited to 'drivers/pinctrl')
0 files changed, 0 insertions, 0 deletions