Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
The MSCC bug fix in 'net' had to be slightly adjusted because the register accesses are done slightly differently in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -609,7 +609,7 @@ static int b53_srab_probe(struct platform_device *pdev)
|
||||
|
||||
priv->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(priv->regs))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(priv->regs);
|
||||
|
||||
dev = b53_switch_alloc(&pdev->dev, &b53_srab_ops, priv);
|
||||
if (!dev)
|
||||
|
@@ -628,11 +628,8 @@ mt7530_cpu_port_enable(struct mt7530_priv *priv,
|
||||
mt7530_write(priv, MT7530_PVC_P(port),
|
||||
PORT_SPEC_TAG);
|
||||
|
||||
/* Disable auto learning on the cpu port */
|
||||
mt7530_set(priv, MT7530_PSC_P(port), SA_DIS);
|
||||
|
||||
/* Unknown unicast frame fordwarding to the cpu port */
|
||||
mt7530_set(priv, MT7530_MFC, UNU_FFP(BIT(port)));
|
||||
/* Unknown multicast frame forwarding to the cpu port */
|
||||
mt7530_rmw(priv, MT7530_MFC, UNM_FFP_MASK, UNM_FFP(BIT(port)));
|
||||
|
||||
/* Set CPU port number */
|
||||
if (priv->id == ID_MT7621)
|
||||
@@ -1288,8 +1285,6 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
/* Enable and reset MIB counters */
|
||||
mt7530_mib_reset(ds);
|
||||
|
||||
mt7530_clear(priv, MT7530_MFC, UNU_FFP_MASK);
|
||||
|
||||
for (i = 0; i < MT7530_NUM_PORTS; i++) {
|
||||
/* Disable forwarding by default on all ports */
|
||||
mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
|
||||
|
@@ -31,6 +31,7 @@ enum {
|
||||
#define MT7530_MFC 0x10
|
||||
#define BC_FFP(x) (((x) & 0xff) << 24)
|
||||
#define UNM_FFP(x) (((x) & 0xff) << 16)
|
||||
#define UNM_FFP_MASK UNM_FFP(~0)
|
||||
#define UNU_FFP(x) (((x) & 0xff) << 8)
|
||||
#define UNU_FFP_MASK UNU_FFP(~0)
|
||||
#define CPU_EN BIT(7)
|
||||
|
@@ -414,6 +414,7 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
|
||||
struct ocelot *ocelot = &felix->ocelot;
|
||||
phy_interface_t *port_phy_modes;
|
||||
resource_size_t switch_base;
|
||||
struct resource res;
|
||||
int port, i, err;
|
||||
|
||||
ocelot->num_phys_ports = num_phys_ports;
|
||||
@@ -448,17 +449,16 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
|
||||
|
||||
for (i = 0; i < TARGET_MAX; i++) {
|
||||
struct regmap *target;
|
||||
struct resource *res;
|
||||
|
||||
if (!felix->info->target_io_res[i].name)
|
||||
continue;
|
||||
|
||||
res = &felix->info->target_io_res[i];
|
||||
res->flags = IORESOURCE_MEM;
|
||||
res->start += switch_base;
|
||||
res->end += switch_base;
|
||||
memcpy(&res, &felix->info->target_io_res[i], sizeof(res));
|
||||
res.flags = IORESOURCE_MEM;
|
||||
res.start += switch_base;
|
||||
res.end += switch_base;
|
||||
|
||||
target = ocelot_regmap_init(ocelot, res);
|
||||
target = ocelot_regmap_init(ocelot, &res);
|
||||
if (IS_ERR(target)) {
|
||||
dev_err(ocelot->dev,
|
||||
"Failed to map device memory space\n");
|
||||
@@ -479,7 +479,6 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
|
||||
for (port = 0; port < num_phys_ports; port++) {
|
||||
struct ocelot_port *ocelot_port;
|
||||
void __iomem *port_regs;
|
||||
struct resource *res;
|
||||
|
||||
ocelot_port = devm_kzalloc(ocelot->dev,
|
||||
sizeof(struct ocelot_port),
|
||||
@@ -491,12 +490,12 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
res = &felix->info->port_io_res[port];
|
||||
res->flags = IORESOURCE_MEM;
|
||||
res->start += switch_base;
|
||||
res->end += switch_base;
|
||||
memcpy(&res, &felix->info->port_io_res[port], sizeof(res));
|
||||
res.flags = IORESOURCE_MEM;
|
||||
res.start += switch_base;
|
||||
res.end += switch_base;
|
||||
|
||||
port_regs = devm_ioremap_resource(ocelot->dev, res);
|
||||
port_regs = devm_ioremap_resource(ocelot->dev, &res);
|
||||
if (IS_ERR(port_regs)) {
|
||||
dev_err(ocelot->dev,
|
||||
"failed to map registers for port %d\n", port);
|
||||
|
@@ -9,9 +9,9 @@
|
||||
|
||||
/* Platform-specific information */
|
||||
struct felix_info {
|
||||
struct resource *target_io_res;
|
||||
struct resource *port_io_res;
|
||||
struct resource *imdio_res;
|
||||
const struct resource *target_io_res;
|
||||
const struct resource *port_io_res;
|
||||
const struct resource *imdio_res;
|
||||
const struct reg_field *regfields;
|
||||
const u32 *const *map;
|
||||
const struct ocelot_ops *ops;
|
||||
|
@@ -340,10 +340,8 @@ static const u32 *vsc9959_regmap[] = {
|
||||
[GCB] = vsc9959_gcb_regmap,
|
||||
};
|
||||
|
||||
/* Addresses are relative to the PCI device's base address and
|
||||
* will be fixed up at ioremap time.
|
||||
*/
|
||||
static struct resource vsc9959_target_io_res[] = {
|
||||
/* Addresses are relative to the PCI device's base address */
|
||||
static const struct resource vsc9959_target_io_res[] = {
|
||||
[ANA] = {
|
||||
.start = 0x0280000,
|
||||
.end = 0x028ffff,
|
||||
@@ -386,7 +384,7 @@ static struct resource vsc9959_target_io_res[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource vsc9959_port_io_res[] = {
|
||||
static const struct resource vsc9959_port_io_res[] = {
|
||||
{
|
||||
.start = 0x0100000,
|
||||
.end = 0x010ffff,
|
||||
@@ -422,7 +420,7 @@ static struct resource vsc9959_port_io_res[] = {
|
||||
/* Port MAC 0 Internal MDIO bus through which the SerDes acting as an
|
||||
* SGMII/QSGMII MAC PCS can be found.
|
||||
*/
|
||||
static struct resource vsc9959_imdio_res = {
|
||||
static const struct resource vsc9959_imdio_res = {
|
||||
.start = 0x8030,
|
||||
.end = 0x8040,
|
||||
.name = "imdio",
|
||||
@@ -1118,7 +1116,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
|
||||
struct device *dev = ocelot->dev;
|
||||
resource_size_t imdio_base;
|
||||
void __iomem *imdio_regs;
|
||||
struct resource *res;
|
||||
struct resource res;
|
||||
struct enetc_hw *hw;
|
||||
struct mii_bus *bus;
|
||||
int port;
|
||||
@@ -1135,12 +1133,12 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
|
||||
imdio_base = pci_resource_start(felix->pdev,
|
||||
felix->info->imdio_pci_bar);
|
||||
|
||||
res = felix->info->imdio_res;
|
||||
res->flags = IORESOURCE_MEM;
|
||||
res->start += imdio_base;
|
||||
res->end += imdio_base;
|
||||
memcpy(&res, felix->info->imdio_res, sizeof(res));
|
||||
res.flags = IORESOURCE_MEM;
|
||||
res.start += imdio_base;
|
||||
res.end += imdio_base;
|
||||
|
||||
imdio_regs = devm_ioremap_resource(dev, res);
|
||||
imdio_regs = devm_ioremap_resource(dev, &res);
|
||||
if (IS_ERR(imdio_regs)) {
|
||||
dev_err(dev, "failed to map internal MDIO registers\n");
|
||||
return PTR_ERR(imdio_regs);
|
||||
|
Reference in New Issue
Block a user