Commit dad1e54b authored by David S. Miller's avatar David S. Miller

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
	drivers/net/pcmcia/smc91c92_cs.c
	drivers/net/virtio_net.c
parents 1253332f 0110d6f2
...@@ -664,6 +664,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter) ...@@ -664,6 +664,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
i = 0; i = 0;
} }
if (i == tx_ring->next_to_use)
break;
eop = tx_ring->buffer_info[i].next_to_watch; eop = tx_ring->buffer_info[i].next_to_watch;
eop_desc = E1000_TX_DESC(*tx_ring, eop); eop_desc = E1000_TX_DESC(*tx_ring, eop);
} }
......
...@@ -5901,7 +5901,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i ...@@ -5901,7 +5901,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
/* Limit the number of tx's outstanding for hw bug */ /* Limit the number of tx's outstanding for hw bug */
if (id->driver_data & DEV_NEED_TX_LIMIT) { if (id->driver_data & DEV_NEED_TX_LIMIT) {
np->tx_limit = 1; np->tx_limit = 1;
if ((id->driver_data & DEV_NEED_TX_LIMIT2) && if (((id->driver_data & DEV_NEED_TX_LIMIT2) == DEV_NEED_TX_LIMIT2) &&
pci_dev->revision >= 0xA2) pci_dev->revision >= 0xA2)
np->tx_limit = 0; np->tx_limit = 0;
} }
......
...@@ -1864,6 +1864,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter, ...@@ -1864,6 +1864,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
retval = 0; retval = 0;
break; break;
case E1000_DEV_ID_82576_QUAD_COPPER: case E1000_DEV_ID_82576_QUAD_COPPER:
case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
/* quad port adapters only support WoL on port A */ /* quad port adapters only support WoL on port A */
if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) { if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
wol->supported = 0; wol->supported = 0;
......
...@@ -1594,6 +1594,7 @@ static int __devinit igb_probe(struct pci_dev *pdev, ...@@ -1594,6 +1594,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
adapter->eeprom_wol = 0; adapter->eeprom_wol = 0;
break; break;
case E1000_DEV_ID_82576_QUAD_COPPER: case E1000_DEV_ID_82576_QUAD_COPPER:
case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
/* if quad port adapter, disable WoL on all but port A */ /* if quad port adapter, disable WoL on all but port A */
if (global_quad_port_a != 0) if (global_quad_port_a != 0)
adapter->eeprom_wol = 0; adapter->eeprom_wol = 0;
......
...@@ -1608,9 +1608,12 @@ static void set_rx_mode(struct net_device *dev) ...@@ -1608,9 +1608,12 @@ static void set_rx_mode(struct net_device *dev)
{ {
unsigned int ioaddr = dev->base_addr; unsigned int ioaddr = dev->base_addr;
struct smc_private *smc = netdev_priv(dev); struct smc_private *smc = netdev_priv(dev);
u_int multicast_table[ 2 ] = { 0, }; unsigned char multicast_table[8];
unsigned long flags; unsigned long flags;
u_short rx_cfg_setting; u_short rx_cfg_setting;
int i;
memset(multicast_table, 0, sizeof(multicast_table));
if (dev->flags & IFF_PROMISC) { if (dev->flags & IFF_PROMISC) {
rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti; rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti;
...@@ -1622,10 +1625,6 @@ static void set_rx_mode(struct net_device *dev) ...@@ -1622,10 +1625,6 @@ static void set_rx_mode(struct net_device *dev)
netdev_for_each_mc_addr(ha, dev) { netdev_for_each_mc_addr(ha, dev) {
u_int position = ether_crc(6, ha->addr); u_int position = ether_crc(6, ha->addr);
#ifndef final_version /* Verify multicast address. */
if ((ha->addr[0] & 1) == 0)
continue;
#endif
multicast_table[position >> 29] |= 1 << ((position >> 26) & 7); multicast_table[position >> 29] |= 1 << ((position >> 26) & 7);
} }
} }
...@@ -1635,8 +1634,8 @@ static void set_rx_mode(struct net_device *dev) ...@@ -1635,8 +1634,8 @@ static void set_rx_mode(struct net_device *dev)
/* Load MC table and Rx setting into the chip without interrupts. */ /* Load MC table and Rx setting into the chip without interrupts. */
spin_lock_irqsave(&smc->lock, flags); spin_lock_irqsave(&smc->lock, flags);
SMC_SELECT_BANK(3); SMC_SELECT_BANK(3);
outl(multicast_table[0], ioaddr + MULTICAST0); for (i = 0; i < 8; i++)
outl(multicast_table[1], ioaddr + MULTICAST4); outb(multicast_table[i], ioaddr + MULTICAST0 + i);
SMC_SELECT_BANK(0); SMC_SELECT_BANK(0);
outw(rx_cfg_setting, ioaddr + RCR); outw(rx_cfg_setting, ioaddr + RCR);
SMC_SELECT_BANK(2); SMC_SELECT_BANK(2);
......
...@@ -387,6 +387,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -387,6 +387,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
} }
} }
/* Orphan the skb - required as we might hang on to it
* for indefinite time. */
skb_orphan(skb);
/* Enqueue packet */ /* Enqueue packet */
skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb); skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb);
dev->trans_start = jiffies; dev->trans_start = jiffies;
......
...@@ -329,6 +329,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp) ...@@ -329,6 +329,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
struct skb_vnet_hdr *hdr; struct skb_vnet_hdr *hdr;
int err; int err;
sg_init_table(sg, 2);
skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN); skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN);
if (unlikely(!skb)) if (unlikely(!skb))
return -ENOMEM; return -ENOMEM;
......
...@@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname, ...@@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
return -EFAULT; return -EFAULT;
} }
} else if (count == 1) { } else if (count == 1) {
if (copy_from_user(&sfilter, optval, optlen)) if (copy_from_user(&sfilter, optval, sizeof(sfilter)))
return -EFAULT; return -EFAULT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment