From a0c0c11aa1e48c8a23a63e5538a9771f3d99de6c Mon Sep 17 00:00:00 2001 From: Vaios Papadimitriou Date: Tue, 8 May 2012 17:01:22 -0500 Subject: [PATCH] Fixed SLI4 FC port internal loopback without SFP and external link/loopback plug (CR 125843) When performing internal loopback diagnostic test on LPe16000 port without SFP present or without external link/loopback plug plugged in, internal loopback on port1 failed. Instead of using the link type and link number obtained reported from the asynchronous link event, used the link type and link number obtained from the READ_CONFIG mailbox command from SLI4 setup routine , which will not depend on an external link or loopback plug present. commit id: 1b51197d0fd0c06877c6df1bba84ac4008a7fc60 Signed-off-by: Maxim Uvarov --- drivers/scsi/lpfc/lpfc_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index a8c12a065dbaa..27d3ff8f1af04 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -1766,9 +1766,9 @@ lpfc_sli4_bsg_set_internal_loopback(struct lpfc_hba *phba) } link_diag_loopback = &pmboxq->u.mqe.un.link_diag_loopback; bf_set(lpfc_mbx_set_diag_state_link_num, - &link_diag_loopback->u.req, phba->sli4_hba.link_state.number); + &link_diag_loopback->u.req, phba->sli4_hba.lnk_info.lnk_no); bf_set(lpfc_mbx_set_diag_state_link_type, - &link_diag_loopback->u.req, phba->sli4_hba.link_state.type); + &link_diag_loopback->u.req, phba->sli4_hba.lnk_info.lnk_tp); bf_set(lpfc_mbx_set_diag_lpbk_type, &link_diag_loopback->u.req, LPFC_DIAG_LOOPBACK_TYPE_SERDES); -- 2.50.1