From: Vaios Papadimitriou Date: Tue, 8 May 2012 22:01:22 +0000 (-0500) Subject: Fixed SLI4 FC port internal loopback without SFP and external link/loopback plug... X-Git-Tag: v2.6.39-400.9.0~423^2~123^2~33 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a0c0c11aa1e48c8a23a63e5538a9771f3d99de6c;p=users%2Fjedix%2Flinux-maple.git 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 --- 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);