scsi: fcoe: provide translation table between Ethernet and FC port speeds
authorJohannes Thumshirn <jthumshirn@suse.de>
Fri, 19 Aug 2016 13:33:37 +0000 (15:33 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Aug 2016 02:27:47 +0000 (22:27 -0400)
commit0b924e5505a568e7a70e07b529a02ed12295ff7c
tree4911bf24704536dfbfd7093cd580d854815d1973
parent9442c9b0ed5c6f3a86dce0d6f714ef43f7f6cd53
scsi: fcoe: provide translation table between Ethernet and FC port speeds

Provide a translation table between Ethernet and FC port speeds so odd
speeds (from a Ethernet POV) like 8 Gbit are correctly mapped to sysfs
and open-fcoe's fcoeadm.

Before:
    Description:      BCM57840 NetXtreme II 10/20-Gigabit Ethernet
    Revision:         11
    Manufacturer:     Broadcom Corporation
    Serial Number:    6CC2173EA1D0

    Driver:           bnx2x 1.712.30-0
    Number of Ports:  1

        Symbolic Name:     bnx2fc (QLogic BCM57840) v2.10.3 over eth2
        OS Device Name:    host1
        Node Name:         0x20006cc2173ea1d1
        Port Name:         0x10006cc2173ea1d1
        FabricName:        0x100000c0dd0ce717
        Speed:             unknown
        Supported Speed:   1 Gbit, 10 Gbit
        MaxFrameSize:      2048 bytes
        FC-ID (Port ID):   0x660702
        State:             Online

After:
    Description:      BCM57840 NetXtreme II 10/20-Gigabit Ethernet
    Revision:         11
    Manufacturer:     Broadcom Corporation
    Serial Number:    6CC2173EA1D0

    Driver:           bnx2x 1.712.30-0
    Number of Ports:  1

        Symbolic Name:     bnx2fc (QLogic BCM57840) v2.10.3 over eth2
        OS Device Name:    host1
        Node Name:         0x20006cc2173ea1d1
        Port Name:         0x10006cc2173ea1d1
        FabricName:        0x100000c0dd0ce717
        Speed:             8 Gbit
        Supported Speed:   1 Gbit, 10 Gbit
        MaxFrameSize:      2048 bytes
        FC-ID (Port ID):   0x660701
        State:             Online

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/fcoe/fcoe_transport.c