aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_lport.c
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2012-05-25 13:26:54 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 03:31:48 -0400
commit4e5fae7adbe4f21538b9e62c0fc9b029bbd606cb (patch)
tree99c14af426c0e3f6b38583ac66e7622028d669c6 /drivers/scsi/libfc/fc_lport.c
parent0f02a6652803235a4893c7b01dd6eab862a913ec (diff)
[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)
329 fc_stats->fcp_control_requests += stats->ControlRequests; 329 fc_stats->fcp_control_requests += stats->ControlRequests;
330 fcp_in_bytes += stats->InputBytes; 330 fcp_in_bytes += stats->InputBytes;
331 fcp_out_bytes += stats->OutputBytes; 331 fcp_out_bytes += stats->OutputBytes;
332 fc_stats->fcp_packet_alloc_failures += stats->FcpPktAllocFails;
333 fc_stats->fcp_packet_aborts += stats->FcpPktAborts;
334 fc_stats->fcp_frame_alloc_failures += stats->FcpFrameAllocFails;
332 fc_stats->link_failure_count += stats->LinkFailureCount; 335 fc_stats->link_failure_count += stats->LinkFailureCount;
333 } 336 }
334 fc_stats->fcp_input_megabytes = div_u64(fcp_in_bytes, 1000000); 337 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)
339 fc_stats->loss_of_signal_count = -1; 342 fc_stats->loss_of_signal_count = -1;
340 fc_stats->prim_seq_protocol_err_count = -1; 343 fc_stats->prim_seq_protocol_err_count = -1;
341 fc_stats->dumped_frames = -1; 344 fc_stats->dumped_frames = -1;
345
346 /* update exches stats */
347 fc_exch_update_stats(lport);
348
342 return fc_stats; 349 return fc_stats;
343} 350}
344EXPORT_SYMBOL(fc_get_host_stats); 351EXPORT_SYMBOL(fc_get_host_stats);