Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
	drivers/net/ethernet/mellanox/mlx4/cmd.c
	net/core/fib_rules.c
	net/ipv4/fib_frontend.c

The fib_rules.c and fib_frontend.c conflicts were locking adjustments
in 'net' overlapping addition and removal of code in 'net-next'.

The mlx4 conflict was a bug fix in 'net' happening in the same
place a constant was being replaced with a more suitable macro.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2015-04-06 21:52:19 -04:00
91 changed files with 575 additions and 275 deletions

View File

@@ -513,12 +513,10 @@ static struct net_device *dev_to_net_device(struct device *dev)
#ifdef CONFIG_OF
static int dsa_of_setup_routing_table(struct dsa_platform_data *pd,
struct dsa_chip_data *cd,
int chip_index,
int chip_index, int port_index,
struct device_node *link)
{
int ret;
const __be32 *reg;
int link_port_addr;
int link_sw_addr;
struct device_node *parent_sw;
int len;
@@ -531,6 +529,10 @@ static int dsa_of_setup_routing_table(struct dsa_platform_data *pd,
if (!reg || (len != sizeof(*reg) * 2))
return -EINVAL;
/*
* Get the destination switch number from the second field of its 'reg'
* property, i.e. for "reg = <0x19 1>" sw_addr is '1'.
*/
link_sw_addr = be32_to_cpup(reg + 1);
if (link_sw_addr >= pd->nr_chips)
@@ -547,20 +549,9 @@ static int dsa_of_setup_routing_table(struct dsa_platform_data *pd,
memset(cd->rtable, -1, pd->nr_chips * sizeof(s8));
}
reg = of_get_property(link, "reg", NULL);
if (!reg) {
ret = -EINVAL;
goto out;
}
link_port_addr = be32_to_cpup(reg);
cd->rtable[link_sw_addr] = link_port_addr;
cd->rtable[link_sw_addr] = port_index;
return 0;
out:
kfree(cd->rtable);
return ret;
}
static void dsa_of_free_platform_data(struct dsa_platform_data *pd)
@@ -670,7 +661,7 @@ static int dsa_of_probe(struct device *dev)
if (!strcmp(port_name, "dsa") && link &&
pd->nr_chips > 1) {
ret = dsa_of_setup_routing_table(pd, cd,
chip_index, link);
chip_index, port_index, link);
if (ret)
goto out_free_chip;
}