0021-scsi-lpfc-Fix-loop-mode-target-discovery.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Dick Kennedy <[email protected]>
  3. Date: Wed, 23 Aug 2017 16:55:31 -0700
  4. Subject: [PATCH] scsi: lpfc: Fix loop mode target discovery
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The driver does not discover targets when in loop mode.
  9. The NLP type is correctly getting set when a fabric connection is
  10. detected but, not for loop. The unknown NLP type means that the driver
  11. does not issue a PRLI when in loop topology. Thus target discovery
  12. fails.
  13. Fix by checking the topology during discovery. If it is loop, set the
  14. NLP FC4 type to FCP.
  15. Signed-off-by: Dick Kennedy <[email protected]>
  16. Signed-off-by: James Smart <[email protected]>
  17. Reviewed-by: Johannes Thumshirn <[email protected]>
  18. Signed-off-by: Martin K. Petersen <[email protected]>
  19. (cherry picked from commit 2877cbffb79ed121a6bcc5edbe629d3aba36cd29)
  20. Signed-off-by: Fabian Grünbichler <[email protected]>
  21. ---
  22. drivers/scsi/lpfc/lpfc_nportdisc.c | 3 +++
  23. 1 file changed, 3 insertions(+)
  24. diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
  25. index f74cb0142fd4..95b2b43ac37d 100644
  26. --- a/drivers/scsi/lpfc/lpfc_nportdisc.c
  27. +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
  28. @@ -1724,6 +1724,9 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,
  29. lpfc_nvme_update_localport(vport);
  30. }
  31. + } else if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) {
  32. + ndlp->nlp_fc4_type |= NLP_FC4_FCP;
  33. +
  34. } else if (ndlp->nlp_fc4_type == 0) {
  35. rc = lpfc_ns_cmd(vport, SLI_CTNS_GFT_ID,
  36. 0, ndlp->nlp_DID);
  37. --
  38. 2.14.2