Merge tag 'mlx5-updates-2019-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
Saeed Mamameed says: ==================== mlx5-updates-2019-04-02 This series provides misc updates to mlx5 driver 1) Aya Levin (1): Handle event of power detection in the PCIE slot 2) Eli Britstein (6): Some TC VLAN related updates and fixes to the previous VLAN modify action support patchset. Offload TC e-switch rules with egress/ingress VLAN devices 3) Max Gurtovoy (1): Fix double mutex initialization in esiwtch.c 4) Tariq Toukan (3): Misc small updates A write memory barrier is sufficient in EQ ci update Obsolete param field holding a constant value Unify logic of MTU boundaries 5) Tonghao Zhang (4): Misc updates to en_tc.c Make the log friendly when decapsulation offload not supported Remove 'parse_attr' argument in parse_tc_fdb_actions() Deletes unnecessary setting of esw_attr->parse_attr Return -EOPNOTSUPP when attempting to offload an unsupported action ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -170,7 +170,7 @@ static inline void mlx5_cq_arm(struct mlx5_core_cq *cq, u32 cmd,
|
||||
doorbell[0] = cpu_to_be32(sn << 28 | cmd | ci);
|
||||
doorbell[1] = cpu_to_be32(cq->cqn);
|
||||
|
||||
mlx5_write64(doorbell, uar_page + MLX5_CQ_DOORBELL, NULL);
|
||||
mlx5_write64(doorbell, uar_page + MLX5_CQ_DOORBELL);
|
||||
}
|
||||
|
||||
static inline void mlx5_cq_hold(struct mlx5_core_cq *cq)
|
||||
|
@@ -361,6 +361,7 @@ enum {
|
||||
|
||||
enum {
|
||||
MLX5_GENERAL_SUBTYPE_DELAY_DROP_TIMEOUT = 0x1,
|
||||
MLX5_GENERAL_SUBTYPE_PCI_POWER_CHANGE_EVENT = 0x5,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@@ -36,46 +36,25 @@
|
||||
#define MLX5_BF_OFFSET 0x800
|
||||
#define MLX5_CQ_DOORBELL 0x20
|
||||
|
||||
#if BITS_PER_LONG == 64
|
||||
/* Assume that we can just write a 64-bit doorbell atomically. s390
|
||||
* actually doesn't have writeq() but S/390 systems don't even have
|
||||
* PCI so we won't worry about it.
|
||||
*
|
||||
* Note that the write is not atomic on 32-bit systems! In contrast to 64-bit
|
||||
* ones, it requires proper locking. mlx5_write64 doesn't do any locking, so use
|
||||
* it at your own discretion, protected by some kind of lock on 32 bits.
|
||||
*
|
||||
* TODO: use write{q,l}_relaxed()
|
||||
*/
|
||||
|
||||
#define MLX5_DECLARE_DOORBELL_LOCK(name)
|
||||
#define MLX5_INIT_DOORBELL_LOCK(ptr) do { } while (0)
|
||||
#define MLX5_GET_DOORBELL_LOCK(ptr) (NULL)
|
||||
|
||||
static inline void mlx5_write64(__be32 val[2], void __iomem *dest,
|
||||
spinlock_t *doorbell_lock)
|
||||
static inline void mlx5_write64(__be32 val[2], void __iomem *dest)
|
||||
{
|
||||
#if BITS_PER_LONG == 64
|
||||
__raw_writeq(*(u64 *)val, dest);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* Just fall back to a spinlock to protect the doorbell if
|
||||
* BITS_PER_LONG is 32 -- there's no portable way to do atomic 64-bit
|
||||
* MMIO writes.
|
||||
*/
|
||||
|
||||
#define MLX5_DECLARE_DOORBELL_LOCK(name) spinlock_t name;
|
||||
#define MLX5_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr)
|
||||
#define MLX5_GET_DOORBELL_LOCK(ptr) (ptr)
|
||||
|
||||
static inline void mlx5_write64(__be32 val[2], void __iomem *dest,
|
||||
spinlock_t *doorbell_lock)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (doorbell_lock)
|
||||
spin_lock_irqsave(doorbell_lock, flags);
|
||||
__raw_writel((__force u32) val[0], dest);
|
||||
__raw_writel((__force u32) val[1], dest + 4);
|
||||
if (doorbell_lock)
|
||||
spin_unlock_irqrestore(doorbell_lock, flags);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* MLX5_DOORBELL_H */
|
||||
|
@@ -133,6 +133,7 @@ enum {
|
||||
MLX5_REG_MTRC_CONF = 0x9041,
|
||||
MLX5_REG_MTRC_STDB = 0x9042,
|
||||
MLX5_REG_MTRC_CTRL = 0x9043,
|
||||
MLX5_REG_MPEIN = 0x9050,
|
||||
MLX5_REG_MPCNT = 0x9051,
|
||||
MLX5_REG_MTPPS = 0x9053,
|
||||
MLX5_REG_MTPPSE = 0x9054,
|
||||
@@ -662,6 +663,7 @@ struct mlx5_core_dev {
|
||||
u64 sys_image_guid;
|
||||
phys_addr_t iseg_base;
|
||||
struct mlx5_init_seg __iomem *iseg;
|
||||
phys_addr_t bar_addr;
|
||||
enum mlx5_device_state state;
|
||||
/* sync interface state */
|
||||
struct mutex intf_state_mutex;
|
||||
@@ -887,6 +889,7 @@ void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome);
|
||||
int mlx5_core_get_caps(struct mlx5_core_dev *dev, enum mlx5_cap_type cap_type);
|
||||
int mlx5_cmd_alloc_uar(struct mlx5_core_dev *dev, u32 *uarn);
|
||||
int mlx5_cmd_free_uar(struct mlx5_core_dev *dev, u32 uarn);
|
||||
void mlx5_health_flush(struct mlx5_core_dev *dev);
|
||||
void mlx5_health_cleanup(struct mlx5_core_dev *dev);
|
||||
int mlx5_health_init(struct mlx5_core_dev *dev);
|
||||
void mlx5_start_health_poll(struct mlx5_core_dev *dev);
|
||||
|
@@ -8027,6 +8027,52 @@ struct mlx5_ifc_ppcnt_reg_bits {
|
||||
union mlx5_ifc_eth_cntrs_grp_data_layout_auto_bits counter_set;
|
||||
};
|
||||
|
||||
struct mlx5_ifc_mpein_reg_bits {
|
||||
u8 reserved_at_0[0x2];
|
||||
u8 depth[0x6];
|
||||
u8 pcie_index[0x8];
|
||||
u8 node[0x8];
|
||||
u8 reserved_at_18[0x8];
|
||||
|
||||
u8 capability_mask[0x20];
|
||||
|
||||
u8 reserved_at_40[0x8];
|
||||
u8 link_width_enabled[0x8];
|
||||
u8 link_speed_enabled[0x10];
|
||||
|
||||
u8 lane0_physical_position[0x8];
|
||||
u8 link_width_active[0x8];
|
||||
u8 link_speed_active[0x10];
|
||||
|
||||
u8 num_of_pfs[0x10];
|
||||
u8 num_of_vfs[0x10];
|
||||
|
||||
u8 bdf0[0x10];
|
||||
u8 reserved_at_b0[0x10];
|
||||
|
||||
u8 max_read_request_size[0x4];
|
||||
u8 max_payload_size[0x4];
|
||||
u8 reserved_at_c8[0x5];
|
||||
u8 pwr_status[0x3];
|
||||
u8 port_type[0x4];
|
||||
u8 reserved_at_d4[0xb];
|
||||
u8 lane_reversal[0x1];
|
||||
|
||||
u8 reserved_at_e0[0x14];
|
||||
u8 pci_power[0xc];
|
||||
|
||||
u8 reserved_at_100[0x20];
|
||||
|
||||
u8 device_status[0x10];
|
||||
u8 port_state[0x8];
|
||||
u8 reserved_at_138[0x8];
|
||||
|
||||
u8 reserved_at_140[0x10];
|
||||
u8 receiver_detect_result[0x10];
|
||||
|
||||
u8 reserved_at_160[0x20];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_mpcnt_reg_bits {
|
||||
u8 reserved_at_0[0x8];
|
||||
u8 pcie_index[0x8];
|
||||
@@ -8346,7 +8392,9 @@ struct mlx5_ifc_pcam_reg_bits {
|
||||
};
|
||||
|
||||
struct mlx5_ifc_mcam_enhanced_features_bits {
|
||||
u8 reserved_at_0[0x74];
|
||||
u8 reserved_at_0[0x6e];
|
||||
u8 pci_status_and_power[0x1];
|
||||
u8 reserved_at_6f[0x5];
|
||||
u8 mark_tx_action_cnp[0x1];
|
||||
u8 mark_tx_action_cqe[0x1];
|
||||
u8 dynamic_tx_overflow[0x1];
|
||||
@@ -8954,6 +9002,7 @@ union mlx5_ifc_ports_control_registers_document_bits {
|
||||
struct mlx5_ifc_pmtu_reg_bits pmtu_reg;
|
||||
struct mlx5_ifc_ppad_reg_bits ppad_reg;
|
||||
struct mlx5_ifc_ppcnt_reg_bits ppcnt_reg;
|
||||
struct mlx5_ifc_mpein_reg_bits mpein_reg;
|
||||
struct mlx5_ifc_mpcnt_reg_bits mpcnt_reg;
|
||||
struct mlx5_ifc_pplm_reg_bits pplm_reg;
|
||||
struct mlx5_ifc_pplr_reg_bits pplr_reg;
|
||||
|
Reference in New Issue
Block a user