Commit d948e638 authored by Satish Kharat's avatar Satish Kharat Committed by Martin K. Petersen

scsi: fnic: Add port speed stat to fnic debug stats

This patch adds the current fnic port speed stat to fnic debug stats.
Signed-off-by: default avatarSatish Kharat <satishkh@cisco.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 68f03bd1
......@@ -65,6 +65,12 @@ void fnic_handle_link(struct work_struct *work)
fnic->link_status = vnic_dev_link_status(fnic->vdev);
fnic->link_down_cnt = vnic_dev_link_down_cnt(fnic->vdev);
atomic64_set(&fnic->fnic_stats.misc_stats.current_port_speed,
vnic_dev_port_speed(fnic->vdev));
shost_printk(KERN_INFO, fnic->lport->host, "Current vnic speed set to : %llu\n",
(u64)atomic64_read(
&fnic->fnic_stats.misc_stats.current_port_speed));
switch (vnic_dev_port_speed(fnic->vdev)) {
case DCEM_PORTSPEED_10G:
fc_host_speed(fnic->lport->host) = FC_PORTSPEED_10GBIT;
......
......@@ -113,6 +113,7 @@ struct misc_stats {
atomic64_t queue_fulls;
atomic64_t rport_not_ready;
atomic64_t frame_errors;
atomic64_t current_port_speed;
};
struct fnic_stats {
......
......@@ -446,6 +446,11 @@ int fnic_get_stats_data(struct stats_debug_info *debug,
(u64)atomic64_read(&stats->misc_stats.rport_not_ready),
(u64)atomic64_read(&stats->misc_stats.frame_errors));
len += snprintf(debug->debug_buffer + len, buf_size - len,
"Firmware reported port seed: %llu\n",
(u64)atomic64_read(
&stats->misc_stats.current_port_speed));
return len;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment