Lines Matching refs:fc_stats

542 	struct fc_host_statistics *fc_stats;  in zfcp_scsi_init_fc_host_stats()  local
544 if (!adapter->fc_stats) { in zfcp_scsi_init_fc_host_stats()
545 fc_stats = kmalloc(sizeof(*fc_stats), GFP_KERNEL); in zfcp_scsi_init_fc_host_stats()
546 if (!fc_stats) in zfcp_scsi_init_fc_host_stats()
548 adapter->fc_stats = fc_stats; /* freed in adapter_release */ in zfcp_scsi_init_fc_host_stats()
550 memset(adapter->fc_stats, 0, sizeof(*adapter->fc_stats)); in zfcp_scsi_init_fc_host_stats()
551 return adapter->fc_stats; in zfcp_scsi_init_fc_host_stats()
554 static void zfcp_scsi_adjust_fc_host_stats(struct fc_host_statistics *fc_stats, in zfcp_scsi_adjust_fc_host_stats() argument
558 fc_stats->seconds_since_last_reset = in zfcp_scsi_adjust_fc_host_stats()
560 fc_stats->tx_frames = data->tx_frames - old->tx_frames; in zfcp_scsi_adjust_fc_host_stats()
561 fc_stats->tx_words = data->tx_words - old->tx_words; in zfcp_scsi_adjust_fc_host_stats()
562 fc_stats->rx_frames = data->rx_frames - old->rx_frames; in zfcp_scsi_adjust_fc_host_stats()
563 fc_stats->rx_words = data->rx_words - old->rx_words; in zfcp_scsi_adjust_fc_host_stats()
564 fc_stats->lip_count = data->lip - old->lip; in zfcp_scsi_adjust_fc_host_stats()
565 fc_stats->nos_count = data->nos - old->nos; in zfcp_scsi_adjust_fc_host_stats()
566 fc_stats->error_frames = data->error_frames - old->error_frames; in zfcp_scsi_adjust_fc_host_stats()
567 fc_stats->dumped_frames = data->dumped_frames - old->dumped_frames; in zfcp_scsi_adjust_fc_host_stats()
568 fc_stats->link_failure_count = data->link_failure - old->link_failure; in zfcp_scsi_adjust_fc_host_stats()
569 fc_stats->loss_of_sync_count = data->loss_of_sync - old->loss_of_sync; in zfcp_scsi_adjust_fc_host_stats()
570 fc_stats->loss_of_signal_count = in zfcp_scsi_adjust_fc_host_stats()
572 fc_stats->prim_seq_protocol_err_count = in zfcp_scsi_adjust_fc_host_stats()
574 fc_stats->invalid_tx_word_count = in zfcp_scsi_adjust_fc_host_stats()
576 fc_stats->invalid_crc_count = data->invalid_crcs - old->invalid_crcs; in zfcp_scsi_adjust_fc_host_stats()
577 fc_stats->fcp_input_requests = in zfcp_scsi_adjust_fc_host_stats()
579 fc_stats->fcp_output_requests = in zfcp_scsi_adjust_fc_host_stats()
581 fc_stats->fcp_control_requests = in zfcp_scsi_adjust_fc_host_stats()
583 fc_stats->fcp_input_megabytes = data->input_mb - old->input_mb; in zfcp_scsi_adjust_fc_host_stats()
584 fc_stats->fcp_output_megabytes = data->output_mb - old->output_mb; in zfcp_scsi_adjust_fc_host_stats()
587 static void zfcp_scsi_set_fc_host_stats(struct fc_host_statistics *fc_stats, in zfcp_scsi_set_fc_host_stats() argument
590 fc_stats->seconds_since_last_reset = data->seconds_since_last_reset; in zfcp_scsi_set_fc_host_stats()
591 fc_stats->tx_frames = data->tx_frames; in zfcp_scsi_set_fc_host_stats()
592 fc_stats->tx_words = data->tx_words; in zfcp_scsi_set_fc_host_stats()
593 fc_stats->rx_frames = data->rx_frames; in zfcp_scsi_set_fc_host_stats()
594 fc_stats->rx_words = data->rx_words; in zfcp_scsi_set_fc_host_stats()
595 fc_stats->lip_count = data->lip; in zfcp_scsi_set_fc_host_stats()
596 fc_stats->nos_count = data->nos; in zfcp_scsi_set_fc_host_stats()
597 fc_stats->error_frames = data->error_frames; in zfcp_scsi_set_fc_host_stats()
598 fc_stats->dumped_frames = data->dumped_frames; in zfcp_scsi_set_fc_host_stats()
599 fc_stats->link_failure_count = data->link_failure; in zfcp_scsi_set_fc_host_stats()
600 fc_stats->loss_of_sync_count = data->loss_of_sync; in zfcp_scsi_set_fc_host_stats()
601 fc_stats->loss_of_signal_count = data->loss_of_signal; in zfcp_scsi_set_fc_host_stats()
602 fc_stats->prim_seq_protocol_err_count = data->psp_error_counts; in zfcp_scsi_set_fc_host_stats()
603 fc_stats->invalid_tx_word_count = data->invalid_tx_words; in zfcp_scsi_set_fc_host_stats()
604 fc_stats->invalid_crc_count = data->invalid_crcs; in zfcp_scsi_set_fc_host_stats()
605 fc_stats->fcp_input_requests = data->input_requests; in zfcp_scsi_set_fc_host_stats()
606 fc_stats->fcp_output_requests = data->output_requests; in zfcp_scsi_set_fc_host_stats()
607 fc_stats->fcp_control_requests = data->control_requests; in zfcp_scsi_set_fc_host_stats()
608 fc_stats->fcp_input_megabytes = data->input_mb; in zfcp_scsi_set_fc_host_stats()
609 fc_stats->fcp_output_megabytes = data->output_mb; in zfcp_scsi_set_fc_host_stats()
616 struct fc_host_statistics *fc_stats; in zfcp_scsi_get_fc_host_stats() local
621 fc_stats = zfcp_scsi_init_fc_host_stats(adapter); in zfcp_scsi_get_fc_host_stats()
622 if (!fc_stats) in zfcp_scsi_get_fc_host_stats()
638 zfcp_scsi_adjust_fc_host_stats(fc_stats, data, in zfcp_scsi_get_fc_host_stats()
641 zfcp_scsi_set_fc_host_stats(fc_stats, data); in zfcp_scsi_get_fc_host_stats()
644 return fc_stats; in zfcp_scsi_get_fc_host_stats()