aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-01-26 23:08:29 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-02-08 19:38:44 -0500
commit65467b6bdffd3efde111444663bc9de35b59b22a (patch)
treedf2fe983e3b5a0c921709d72eef529e9ae68aeb6 /drivers
parent695a814e18561c52456acf5051fac0ea4b8111da (diff)
[SCSI] lpfc 8.3.8: Add code to display logical link speed
Display Logical Link Speed when supported and is non-zero. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h3
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c7
-rw-r--r--drivers/scsi/lpfc/lpfc_sli4.h1
4 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 8a2a1c5935c..c2bec6e6222 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -1959,6 +1959,9 @@ struct lpfc_acqe_link {
1959#define LPFC_ASYNC_LINK_FAULT_NONE 0x0 1959#define LPFC_ASYNC_LINK_FAULT_NONE 0x0
1960#define LPFC_ASYNC_LINK_FAULT_LOCAL 0x1 1960#define LPFC_ASYNC_LINK_FAULT_LOCAL 0x1
1961#define LPFC_ASYNC_LINK_FAULT_REMOTE 0x2 1961#define LPFC_ASYNC_LINK_FAULT_REMOTE 0x2
1962#define lpfc_acqe_qos_link_speed_SHIFT 16
1963#define lpfc_acqe_qos_link_speed_MASK 0x0000FFFF
1964#define lpfc_acqe_qos_link_speed_WORD word1
1962 uint32_t event_tag; 1965 uint32_t event_tag;
1963 uint32_t trailer; 1966 uint32_t trailer;
1964}; 1967};
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 4d20c4148fa..e80e95d95cd 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2981,6 +2981,8 @@ lpfc_sli4_async_link_evt(struct lpfc_hba *phba,
2981 bf_get(lpfc_acqe_link_physical, acqe_link); 2981 bf_get(lpfc_acqe_link_physical, acqe_link);
2982 phba->sli4_hba.link_state.fault = 2982 phba->sli4_hba.link_state.fault =
2983 bf_get(lpfc_acqe_link_fault, acqe_link); 2983 bf_get(lpfc_acqe_link_fault, acqe_link);
2984 phba->sli4_hba.link_state.logical_speed =
2985 bf_get(lpfc_acqe_qos_link_speed, acqe_link);
2984 2986
2985 /* Invoke the lpfc_handle_latt mailbox command callback function */ 2987 /* Invoke the lpfc_handle_latt mailbox command callback function */
2986 lpfc_mbx_cmpl_read_la(phba, pmb); 2988 lpfc_mbx_cmpl_read_la(phba, pmb);
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index d5cc6b8d32f..8f4b90a9d15 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -2701,6 +2701,13 @@ lpfc_info(struct Scsi_Host *host)
2701 " port %s", 2701 " port %s",
2702 phba->Port); 2702 phba->Port);
2703 } 2703 }
2704 len = strlen(lpfcinfobuf);
2705 if (phba->sli4_hba.link_state.logical_speed) {
2706 snprintf(lpfcinfobuf + len,
2707 384-len,
2708 " Logical Link Speed: %d Mbps",
2709 phba->sli4_hba.link_state.logical_speed * 10);
2710 }
2704 } 2711 }
2705 return lpfcinfobuf; 2712 return lpfcinfobuf;
2706} 2713}
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 44e5f574236..2e5e4057686 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -126,6 +126,7 @@ struct lpfc_sli4_link {
126 uint8_t status; 126 uint8_t status;
127 uint8_t physical; 127 uint8_t physical;
128 uint8_t fault; 128 uint8_t fault;
129 uint16_t logical_speed;
129}; 130};
130 131
131struct lpfc_fcf { 132struct lpfc_fcf {