[SCSI] lpfc 8.3.8: Add code to display logical link speed
authorJames Smart <james.smart@emulex.com>
Wed, 27 Jan 2010 04:08:29 +0000 (23:08 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 9 Feb 2010 00:38:44 +0000 (18:38 -0600)
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>
drivers/scsi/lpfc/lpfc_hw4.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_sli4.h

index 8a2a1c5935c6b3ff30a10c18dfa5e490c7b731fd..c2bec6e6222fb05e771e4543f97e9407dd6d5513 100644 (file)
@@ -1959,6 +1959,9 @@ struct lpfc_acqe_link {
 #define LPFC_ASYNC_LINK_FAULT_NONE     0x0
 #define LPFC_ASYNC_LINK_FAULT_LOCAL    0x1
 #define LPFC_ASYNC_LINK_FAULT_REMOTE   0x2
+#define lpfc_acqe_qos_link_speed_SHIFT 16
+#define lpfc_acqe_qos_link_speed_MASK  0x0000FFFF
+#define lpfc_acqe_qos_link_speed_WORD  word1
        uint32_t event_tag;
        uint32_t trailer;
 };
index 4d20c4148fae113857cd92042e61778da00b4165..e80e95d95cdec201755c4f127dda81edba990609 100644 (file)
@@ -2981,6 +2981,8 @@ lpfc_sli4_async_link_evt(struct lpfc_hba *phba,
                                bf_get(lpfc_acqe_link_physical, acqe_link);
        phba->sli4_hba.link_state.fault =
                                bf_get(lpfc_acqe_link_fault, acqe_link);
+       phba->sli4_hba.link_state.logical_speed =
+                               bf_get(lpfc_acqe_qos_link_speed, acqe_link);
 
        /* Invoke the lpfc_handle_latt mailbox command callback function */
        lpfc_mbx_cmpl_read_la(phba, pmb);
index d5cc6b8d32f258a6da83d88bdd2c7d810582b1f2..8f4b90a9d15195252ee5e1a3f7407d1f436ef942 100644 (file)
@@ -2701,6 +2701,13 @@ lpfc_info(struct Scsi_Host *host)
                                 " port %s",
                                 phba->Port);
                }
+               len = strlen(lpfcinfobuf);
+               if (phba->sli4_hba.link_state.logical_speed) {
+                       snprintf(lpfcinfobuf + len,
+                                384-len,
+                                " Logical Link Speed: %d Mbps",
+                                phba->sli4_hba.link_state.logical_speed * 10);
+               }
        }
        return lpfcinfobuf;
 }
index 44e5f574236bf25322eb9d30ebebc3faa8ae9442..2e5e405768649bd2b3790de96e6b41a00e48763a 100644 (file)
@@ -126,6 +126,7 @@ struct lpfc_sli4_link {
        uint8_t status;
        uint8_t physical;
        uint8_t fault;
+       uint16_t logical_speed;
 };
 
 struct lpfc_fcf {
This page took 0.037749 seconds and 5 git commands to generate.