lpfc_debugfs.c (415d2b3392d7a80903e0f97f051201aa02bf20e9) lpfc_debugfs.c (9e210178267b80c4eeb832fade7e146a18c84915)
1/*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
5 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
6 * Copyright (C) 2007-2015 Emulex. All rights reserved. *
7 * EMULEX and SLI are trademarks of Emulex. *
8 * www.broadcom.com *

--- 537 unchanged lines hidden (view full) ---

546 int len = 0;
547 int i, iocnt, outio, cnt;
548 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
549 struct lpfc_hba *phba = vport->phba;
550 struct lpfc_nodelist *ndlp;
551 unsigned char *statep;
552 struct nvme_fc_local_port *localport;
553 struct lpfc_nvmet_tgtport *tgtp;
1/*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
5 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
6 * Copyright (C) 2007-2015 Emulex. All rights reserved. *
7 * EMULEX and SLI are trademarks of Emulex. *
8 * www.broadcom.com *

--- 537 unchanged lines hidden (view full) ---

546 int len = 0;
547 int i, iocnt, outio, cnt;
548 struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
549 struct lpfc_hba *phba = vport->phba;
550 struct lpfc_nodelist *ndlp;
551 unsigned char *statep;
552 struct nvme_fc_local_port *localport;
553 struct lpfc_nvmet_tgtport *tgtp;
554 struct nvme_fc_remote_port *nrport;
554 struct nvme_fc_remote_port *nrport = NULL;
555 struct lpfc_nvme_rport *rport;
556
557 cnt = (LPFC_NODELIST_SIZE / LPFC_NODELIST_ENTRY_SIZE);
558 outio = 0;
559
560 len += snprintf(buf+len, size-len, "\nFCP Nodelist Entries ...\n");
561 spin_lock_irq(shost->host_lock);
562 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {

--- 128 unchanged lines hidden (view full) ---

691
692 len += snprintf(buf + len, size - len,
693 "Lport DID x%06x PortState %s\n",
694 localport->port_id, statep);
695
696 len += snprintf(buf + len, size - len, "\tRport List:\n");
697 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
698 /* local short-hand pointer. */
555 struct lpfc_nvme_rport *rport;
556
557 cnt = (LPFC_NODELIST_SIZE / LPFC_NODELIST_ENTRY_SIZE);
558 outio = 0;
559
560 len += snprintf(buf+len, size-len, "\nFCP Nodelist Entries ...\n");
561 spin_lock_irq(shost->host_lock);
562 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {

--- 128 unchanged lines hidden (view full) ---

691
692 len += snprintf(buf + len, size - len,
693 "Lport DID x%06x PortState %s\n",
694 localport->port_id, statep);
695
696 len += snprintf(buf + len, size - len, "\tRport List:\n");
697 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
698 /* local short-hand pointer. */
699 spin_lock(&phba->hbalock);
699 rport = lpfc_ndlp_get_nrport(ndlp);
700 rport = lpfc_ndlp_get_nrport(ndlp);
700 if (!rport)
701 continue;
702
703 nrport = rport->remoteport;
701 if (rport)
702 nrport = rport->remoteport;
703 spin_unlock(&phba->hbalock);
704 if (!nrport)
705 continue;
706
707 /* Port state is only one of two values for now. */
708 switch (nrport->port_state) {
709 case FC_OBJSTATE_ONLINE:
710 statep = "ONLINE";
711 break;

--- 5304 unchanged lines hidden ---
704 if (!nrport)
705 continue;
706
707 /* Port state is only one of two values for now. */
708 switch (nrport->port_state) {
709 case FC_OBJSTATE_ONLINE:
710 statep = "ONLINE";
711 break;

--- 5304 unchanged lines hidden ---