On 10/23/18 10:41 PM, James Smart wrote:
After a LOGO in response to an ABTS timeout, a PLOGI wasn't issued to re-establish the login. A nlp_type check in the LOGO completion handler failed to restart discovery for NVME targets. Revised the nlp_type check for NVME as well as SCSI. While reviewing the LOGO handling a few other issues were seen and were addressed: - Better lock synchronization around ndlp data types - When the ABTS times out, unregister the RPI before sending the LOGO so that all local exchange contexts are cleared and nothing received while awaiting LOGO/PLOGI handling will be accepted. - LOGO handling optimized to: Wait only R_A_TOV for a response. It doesn't need to be retried on timeout. If there wasn't a response, a PLOGI will be sent, thus an implicit logout applies as well when the other port sees it. If there is a response, any kind of response is considered "good" and the XRI quarantined for a exchange qualifier window. - PLOGI is issued as soon a LOGO state is resolved. Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx> Signed-off-by: James Smart <jsmart2021@xxxxxxxxx> --- drivers/scsi/lpfc/lpfc_els.c | 49 ++++++++++++++++---------------------- drivers/scsi/lpfc/lpfc_nportdisc.c | 5 ++++ 2 files changed, 26 insertions(+), 28 deletions(-)
Good point about being able to ignore LOGO failures :-) Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes