Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
UPSTREAM: Revert net back to Stock 4.4.13
Browse files Browse the repository at this point in the history
*temporarely* Revert back to handle IPv6 bug.

Signed-off-by: BlackMesa123 <brother12@hotmail.it>
  • Loading branch information
BlackMesa123 committed Sep 22, 2018
1 parent bec5e84 commit 3933e1a
Show file tree
Hide file tree
Showing 816 changed files with 7,491 additions and 12,549 deletions.
3 changes: 0 additions & 3 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,6 @@ config XEN_NETDEV_BACKEND
config VMXNET3
tristate "VMware VMXNET3 ethernet driver"
depends on PCI && INET
depends on !(PAGE_SIZE_64KB || ARM64_64K_PAGES || \
IA64_PAGE_SIZE_64KB || MICROBLAZE_64K_PAGES || \
PARISC_PAGE_SIZE_64KB || PPC_64K_PAGES)
help
This driver supports VMware's vmxnet3 virtual ethernet NIC.
To compile this driver as a module, choose M here: the
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/appletalk/ipddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static netdev_tx_t ipddp_xmit(struct sk_buff *skb, struct net_device *dev)
*/
static int ipddp_create(struct ipddp_route *new_rt)
{
struct ipddp_route *rt = kzalloc(sizeof(*rt), GFP_KERNEL);
struct ipddp_route *rt = kmalloc(sizeof(*rt), GFP_KERNEL);

if (rt == NULL)
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static void rlb_update_client(struct rlb_client_info *client_info)
{
int i;

if (!client_info->slave || !is_valid_ether_addr(client_info->mac_dst))
if (!client_info->slave)
return;

for (i = 0; i < RLB_ARP_BURST_SIZE; i++) {
Expand Down
107 changes: 47 additions & 60 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,10 +1317,9 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
slave_dev->name);
}

/* already in-use? */
if (netdev_is_rx_handler_busy(slave_dev)) {
netdev_err(bond_dev,
"Error: Device is in use and cannot be enslaved\n");
/* already enslaved */
if (slave_dev->flags & IFF_SLAVE) {
netdev_dbg(bond_dev, "Error: Device was already enslaved\n");
return -EBUSY;
}

Expand Down Expand Up @@ -1490,6 +1489,39 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
goto err_close;
}

/* If the mode uses primary, then the following is handled by
* bond_change_active_slave().
*/
if (!bond_uses_primary(bond)) {
/* set promiscuity level to new slave */
if (bond_dev->flags & IFF_PROMISC) {
res = dev_set_promiscuity(slave_dev, 1);
if (res)
goto err_close;
}

/* set allmulti level to new slave */
if (bond_dev->flags & IFF_ALLMULTI) {
res = dev_set_allmulti(slave_dev, 1);
if (res)
goto err_close;
}

netif_addr_lock_bh(bond_dev);

dev_mc_sync_multiple(slave_dev, bond_dev);
dev_uc_sync_multiple(slave_dev, bond_dev);

netif_addr_unlock_bh(bond_dev);
}

if (BOND_MODE(bond) == BOND_MODE_8023AD) {
/* add lacpdu mc addr to mc list */
u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR;

dev_mc_add(slave_dev, lacpdu_multicast);
}

res = vlan_vids_add_by_dev(slave_dev, bond_dev);
if (res) {
netdev_err(bond_dev, "Couldn't add bond vlan ids to %s\n",
Expand Down Expand Up @@ -1614,7 +1646,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
} /* switch(bond_mode) */

#ifdef CONFIG_NET_POLL_CONTROLLER
if (bond->dev->npinfo) {
slave_dev->npinfo = bond->dev->npinfo;
if (slave_dev->npinfo) {
if (slave_enable_netpoll(new_slave)) {
netdev_info(bond_dev, "master_dev is using netpoll, but new slave device does not support netpoll\n");
res = -EBUSY;
Expand Down Expand Up @@ -1645,40 +1678,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
goto err_upper_unlink;
}

/* If the mode uses primary, then the following is handled by
* bond_change_active_slave().
*/
if (!bond_uses_primary(bond)) {
/* set promiscuity level to new slave */
if (bond_dev->flags & IFF_PROMISC) {
res = dev_set_promiscuity(slave_dev, 1);
if (res)
goto err_sysfs_del;
}

/* set allmulti level to new slave */
if (bond_dev->flags & IFF_ALLMULTI) {
res = dev_set_allmulti(slave_dev, 1);
if (res) {
if (bond_dev->flags & IFF_PROMISC)
dev_set_promiscuity(slave_dev, -1);
goto err_sysfs_del;
}
}

netif_addr_lock_bh(bond_dev);
dev_mc_sync_multiple(slave_dev, bond_dev);
dev_uc_sync_multiple(slave_dev, bond_dev);
netif_addr_unlock_bh(bond_dev);

if (BOND_MODE(bond) == BOND_MODE_8023AD) {
/* add lacpdu mc addr to mc list */
u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR;

dev_mc_add(slave_dev, lacpdu_multicast);
}
}

bond->slave_cnt++;
bond_compute_features(bond);
bond_set_carrier(bond);
Expand All @@ -1702,16 +1701,16 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
return 0;

/* Undo stages on error */
err_sysfs_del:
bond_sysfs_slave_del(new_slave);

err_upper_unlink:
bond_upper_dev_unlink(bond_dev, slave_dev);

err_unregister:
netdev_rx_handler_unregister(slave_dev);

err_detach:
if (!bond_uses_primary(bond))
bond_hw_addr_flush(bond_dev, slave_dev);

vlan_vids_del_by_dev(slave_dev, bond_dev);
if (rcu_access_pointer(bond->primary_slave) == new_slave)
RCU_INIT_POINTER(bond->primary_slave, NULL);
Expand Down Expand Up @@ -2555,13 +2554,11 @@ static void bond_loadbalance_arp_mon(struct work_struct *work)
bond_for_each_slave_rcu(bond, slave, iter) {
unsigned long trans_start = dev_trans_start(slave->dev);

slave->new_link = BOND_LINK_NOCHANGE;

if (slave->link != BOND_LINK_UP) {
if (bond_time_in_interval(bond, trans_start, 1) &&
bond_time_in_interval(bond, slave->last_rx, 1)) {

slave->new_link = BOND_LINK_UP;
slave->link = BOND_LINK_UP;
slave_state_changed = 1;

/* primary_slave has no meaning in round-robin
Expand All @@ -2588,7 +2585,7 @@ static void bond_loadbalance_arp_mon(struct work_struct *work)
if (!bond_time_in_interval(bond, trans_start, 2) ||
!bond_time_in_interval(bond, slave->last_rx, 2)) {

slave->new_link = BOND_LINK_DOWN;
slave->link = BOND_LINK_DOWN;
slave_state_changed = 1;

if (slave->link_failure_count < UINT_MAX)
Expand Down Expand Up @@ -2619,11 +2616,6 @@ static void bond_loadbalance_arp_mon(struct work_struct *work)
if (!rtnl_trylock())
goto re_arm;

bond_for_each_slave(bond, slave, iter) {
if (slave->new_link != BOND_LINK_NOCHANGE)
slave->link = slave->new_link;
}

if (slave_state_changed) {
bond_slave_state_change(bond);
if (BOND_MODE(bond) == BOND_MODE_XOR)
Expand Down Expand Up @@ -3173,7 +3165,7 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb)
hash ^= (hash >> 16);
hash ^= (hash >> 8);

return hash >> 1;
return hash;
}

/*-------------------------- Device entry points ----------------------------*/
Expand Down Expand Up @@ -3283,17 +3275,12 @@ static void bond_fold_stats(struct rtnl_link_stats64 *_res,
for (i = 0; i < sizeof(*_res) / sizeof(u64); i++) {
u64 nv = new[i];
u64 ov = old[i];
s64 delta = nv - ov;

/* detects if this particular field is 32bit only */
if (((nv | ov) >> 32) == 0)
delta = (s64)(s32)((u32)nv - (u32)ov);

/* filter anomalies, some drivers reset their stats
* at down/up events.
*/
if (delta > 0)
res[i] += delta;
res[i] += (u32)nv - (u32)ov;
else
res[i] += nv - ov;
}
}

Expand Down
6 changes: 1 addition & 5 deletions drivers/net/bonding/bond_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,7 @@ static int bond_newlink(struct net *src_net, struct net_device *bond_dev,
if (err < 0)
return err;

err = register_netdevice(bond_dev);

netif_carrier_off(bond_dev);

return err;
return register_netdevice(bond_dev);
}

static size_t bond_get_size(const struct net_device *bond_dev)
Expand Down
1 change: 0 additions & 1 deletion drivers/net/bonding/bond_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,6 @@ static int bond_option_primary_set(struct bonding *bond,
slave->dev->name);
rcu_assign_pointer(bond->primary_slave, slave);
strcpy(bond->params.primary, slave->dev->name);
bond->force_primary = true;
bond_select_active_slave(bond);
goto out;
}
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,9 @@ static int at91_poll_rx(struct net_device *dev, int quota)

/* upper group completed, look again in lower */
if (priv->rx_next > get_mb_rx_low_last(priv) &&
mb > get_mb_rx_last(priv)) {
quota > 0 && mb > get_mb_rx_last(priv)) {
priv->rx_next = get_mb_rx_first(priv);
if (quota > 0)
goto again;
goto again;
}

return received;
Expand Down
38 changes: 7 additions & 31 deletions drivers/net/can/c_can/c_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,23 +332,9 @@ static void c_can_setup_tx_object(struct net_device *dev, int iface,

priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), ctrl);

if (priv->type == BOSCH_D_CAN) {
u32 data = 0, dreg = C_CAN_IFACE(DATA1_REG, iface);

for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) {
data = (u32)frame->data[i];
data |= (u32)frame->data[i + 1] << 8;
data |= (u32)frame->data[i + 2] << 16;
data |= (u32)frame->data[i + 3] << 24;
priv->write_reg32(priv, dreg, data);
}
} else {
for (i = 0; i < frame->can_dlc; i += 2) {
priv->write_reg(priv,
C_CAN_IFACE(DATA1_REG, iface) + i / 2,
frame->data[i] |
(frame->data[i + 1] << 8));
}
for (i = 0; i < frame->can_dlc; i += 2) {
priv->write_reg(priv, C_CAN_IFACE(DATA1_REG, iface) + i / 2,
frame->data[i] | (frame->data[i + 1] << 8));
}
}

Expand Down Expand Up @@ -416,20 +402,10 @@ static int c_can_read_msg_object(struct net_device *dev, int iface, u32 ctrl)
} else {
int i, dreg = C_CAN_IFACE(DATA1_REG, iface);

if (priv->type == BOSCH_D_CAN) {
for (i = 0; i < frame->can_dlc; i += 4, dreg += 2) {
data = priv->read_reg32(priv, dreg);
frame->data[i] = data;
frame->data[i + 1] = data >> 8;
frame->data[i + 2] = data >> 16;
frame->data[i + 3] = data >> 24;
}
} else {
for (i = 0; i < frame->can_dlc; i += 2, dreg++) {
data = priv->read_reg(priv, dreg);
frame->data[i] = data;
frame->data[i + 1] = data >> 8;
}
for (i = 0; i < frame->can_dlc; i += 2, dreg ++) {
data = priv->read_reg(priv, dreg);
frame->data[i] = data;
frame->data[i + 1] = data >> 8;
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/c_can/c_can_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ static int c_can_pci_probe(struct pci_dev *pdev,

dev->irq = pdev->irq;
priv->base = addr;
priv->device = &pdev->dev;

if (!c_can_pci_data->freq) {
dev_err(&pdev->dev, "no clock frequency defined\n");
Expand All @@ -178,6 +177,7 @@ static int c_can_pci_probe(struct pci_dev *pdev,
break;
case BOSCH_D_CAN:
priv->regs = reg_map_d_can;
priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
break;
default:
ret = -EINVAL;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/can/c_can/c_can_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
break;
case BOSCH_D_CAN:
priv->regs = reg_map_d_can;
priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
priv->read_reg = c_can_plat_read_reg_aligned_to_16bit;
priv->write_reg = c_can_plat_write_reg_aligned_to_16bit;
priv->read_reg32 = d_can_plat_read_reg32;
Expand Down
Loading

0 comments on commit 3933e1a

Please sign in to comment.