aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000e/netdev.c2
-rw-r--r--drivers/net/forcedeth.c2
-rw-r--r--drivers/net/igb/igb_ethtool.c1
-rw-r--r--drivers/net/igb/igb_main.c1
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c13
-rw-r--r--drivers/net/tun.c4
-rw-r--r--drivers/net/virtio_net.c1
-rw-r--r--net/can/raw.c2
8 files changed, 17 insertions, 9 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 38390b5bfd73..1bd581eedd06 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -664,6 +664,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
664 i = 0; 664 i = 0;
665 } 665 }
666 666
667 if (i == tx_ring->next_to_use)
668 break;
667 eop = tx_ring->buffer_info[i].next_to_watch; 669 eop = tx_ring->buffer_info[i].next_to_watch;
668 eop_desc = E1000_TX_DESC(*tx_ring, eop); 670 eop_desc = E1000_TX_DESC(*tx_ring, eop);
669 } 671 }
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 3267b2390917..8aa80946d835 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5901,7 +5901,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5901 /* Limit the number of tx's outstanding for hw bug */ 5901 /* Limit the number of tx's outstanding for hw bug */
5902 if (id->driver_data & DEV_NEED_TX_LIMIT) { 5902 if (id->driver_data & DEV_NEED_TX_LIMIT) {
5903 np->tx_limit = 1; 5903 np->tx_limit = 1;
5904 if ((id->driver_data & DEV_NEED_TX_LIMIT2) && 5904 if (((id->driver_data & DEV_NEED_TX_LIMIT2) == DEV_NEED_TX_LIMIT2) &&
5905 pci_dev->revision >= 0xA2) 5905 pci_dev->revision >= 0xA2)
5906 np->tx_limit = 0; 5906 np->tx_limit = 0;
5907 } 5907 }
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 55670ae7080a..1b8fd7f4064d 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -1864,6 +1864,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
1864 retval = 0; 1864 retval = 0;
1865 break; 1865 break;
1866 case E1000_DEV_ID_82576_QUAD_COPPER: 1866 case E1000_DEV_ID_82576_QUAD_COPPER:
1867 case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
1867 /* quad port adapters only support WoL on port A */ 1868 /* quad port adapters only support WoL on port A */
1868 if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) { 1869 if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
1869 wol->supported = 0; 1870 wol->supported = 0;
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 8a1f54fb8a3e..c19b1e0caecd 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1594,6 +1594,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1594 adapter->eeprom_wol = 0; 1594 adapter->eeprom_wol = 0;
1595 break; 1595 break;
1596 case E1000_DEV_ID_82576_QUAD_COPPER: 1596 case E1000_DEV_ID_82576_QUAD_COPPER:
1597 case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
1597 /* if quad port adapter, disable WoL on all but port A */ 1598 /* if quad port adapter, disable WoL on all but port A */
1598 if (global_quad_port_a != 0) 1599 if (global_quad_port_a != 0)
1599 adapter->eeprom_wol = 0; 1600 adapter->eeprom_wol = 0;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index ad2267646187..408f3d7b1545 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -1608,9 +1608,12 @@ static void set_rx_mode(struct net_device *dev)
1608{ 1608{
1609 unsigned int ioaddr = dev->base_addr; 1609 unsigned int ioaddr = dev->base_addr;
1610 struct smc_private *smc = netdev_priv(dev); 1610 struct smc_private *smc = netdev_priv(dev);
1611 u_int multicast_table[ 2 ] = { 0, }; 1611 unsigned char multicast_table[8];
1612 unsigned long flags; 1612 unsigned long flags;
1613 u_short rx_cfg_setting; 1613 u_short rx_cfg_setting;
1614 int i;
1615
1616 memset(multicast_table, 0, sizeof(multicast_table));
1614 1617
1615 if (dev->flags & IFF_PROMISC) { 1618 if (dev->flags & IFF_PROMISC) {
1616 rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti; 1619 rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti;
@@ -1622,10 +1625,6 @@ static void set_rx_mode(struct net_device *dev)
1622 1625
1623 netdev_for_each_mc_addr(ha, dev) { 1626 netdev_for_each_mc_addr(ha, dev) {
1624 u_int position = ether_crc(6, ha->addr); 1627 u_int position = ether_crc(6, ha->addr);
1625#ifndef final_version /* Verify multicast address. */
1626 if ((ha->addr[0] & 1) == 0)
1627 continue;
1628#endif
1629 multicast_table[position >> 29] |= 1 << ((position >> 26) & 7); 1628 multicast_table[position >> 29] |= 1 << ((position >> 26) & 7);
1630 } 1629 }
1631 } 1630 }
@@ -1635,8 +1634,8 @@ static void set_rx_mode(struct net_device *dev)
1635 /* Load MC table and Rx setting into the chip without interrupts. */ 1634 /* Load MC table and Rx setting into the chip without interrupts. */
1636 spin_lock_irqsave(&smc->lock, flags); 1635 spin_lock_irqsave(&smc->lock, flags);
1637 SMC_SELECT_BANK(3); 1636 SMC_SELECT_BANK(3);
1638 outl(multicast_table[0], ioaddr + MULTICAST0); 1637 for (i = 0; i < 8; i++)
1639 outl(multicast_table[1], ioaddr + MULTICAST4); 1638 outb(multicast_table[i], ioaddr + MULTICAST0 + i);
1640 SMC_SELECT_BANK(0); 1639 SMC_SELECT_BANK(0);
1641 outw(rx_cfg_setting, ioaddr + RCR); 1640 outw(rx_cfg_setting, ioaddr + RCR);
1642 SMC_SELECT_BANK(2); 1641 SMC_SELECT_BANK(2);
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 96c39bddc78c..43265207d463 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -387,6 +387,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
387 } 387 }
388 } 388 }
389 389
390 /* Orphan the skb - required as we might hang on to it
391 * for indefinite time. */
392 skb_orphan(skb);
393
390 /* Enqueue packet */ 394 /* Enqueue packet */
391 skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb); 395 skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb);
392 dev->trans_start = jiffies; 396 dev->trans_start = jiffies;
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b0a85d038796..73116512ca05 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -329,6 +329,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
329 struct skb_vnet_hdr *hdr; 329 struct skb_vnet_hdr *hdr;
330 int err; 330 int err;
331 331
332 sg_init_table(sg, 2);
332 skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN); 333 skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN);
333 if (unlikely(!skb)) 334 if (unlikely(!skb))
334 return -ENOMEM; 335 return -ENOMEM;
diff --git a/net/can/raw.c b/net/can/raw.c
index 3a7dffb6519c..da99cf153b33 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
445 return -EFAULT; 445 return -EFAULT;
446 } 446 }
447 } else if (count == 1) { 447 } else if (count == 1) {
448 if (copy_from_user(&sfilter, optval, optlen)) 448 if (copy_from_user(&sfilter, optval, sizeof(sfilter)))
449 return -EFAULT; 449 return -EFAULT;
450 } 450 }
451 451