summaryrefslogtreecommitdiff
path: root/drivers/scsi/libfc/fc_lport.c
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2012-05-25 21:26:54 +0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 11:31:48 +0400
commit4e5fae7adbe4f21538b9e62c0fc9b029bbd606cb (patch)
tree99c14af426c0e3f6b38583ac66e7622028d669c6 /drivers/scsi/libfc/fc_lport.c
parent0f02a6652803235a4893c7b01dd6eab862a913ec (diff)
downloadlinux-4e5fae7adbe4f21538b9e62c0fc9b029bbd606cb.tar.xz
[SCSI] libfc: update fcp and exch stats
Updates newly added stats from fc_get_host_stats, added new function fc_exch_update_stats to update exches related stats from fc_exch.c by going thru internal ema_list elements. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Acked-by : Robert Love <robert.w.love@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r--drivers/scsi/libfc/fc_lport.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 3e8c48dfa42f..ca278d4b0f66 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -329,6 +329,9 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
fc_stats->fcp_control_requests += stats->ControlRequests;
fcp_in_bytes += stats->InputBytes;
fcp_out_bytes += stats->OutputBytes;
+ fc_stats->fcp_packet_alloc_failures += stats->FcpPktAllocFails;
+ fc_stats->fcp_packet_aborts += stats->FcpPktAborts;
+ fc_stats->fcp_frame_alloc_failures += stats->FcpFrameAllocFails;
fc_stats->link_failure_count += stats->LinkFailureCount;
}
fc_stats->fcp_input_megabytes = div_u64(fcp_in_bytes, 1000000);
@@ -339,6 +342,10 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
fc_stats->loss_of_signal_count = -1;
fc_stats->prim_seq_protocol_err_count = -1;
fc_stats->dumped_frames = -1;
+
+ /* update exches stats */
+ fc_exch_update_stats(lport);
+
return fc_stats;
}
EXPORT_SYMBOL(fc_get_host_stats);