net/mlx4_core: Fix the resource-type enum in res tracker to conform to FW spec
[cascardo/linux.git] / drivers / net / ethernet / mellanox / mlx4 / mlx4.h
index c9d7fc5..7aad076 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <net/devlink.h>
+#include <linux/rwsem.h>
 
 #include <linux/mlx4/device.h>
 #include <linux/mlx4/driver.h>
@@ -144,9 +145,10 @@ enum mlx4_resource {
        RES_MTT,
        RES_MAC,
        RES_VLAN,
-       RES_EQ,
+       RES_NPORT_ID,
        RES_COUNTER,
        RES_FS_RULE,
+       RES_EQ,
        MLX4_NUM_OF_RESOURCE_TYPE
 };
 
@@ -482,6 +484,7 @@ struct mlx4_slave_state {
        u8 init_port_mask;
        bool active;
        bool old_vlan_api;
+       bool vst_qinq_supported;
        u8 function;
        dma_addr_t vhcr_dma;
        u16 mtu[MLX4_MAX_PORTS + 1];
@@ -507,6 +510,7 @@ struct mlx4_vport_state {
        u64 mac;
        u16 default_vlan;
        u8  default_qos;
+       __be16 vlan_proto;
        u32 tx_rate;
        bool spoofchk;
        u32 link_state;
@@ -627,6 +631,7 @@ struct mlx4_cmd {
        struct mutex            slave_cmd_mutex;
        struct semaphore        poll_sem;
        struct semaphore        event_sem;
+       struct rw_semaphore     switch_sem;
        int                     max_cmds;
        spinlock_t              context_lock;
        int                     free_head;
@@ -655,6 +660,7 @@ struct mlx4_vf_immed_vlan_work {
        u8                      qos_vport;
        u16                     vlan_id;
        u16                     orig_vlan_id;
+       __be16                  vlan_proto;
 };