summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic/fnic_fcs.c
diff options
context:
space:
mode:
authorSatish Kharat <satishkh@cisco.com>2019-01-14 17:09:24 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-01-22 21:18:34 -0500
commitd948e6383ec372da488cb553d56e100787a32ace (patch)
tree3ba298d21a59658bb98b798c47a02201d2f125bd /drivers/scsi/fnic/fnic_fcs.c
parent68f03bd1eec6b064644e4b20dbc4a0f54a27b6b1 (diff)
downloadlinux-stable-d948e6383ec372da488cb553d56e100787a32ace.tar.gz
linux-stable-d948e6383ec372da488cb553d56e100787a32ace.tar.bz2
linux-stable-d948e6383ec372da488cb553d56e100787a32ace.zip
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: Satish Kharat <satishkh@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fnic/fnic_fcs.c')
-rw-r--r--drivers/scsi/fnic/fnic_fcs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 9bc1ece372a7..911a5adc289c 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -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;