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

Commit 0486b60a authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-next'



Alexander Duyck says:

====================
DSA Cleanups

This patch series does two things, first it cleans up the tag_protocol and
protocol ops being configured seperately.  Second it addresses the desire
to split DSA away from relying on a MII bus.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6cca9adb b4d2394d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -499,7 +499,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq)

	d->netdev = &orion_ge00.dev;
	for (i = 0; i < d->nr_chips; i++)
		d->chip[i].mii_bus = &orion_ge00_shared.dev;
		d->chip[i].host_dev = &orion_ge00_shared.dev;
	orion_switch_device.dev.platform_data = d;

	platform_device_register(&orion_switch_device);
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static int bcm_sf2_sw_get_sset_count(struct dsa_switch *ds)
	return BCM_SF2_STATS_SIZE;
}

static char *bcm_sf2_sw_probe(struct mii_bus *bus, int sw_addr)
static char *bcm_sf2_sw_probe(struct device *host_dev, int sw_addr)
{
	return "Broadcom Starfighter 2";
}
+9 −4
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@

static int reg_read(struct dsa_switch *ds, int addr, int reg)
{
	return mdiobus_read(ds->master_mii_bus, ds->pd->sw_addr + addr, reg);
	return mdiobus_read(to_mii_bus(ds->master_dev),
			    ds->pd->sw_addr + addr, reg);
}

#define REG_READ(addr, reg)					\
@@ -37,8 +38,8 @@ static int reg_read(struct dsa_switch *ds, int addr, int reg)

static int reg_write(struct dsa_switch *ds, int addr, int reg, u16 val)
{
	return mdiobus_write(ds->master_mii_bus, ds->pd->sw_addr + addr,
			     reg, val);
	return mdiobus_write(to_mii_bus(ds->master_dev),
			     ds->pd->sw_addr + addr, reg, val);
}

#define REG_WRITE(addr, reg, val)				\
@@ -50,10 +51,14 @@ static int reg_write(struct dsa_switch *ds, int addr, int reg, u16 val)
			return __ret;				\
	})

static char *mv88e6060_probe(struct mii_bus *bus, int sw_addr)
static char *mv88e6060_probe(struct device *host_dev, int sw_addr)
{
	struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
	int ret;

	if (bus == NULL)
		return NULL;

	ret = mdiobus_read(bus, sw_addr + REG_PORT(0), 0x03);
	if (ret >= 0) {
		ret &= 0xfff0;
+5 −1
Original line number Diff line number Diff line
@@ -17,10 +17,14 @@
#include <net/dsa.h>
#include "mv88e6xxx.h"

static char *mv88e6123_61_65_probe(struct mii_bus *bus, int sw_addr)
static char *mv88e6123_61_65_probe(struct device *host_dev, int sw_addr)
{
	struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
	int ret;

	if (bus == NULL)
		return NULL;

	ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
	if (ret >= 0) {
		if (ret == 0x1212)
+5 −1
Original line number Diff line number Diff line
@@ -22,10 +22,14 @@
#define ID_6095		0x0950
#define ID_6131		0x1060

static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr)
static char *mv88e6131_probe(struct device *host_dev, int sw_addr)
{
	struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
	int ret;

	if (bus == NULL)
		return NULL;

	ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
	if (ret >= 0) {
		ret &= 0xfff0;
Loading