scsi: fnic: support to display 20G port speed
authorSatish Kharat <satishkh@cisco.com>
Tue, 15 Jan 2019 01:09:20 +0000 (17:09 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 23 Jan 2019 02:18:33 +0000 (21:18 -0500)
This patch is to add fnic 20G port speed display in sysfs.

[mkp: typo]

Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/fnic/fnic_fcs.c
drivers/scsi/fnic/fnic_io.h
drivers/scsi/fnic/fnic_main.c

index 844ef688fa913ecaa3d56c4984961d8ea2711105..9bc1ece372a74a7907ceb5302b9f400d645cb039 100644 (file)
@@ -70,6 +70,10 @@ void fnic_handle_link(struct work_struct *work)
                fc_host_speed(fnic->lport->host)   = FC_PORTSPEED_10GBIT;
                fnic->lport->link_supported_speeds = FC_PORTSPEED_10GBIT;
                break;
+       case DCEM_PORTSPEED_20G:
+               fc_host_speed(fnic->lport->host)   = FC_PORTSPEED_20GBIT;
+               fnic->lport->link_supported_speeds = FC_PORTSPEED_20GBIT;
+               break;
        case DCEM_PORTSPEED_25G:
                fc_host_speed(fnic->lport->host)   = FC_PORTSPEED_25GBIT;
                fnic->lport->link_supported_speeds = FC_PORTSPEED_25GBIT;
index e0bc659ed71fc8faa0326594eac3d786043f34ef..1cb6a68c8e4ec4b2a4ea7bcaa3a8d88f2c0e1a60 100644 (file)
@@ -70,9 +70,10 @@ enum fnic_port_speeds {
        DCEM_PORTSPEED_NONE = 0,
        DCEM_PORTSPEED_1G    = 1000,
        DCEM_PORTSPEED_10G   = 10000,
+       DCEM_PORTSPEED_20G   = 20000,
+       DCEM_PORTSPEED_25G   = 25000,
        DCEM_PORTSPEED_40G   = 40000,
        DCEM_PORTSPEED_4x10G = 41000,
-       DCEM_PORTSPEED_25G   = 25000,
        DCEM_PORTSPEED_100G  = 100000,
 };
 #endif /* _FNIC_IO_H_ */
index 5b3534b0deda58fd759989a26a63351d1bf01852..6aefedd1e6696267a0140f01bfd86705c3330c67 100644 (file)
@@ -178,6 +178,9 @@ static void fnic_get_host_speed(struct Scsi_Host *shost)
        case DCEM_PORTSPEED_10G:
                fc_host_speed(shost) = FC_PORTSPEED_10GBIT;
                break;
+       case DCEM_PORTSPEED_20G:
+               fc_host_speed(shost) = FC_PORTSPEED_20GBIT;
+               break;
        case DCEM_PORTSPEED_25G:
                fc_host_speed(shost) = FC_PORTSPEED_25GBIT;
                break;