Commit 2d7e73f0 authored by David S. Miller's avatar David S. Miller
Browse files

Revert "Merge branch 'dsa-rtnl'"

This reverts commit 965e6b26, reversing
changes made to 4d98bb0d.
parent 12f241f2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -13056,7 +13056,6 @@ F: include/linux/dsa/
F:	include/linux/platform_data/dsa.h
F:	include/net/dsa.h
F:	net/dsa/
F:	tools/testing/selftests/drivers/net/dsa/
NETWORKING [GENERAL]
M:	"David S. Miller" <davem@davemloft.net>
+6 −34
Original line number Diff line number Diff line
@@ -1544,7 +1544,6 @@ EXPORT_SYMBOL(b53_vlan_del);

/* Address Resolution Logic routines */
static int b53_arl_op_wait(struct b53_device *dev)
	__must_hold(&dev->arl_mutex)
{
	unsigned int timeout = 10;
	u8 reg;
@@ -1563,7 +1562,6 @@ static int b53_arl_op_wait(struct b53_device *dev)
}

static int b53_arl_rw_op(struct b53_device *dev, unsigned int op)
	__must_hold(&dev->arl_mutex)
{
	u8 reg;

@@ -1587,7 +1585,6 @@ static int b53_arl_rw_op(struct b53_device *dev, unsigned int op)

static int b53_arl_read(struct b53_device *dev, u64 mac,
			u16 vid, struct b53_arl_entry *ent, u8 *idx)
	__must_hold(&dev->arl_mutex)
{
	DECLARE_BITMAP(free_bins, B53_ARLTBL_MAX_BIN_ENTRIES);
	unsigned int i;
@@ -1633,7 +1630,6 @@ static int b53_arl_read(struct b53_device *dev, u64 mac,

static int b53_arl_op(struct b53_device *dev, int op, int port,
		      const unsigned char *addr, u16 vid, bool is_valid)
	__must_hold(&dev->arl_mutex)
{
	struct b53_arl_entry ent;
	u32 fwd_entry;
@@ -1711,7 +1707,6 @@ int b53_fdb_add(struct dsa_switch *ds, int port,
		const unsigned char *addr, u16 vid)
{
	struct b53_device *priv = ds->priv;
	int ret;

	/* 5325 and 5365 require some more massaging, but could
	 * be supported eventually
@@ -1719,11 +1714,7 @@ int b53_fdb_add(struct dsa_switch *ds, int port,
	if (is5325(priv) || is5365(priv))
		return -EOPNOTSUPP;

	mutex_lock(&priv->arl_mutex);
	ret = b53_arl_op(priv, 0, port, addr, vid, true);
	mutex_unlock(&priv->arl_mutex);

	return ret;
	return b53_arl_op(priv, 0, port, addr, vid, true);
}
EXPORT_SYMBOL(b53_fdb_add);

@@ -1731,18 +1722,12 @@ int b53_fdb_del(struct dsa_switch *ds, int port,
		const unsigned char *addr, u16 vid)
{
	struct b53_device *priv = ds->priv;
	int ret;

	mutex_lock(&priv->arl_mutex);
	ret = b53_arl_op(priv, 0, port, addr, vid, false);
	mutex_unlock(&priv->arl_mutex);

	return ret;
	return b53_arl_op(priv, 0, port, addr, vid, false);
}
EXPORT_SYMBOL(b53_fdb_del);

static int b53_arl_search_wait(struct b53_device *dev)
	__must_hold(&dev->arl_mutex)
{
	unsigned int timeout = 1000;
	u8 reg;
@@ -1763,7 +1748,6 @@ static int b53_arl_search_wait(struct b53_device *dev)

static void b53_arl_search_rd(struct b53_device *dev, u8 idx,
			      struct b53_arl_entry *ent)
	__must_hold(&dev->arl_mutex)
{
	u64 mac_vid;
	u32 fwd_entry;
@@ -1796,8 +1780,6 @@ int b53_fdb_dump(struct dsa_switch *ds, int port,
	int ret;
	u8 reg;

	mutex_lock(&priv->arl_mutex);

	/* Start search operation */
	reg = ARL_SRCH_STDN;
	b53_write8(priv, B53_ARLIO_PAGE, B53_ARL_SRCH_CTL, reg);
@@ -1805,18 +1787,18 @@ int b53_fdb_dump(struct dsa_switch *ds, int port,
	do {
		ret = b53_arl_search_wait(priv);
		if (ret)
			break;
			return ret;

		b53_arl_search_rd(priv, 0, &results[0]);
		ret = b53_fdb_copy(port, &results[0], cb, data);
		if (ret)
			break;
			return ret;

		if (priv->num_arl_bins > 2) {
			b53_arl_search_rd(priv, 1, &results[1]);
			ret = b53_fdb_copy(port, &results[1], cb, data);
			if (ret)
				break;
				return ret;

			if (!results[0].is_valid && !results[1].is_valid)
				break;
@@ -1824,8 +1806,6 @@ int b53_fdb_dump(struct dsa_switch *ds, int port,

	} while (count++ < b53_max_arl_entries(priv) / 2);

	mutex_unlock(&priv->arl_mutex);

	return 0;
}
EXPORT_SYMBOL(b53_fdb_dump);
@@ -1834,7 +1814,6 @@ int b53_mdb_add(struct dsa_switch *ds, int port,
		const struct switchdev_obj_port_mdb *mdb)
{
	struct b53_device *priv = ds->priv;
	int ret;

	/* 5325 and 5365 require some more massaging, but could
	 * be supported eventually
@@ -1842,11 +1821,7 @@ int b53_mdb_add(struct dsa_switch *ds, int port,
	if (is5325(priv) || is5365(priv))
		return -EOPNOTSUPP;

	mutex_lock(&priv->arl_mutex);
	ret = b53_arl_op(priv, 0, port, mdb->addr, mdb->vid, true);
	mutex_unlock(&priv->arl_mutex);

	return ret;
	return b53_arl_op(priv, 0, port, mdb->addr, mdb->vid, true);
}
EXPORT_SYMBOL(b53_mdb_add);

@@ -1856,9 +1831,7 @@ int b53_mdb_del(struct dsa_switch *ds, int port,
	struct b53_device *priv = ds->priv;
	int ret;

	mutex_lock(&priv->arl_mutex);
	ret = b53_arl_op(priv, 0, port, mdb->addr, mdb->vid, false);
	mutex_unlock(&priv->arl_mutex);
	if (ret)
		dev_err(ds->dev, "failed to delete MDB entry\n");

@@ -2695,7 +2668,6 @@ struct b53_device *b53_switch_alloc(struct device *base,

	mutex_init(&dev->reg_mutex);
	mutex_init(&dev->stats_mutex);
	mutex_init(&dev->arl_mutex);

	return dev;
}
+0 −1
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ struct b53_device {

	struct mutex reg_mutex;
	struct mutex stats_mutex;
	struct mutex arl_mutex;
	const struct b53_io_ops *ops;

	/* chip specific data */
+5 −23
Original line number Diff line number Diff line
@@ -276,7 +276,6 @@ struct gswip_priv {
	int num_gphy_fw;
	struct gswip_gphy_fw *gphy_fw;
	u32 port_vlan_filter;
	struct mutex pce_table_lock;
};

struct gswip_pce_table_entry {
@@ -524,14 +523,10 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
	u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSRD :
					GSWIP_PCE_TBL_CTRL_OPMOD_ADRD;

	mutex_lock(&priv->pce_table_lock);

	err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
				     GSWIP_PCE_TBL_CTRL_BAS);
	if (err) {
		mutex_unlock(&priv->pce_table_lock);
	if (err)
		return err;
	}

	gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
	gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
@@ -541,10 +536,8 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,

	err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
				     GSWIP_PCE_TBL_CTRL_BAS);
	if (err) {
		mutex_unlock(&priv->pce_table_lock);
	if (err)
		return err;
	}

	for (i = 0; i < ARRAY_SIZE(tbl->key); i++)
		tbl->key[i] = gswip_switch_r(priv, GSWIP_PCE_TBL_KEY(i));
@@ -560,8 +553,6 @@ static int gswip_pce_table_entry_read(struct gswip_priv *priv,
	tbl->valid = !!(crtl & GSWIP_PCE_TBL_CTRL_VLD);
	tbl->gmap = (crtl & GSWIP_PCE_TBL_CTRL_GMAP_MASK) >> 7;

	mutex_unlock(&priv->pce_table_lock);

	return 0;
}

@@ -574,14 +565,10 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
	u16 addr_mode = tbl->key_mode ? GSWIP_PCE_TBL_CTRL_OPMOD_KSWR :
					GSWIP_PCE_TBL_CTRL_OPMOD_ADWR;

	mutex_lock(&priv->pce_table_lock);

	err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
				     GSWIP_PCE_TBL_CTRL_BAS);
	if (err) {
		mutex_unlock(&priv->pce_table_lock);
	if (err)
		return err;
	}

	gswip_switch_w(priv, tbl->index, GSWIP_PCE_TBL_ADDR);
	gswip_switch_mask(priv, GSWIP_PCE_TBL_CTRL_ADDR_MASK |
@@ -613,12 +600,8 @@ static int gswip_pce_table_entry_write(struct gswip_priv *priv,
	crtl |= GSWIP_PCE_TBL_CTRL_BAS;
	gswip_switch_w(priv, crtl, GSWIP_PCE_TBL_CTRL);

	err = gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
	return gswip_switch_r_timeout(priv, GSWIP_PCE_TBL_CTRL,
				      GSWIP_PCE_TBL_CTRL_BAS);

	mutex_unlock(&priv->pce_table_lock);

	return err;
}

/* Add the LAN port into a bridge with the CPU port by
@@ -2121,7 +2104,6 @@ static int gswip_probe(struct platform_device *pdev)
	priv->ds->priv = priv;
	priv->ds->ops = priv->hw_info->ops;
	priv->dev = dev;
	mutex_init(&priv->pce_table_lock);
	version = gswip_switch_r(priv, GSWIP_VERSION);

	np = dev->of_node;
+0 −2
Original line number Diff line number Diff line
@@ -261,8 +261,6 @@ struct sja1105_private {
	 * the switch doesn't confuse them with one another.
	 */
	struct mutex mgmt_lock;
	/* Serializes access to the dynamic config interface */
	struct mutex dynamic_config_lock;
	struct devlink_region **regions;
	struct sja1105_cbs_entry *cbs;
	struct mii_bus *mdio_base_t1;
Loading