Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 366f02d8 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'mlx5-next'



Or Gerlitz says:

====================
Mellanox mlx5 driver update

Bunch of changes from the team, while warming engines for the
upcoming SRIOV support.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4de61ba2 171bb2c5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1136,6 +1136,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector)
				mlx5_free_cmd_msg(dev, ent->out);
				free_msg(dev, ent->in);

				err = err ? err : ent->status;
				free_cmd(ent);
				callback(err, context);
			} else {
@@ -1363,6 +1364,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev)
	int err;
	int i;

	memset(cmd, 0, sizeof(*cmd));
	cmd_if_rev = cmdif_rev(dev);
	if (cmd_if_rev != CMD_IF_REV) {
		dev_err(&dev->pdev->dev,
+1 −0
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ int mlx5_init_cq_table(struct mlx5_core_dev *dev)
	struct mlx5_cq_table *table = &dev->priv.cq_table;
	int err;

	memset(table, 0, sizeof(*table));
	spin_lock_init(&table->lock);
	INIT_RADIX_TREE(&table->tree, GFP_ATOMIC);
	err = mlx5_cq_debugfs_init(dev);
+6 −2
Original line number Diff line number Diff line
@@ -1367,13 +1367,13 @@ int mlx5e_open_locked(struct net_device *netdev)

	err = mlx5e_set_dev_port_mtu(netdev);
	if (err)
		return err;
		goto err_clear_state_opened_flag;

	err = mlx5e_open_channels(priv);
	if (err) {
		netdev_err(netdev, "%s: mlx5e_open_channels failed, %d\n",
			   __func__, err);
		return err;
		goto err_clear_state_opened_flag;
	}

	mlx5e_update_carrier(priv);
@@ -1382,6 +1382,10 @@ int mlx5e_open_locked(struct net_device *netdev)
	schedule_delayed_work(&priv->update_stats_work, 0);

	return 0;

err_clear_state_opened_flag:
	clear_bit(MLX5E_STATE_OPENED, &priv->state);
	return err;
}

static int mlx5e_open(struct net_device *netdev)
+1 −0
Original line number Diff line number Diff line
@@ -346,6 +346,7 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx,
	int inlen;

	eq->nent = roundup_pow_of_two(nent + MLX5_NUM_SPARE_EQE);
	eq->cons_index = 0;
	err = mlx5_buf_alloc(dev, eq->nent * MLX5_EQE_SIZE, &eq->buf);
	if (err)
		return err;
+10 −1
Original line number Diff line number Diff line
@@ -46,12 +46,15 @@ enum {
enum {
	MLX5_HEALTH_SYNDR_FW_ERR		= 0x1,
	MLX5_HEALTH_SYNDR_IRISC_ERR		= 0x7,
	MLX5_HEALTH_SYNDR_HW_UNRECOVERABLE_ERR	= 0x8,
	MLX5_HEALTH_SYNDR_CRC_ERR		= 0x9,
	MLX5_HEALTH_SYNDR_FETCH_PCI_ERR		= 0xa,
	MLX5_HEALTH_SYNDR_HW_FTL_ERR		= 0xb,
	MLX5_HEALTH_SYNDR_ASYNC_EQ_OVERRUN_ERR	= 0xc,
	MLX5_HEALTH_SYNDR_EQ_ERR		= 0xd,
	MLX5_HEALTH_SYNDR_EQ_INV		= 0xe,
	MLX5_HEALTH_SYNDR_FFSER_ERR		= 0xf,
	MLX5_HEALTH_SYNDR_HIGH_TEMP		= 0x10
};

static DEFINE_SPINLOCK(health_lock);
@@ -88,6 +91,8 @@ static const char *hsynd_str(u8 synd)
		return "firmware internal error";
	case MLX5_HEALTH_SYNDR_IRISC_ERR:
		return "irisc not responding";
	case MLX5_HEALTH_SYNDR_HW_UNRECOVERABLE_ERR:
		return "unrecoverable hardware error";
	case MLX5_HEALTH_SYNDR_CRC_ERR:
		return "firmware CRC error";
	case MLX5_HEALTH_SYNDR_FETCH_PCI_ERR:
@@ -98,8 +103,12 @@ static const char *hsynd_str(u8 synd)
		return "async EQ buffer overrun";
	case MLX5_HEALTH_SYNDR_EQ_ERR:
		return "EQ error";
	case MLX5_HEALTH_SYNDR_EQ_INV:
		return "Invalid EQ refrenced";
	case MLX5_HEALTH_SYNDR_FFSER_ERR:
		return "FFSER error";
	case MLX5_HEALTH_SYNDR_HIGH_TEMP:
		return "High temprature";
	default:
		return "unrecognized error";
	}
@@ -130,7 +139,7 @@ static void print_health_info(struct mlx5_core_dev *dev)
	pr_info("hw_id 0x%08x\n", read_be32(&h->hw_id));
	pr_info("irisc_index %d\n", readb(&h->irisc_index));
	pr_info("synd 0x%x: %s\n", readb(&h->synd), hsynd_str(readb(&h->synd)));
	pr_info("ext_sync 0x%04x\n", read_be16(&h->ext_sync));
	pr_info("ext_sync 0x%04x\n", read_be16(&h->ext_synd));
}

static void poll_health(unsigned long data)
Loading