aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index e1a30a16a9fa..07f0172674c9 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3815,7 +3815,11 @@ lpfc_get_stats(struct Scsi_Host *shost)
3815 hs->invalid_crc_count -= lso->invalid_crc_count; 3815 hs->invalid_crc_count -= lso->invalid_crc_count;
3816 hs->error_frames -= lso->error_frames; 3816 hs->error_frames -= lso->error_frames;
3817 3817
3818 if (phba->fc_topology == TOPOLOGY_LOOP) { 3818 if (phba->hba_flag & HBA_FCOE_SUPPORT) {
3819 hs->lip_count = -1;
3820 hs->nos_count = (phba->link_events >> 1);
3821 hs->nos_count -= lso->link_events;
3822 } else if (phba->fc_topology == TOPOLOGY_LOOP) {
3819 hs->lip_count = (phba->fc_eventTag >> 1); 3823 hs->lip_count = (phba->fc_eventTag >> 1);
3820 hs->lip_count -= lso->link_events; 3824 hs->lip_count -= lso->link_events;
3821 hs->nos_count = -1; 3825 hs->nos_count = -1;
@@ -3906,7 +3910,10 @@ lpfc_reset_stats(struct Scsi_Host *shost)
3906 lso->invalid_tx_word_count = pmb->un.varRdLnk.invalidXmitWord; 3910 lso->invalid_tx_word_count = pmb->un.varRdLnk.invalidXmitWord;
3907 lso->invalid_crc_count = pmb->un.varRdLnk.crcCnt; 3911 lso->invalid_crc_count = pmb->un.varRdLnk.crcCnt;
3908 lso->error_frames = pmb->un.varRdLnk.crcCnt; 3912 lso->error_frames = pmb->un.varRdLnk.crcCnt;
3909 lso->link_events = (phba->fc_eventTag >> 1); 3913 if (phba->hba_flag & HBA_FCOE_SUPPORT)
3914 lso->link_events = (phba->link_events >> 1);
3915 else
3916 lso->link_events = (phba->fc_eventTag >> 1);
3910 3917
3911 psli->stats_start = get_seconds(); 3918 psli->stats_start = get_seconds();
3912 3919