mirror of https://gitee.com/openkylin/linux.git
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
This commit is contained in:
commit
dad1e54b12
|
@ -664,6 +664,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
|
|||
i = 0;
|
||||
}
|
||||
|
||||
if (i == tx_ring->next_to_use)
|
||||
break;
|
||||
eop = tx_ring->buffer_info[i].next_to_watch;
|
||||
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
|
|||
/* Limit the number of tx's outstanding for hw bug */
|
||||
if (id->driver_data & DEV_NEED_TX_LIMIT) {
|
||||
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)
|
||||
np->tx_limit = 0;
|
||||
}
|
||||
|
|
|
@ -1864,6 +1864,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter,
|
|||
retval = 0;
|
||||
break;
|
||||
case E1000_DEV_ID_82576_QUAD_COPPER:
|
||||
case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
|
||||
/* quad port adapters only support WoL on port A */
|
||||
if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
|
||||
wol->supported = 0;
|
||||
|
|
|
@ -1594,6 +1594,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
|
|||
adapter->eeprom_wol = 0;
|
||||
break;
|
||||
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 (global_quad_port_a != 0)
|
||||
adapter->eeprom_wol = 0;
|
||||
|
|
|
@ -1608,9 +1608,12 @@ static void set_rx_mode(struct net_device *dev)
|
|||
{
|
||||
unsigned int ioaddr = dev->base_addr;
|
||||
struct smc_private *smc = netdev_priv(dev);
|
||||
u_int multicast_table[ 2 ] = { 0, };
|
||||
unsigned char multicast_table[8];
|
||||
unsigned long flags;
|
||||
u_short rx_cfg_setting;
|
||||
int i;
|
||||
|
||||
memset(multicast_table, 0, sizeof(multicast_table));
|
||||
|
||||
if (dev->flags & IFF_PROMISC) {
|
||||
rx_cfg_setting = RxStripCRC | RxEnable | RxPromisc | RxAllMulti;
|
||||
|
@ -1622,10 +1625,6 @@ static void set_rx_mode(struct net_device *dev)
|
|||
|
||||
netdev_for_each_mc_addr(ha, dev) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -1635,8 +1634,8 @@ static void set_rx_mode(struct net_device *dev)
|
|||
/* Load MC table and Rx setting into the chip without interrupts. */
|
||||
spin_lock_irqsave(&smc->lock, flags);
|
||||
SMC_SELECT_BANK(3);
|
||||
outl(multicast_table[0], ioaddr + MULTICAST0);
|
||||
outl(multicast_table[1], ioaddr + MULTICAST4);
|
||||
for (i = 0; i < 8; i++)
|
||||
outb(multicast_table[i], ioaddr + MULTICAST0 + i);
|
||||
SMC_SELECT_BANK(0);
|
||||
outw(rx_cfg_setting, ioaddr + RCR);
|
||||
SMC_SELECT_BANK(2);
|
||||
|
|
|
@ -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 */
|
||||
skb_queue_tail(&tun->socket.sk->sk_receive_queue, skb);
|
||||
dev->trans_start = jiffies;
|
||||
|
|
|
@ -329,6 +329,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
|
|||
struct skb_vnet_hdr *hdr;
|
||||
int err;
|
||||
|
||||
sg_init_table(sg, 2);
|
||||
skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN);
|
||||
if (unlikely(!skb))
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
|
|||
return -EFAULT;
|
||||
}
|
||||
} else if (count == 1) {
|
||||
if (copy_from_user(&sfilter, optval, optlen))
|
||||
if (copy_from_user(&sfilter, optval, sizeof(sfilter)))
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue