fcoe: adds spma mode support

If we can find a type NETDEV_HW_ADDR_T_SAN mac address from the
corresponding netdev for a fcoe interface then sets up added the
fc->ctlr.spma flag and stores spma mode address in ctl_src_addr.

In case the spma flag is set then:-

 1. Adds spma mode MAC address in ctl_src_addr as secondary
    MAC address, the FLOGI for FIP and pre-FIP will go out
    using this address.
 2. Cleans up stored spma MAC address in ctl_src_addr in
    fcoe_netdev_cleanup.
 3. Sets up spma bit in fip_flags for FIP solicitations along
    with exiting FPMA bit setting.
 4. Initialize the FLOGI FIP MAC descriptor to stored spma
    MAC address in ctl_src_addr. This is used as proposed
    FCoE MAC address from initiator along with both SPMA
    and FPMA bit set in FIP solicitation, in response the
    switch may grant any FPMA or SPMA mode MAC address to
    initiator.

Removes FIP descriptor type checking against ELS type
ELS_FLOGI in fcoe_ctlr_encaps to update a FIP MAC descriptor,
instead now checks against FIP_DT_FLOGI.

I've tested this with available FPMA-only FCoE switch but
since data_src_addr is updated using same old code for
both FPMA and SPMA modes with FIP or pre-FIP links, so added
SPMA mode will work with SPMA-only switch also provided that
switch grants a valid MAC address.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 666cc13..b241060 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -73,6 +73,7 @@
  * @link:	current link status for libfc.
  * @last_link:	last link state reported to libfc.
  * @map_dest:	use the FC_MAP mode for destination MAC addresses.
+ * @spma:	supports SPMA server-provided MACs mode
  * @dest_addr:	MAC address of the selected FC forwarder.
  * @ctl_src_addr: the native MAC address of our local port.
  * @data_src_addr: the assigned MAC address for the local port after FLOGI.
@@ -104,6 +105,7 @@
 	u8 link;
 	u8 last_link;
 	u8 map_dest;
+	u8 spma;
 	u8 dest_addr[ETH_ALEN];
 	u8 ctl_src_addr[ETH_ALEN];
 	u8 data_src_addr[ETH_ALEN];