From: Vaios Papadimitriou Date: Tue, 8 May 2012 22:01:22 +0000 (-0500) Subject: Fixed SLI4 FC port obtained link type and number dependent on link connection (CR... X-Git-Tag: v2.6.39-400.9.0~423^2~123^2~32 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=923a97cc39c0acab3272378b72fa08ab17449c68;p=users%2Fjedix%2Flinux-maple.git Fixed SLI4 FC port obtained link type and number dependent on link connection (CR 126264) There are places in the driver diagnostic code space, which picked up SLI4 FC port link type and number depend on link connection from asynchronous link event. In those cases, instead of using the link type and link number obtainedfrom 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 27d3ff8f1af0..5de35c68d8ad 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -1708,14 +1708,14 @@ lpfc_sli4_bsg_set_link_diag_state(struct lpfc_hba *phba, uint32_t diag) } lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, "3128 Set link to diagnostic state:x%x (x%x/x%x)\n", - diag, phba->sli4_hba.link_state.type, - phba->sli4_hba.link_state.number); + diag, phba->sli4_hba.lnk_info.lnk_tp, + phba->sli4_hba.lnk_info.lnk_no); link_diag_state = &pmboxq->u.mqe.un.link_diag_state; bf_set(lpfc_mbx_set_diag_state_link_num, &link_diag_state->u.req, - phba->sli4_hba.link_state.number); + phba->sli4_hba.lnk_info.lnk_no); bf_set(lpfc_mbx_set_diag_state_link_type, &link_diag_state->u.req, - phba->sli4_hba.link_state.type); + phba->sli4_hba.lnk_info.lnk_tp); if (diag) bf_set(lpfc_mbx_set_diag_state_diag, &link_diag_state->u.req, 1); @@ -2165,9 +2165,9 @@ lpfc_sli4_bsg_link_diag_test(struct fc_bsg_job *job) } run_link_diag_test = &pmboxq->u.mqe.un.link_diag_test; bf_set(lpfc_mbx_run_diag_test_link_num, &run_link_diag_test->u.req, - phba->sli4_hba.link_state.number); + phba->sli4_hba.lnk_info.lnk_no); bf_set(lpfc_mbx_run_diag_test_link_type, &run_link_diag_test->u.req, - phba->sli4_hba.link_state.type); + phba->sli4_hba.lnk_info.lnk_tp); bf_set(lpfc_mbx_run_diag_test_test_id, &run_link_diag_test->u.req, link_diag_test_cmd->test_id); bf_set(lpfc_mbx_run_diag_test_loops, &run_link_diag_test->u.req,