Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5eab915 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
  tg3: Remove 5719 jumbo frames and TSO blocks
  tg3: Break larger frags into 4k chunks for 5719
  tg3: Add tx BD budgeting code
  tg3: Consolidate code that calls tg3_tx_set_bd()
  tg3: Add partial fragment unmapping code
  tg3: Generalize tg3_skb_error_unmap()
  tg3: Remove short DMA check for 1st fragment
  tg3: Simplify tx bd assignments
  tg3: Reintroduce tg3_tx_ring_info
  ASIX: Use only 11 bits of header for data size
  ASIX: Simplify condition in rx_fixup()
  Fix cdc-phonet build
  bonding: reduce noise during init
  bonding: fix string comparison errors
  net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
  net: add IFF_SKB_TX_SHARED flag to priv_flags
  net: sock_sendmsg_nosec() is static
  forcedeth: fix vlans
  gianfar: fix bug caused by 87c288c6
  gro: Only reset frag0 when skb can be pulled
  ...
parents 6140333d a0512944
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2532,6 +2532,9 @@ static void _isdn_setup(struct net_device *dev)


	/* Setup the generic properties */
	/* Setup the generic properties */
	dev->flags = IFF_NOARP|IFF_POINTOPOINT;
	dev->flags = IFF_NOARP|IFF_POINTOPOINT;

	/* isdn prepends a header in the tx path, can't share skbs */
	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
	dev->header_ops = NULL;
	dev->header_ops = NULL;
	dev->netdev_ops = &isdn_netdev_ops;
	dev->netdev_ops = &isdn_netdev_ops;


+1 −0
Original line number Original line Diff line number Diff line
@@ -282,6 +282,7 @@ obj-$(CONFIG_USB_HSO) += usb/
obj-$(CONFIG_USB_USBNET)        += usb/
obj-$(CONFIG_USB_USBNET)        += usb/
obj-$(CONFIG_USB_ZD1201)        += usb/
obj-$(CONFIG_USB_ZD1201)        += usb/
obj-$(CONFIG_USB_IPHETH)        += usb/
obj-$(CONFIG_USB_IPHETH)        += usb/
obj-$(CONFIG_USB_CDC_PHONET)   += usb/


obj-$(CONFIG_WLAN) += wireless/
obj-$(CONFIG_WLAN) += wireless/
obj-$(CONFIG_NET_TULIP) += tulip/
obj-$(CONFIG_NET_TULIP) += tulip/
+24 −21
Original line number Original line Diff line number Diff line
@@ -1502,13 +1502,13 @@ static int __devinit ace_init(struct net_device *dev)
	 * firmware to wipe the ring without re-initializing it.
	 * firmware to wipe the ring without re-initializing it.
	 */
	 */
	if (!test_and_set_bit(0, &ap->std_refill_busy))
	if (!test_and_set_bit(0, &ap->std_refill_busy))
		ace_load_std_rx_ring(ap, RX_RING_SIZE);
		ace_load_std_rx_ring(dev, RX_RING_SIZE);
	else
	else
		printk(KERN_ERR "%s: Someone is busy refilling the RX ring\n",
		printk(KERN_ERR "%s: Someone is busy refilling the RX ring\n",
		       ap->name);
		       ap->name);
	if (ap->version >= 2) {
	if (ap->version >= 2) {
		if (!test_and_set_bit(0, &ap->mini_refill_busy))
		if (!test_and_set_bit(0, &ap->mini_refill_busy))
			ace_load_mini_rx_ring(ap, RX_MINI_SIZE);
			ace_load_mini_rx_ring(dev, RX_MINI_SIZE);
		else
		else
			printk(KERN_ERR "%s: Someone is busy refilling "
			printk(KERN_ERR "%s: Someone is busy refilling "
			       "the RX mini ring\n", ap->name);
			       "the RX mini ring\n", ap->name);
@@ -1584,9 +1584,10 @@ static void ace_watchdog(struct net_device *data)
}
}




static void ace_tasklet(unsigned long dev)
static void ace_tasklet(unsigned long arg)
{
{
	struct ace_private *ap = netdev_priv((struct net_device *)dev);
	struct net_device *dev = (struct net_device *) arg;
	struct ace_private *ap = netdev_priv(dev);
	int cur_size;
	int cur_size;


	cur_size = atomic_read(&ap->cur_rx_bufs);
	cur_size = atomic_read(&ap->cur_rx_bufs);
@@ -1595,7 +1596,7 @@ static void ace_tasklet(unsigned long dev)
#ifdef DEBUG
#ifdef DEBUG
		printk("refilling buffers (current %i)\n", cur_size);
		printk("refilling buffers (current %i)\n", cur_size);
#endif
#endif
		ace_load_std_rx_ring(ap, RX_RING_SIZE - cur_size);
		ace_load_std_rx_ring(dev, RX_RING_SIZE - cur_size);
	}
	}


	if (ap->version >= 2) {
	if (ap->version >= 2) {
@@ -1606,7 +1607,7 @@ static void ace_tasklet(unsigned long dev)
			printk("refilling mini buffers (current %i)\n",
			printk("refilling mini buffers (current %i)\n",
			       cur_size);
			       cur_size);
#endif
#endif
			ace_load_mini_rx_ring(ap, RX_MINI_SIZE - cur_size);
			ace_load_mini_rx_ring(dev, RX_MINI_SIZE - cur_size);
		}
		}
	}
	}


@@ -1616,7 +1617,7 @@ static void ace_tasklet(unsigned long dev)
#ifdef DEBUG
#ifdef DEBUG
		printk("refilling jumbo buffers (current %i)\n", cur_size);
		printk("refilling jumbo buffers (current %i)\n", cur_size);
#endif
#endif
		ace_load_jumbo_rx_ring(ap, RX_JUMBO_SIZE - cur_size);
		ace_load_jumbo_rx_ring(dev, RX_JUMBO_SIZE - cur_size);
	}
	}
	ap->tasklet_pending = 0;
	ap->tasklet_pending = 0;
}
}
@@ -1642,8 +1643,9 @@ static void ace_dump_trace(struct ace_private *ap)
 * done only before the device is enabled, thus no interrupts are
 * done only before the device is enabled, thus no interrupts are
 * generated and by the interrupt handler/tasklet handler.
 * generated and by the interrupt handler/tasklet handler.
 */
 */
static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
static void ace_load_std_rx_ring(struct net_device *dev, int nr_bufs)
{
{
	struct ace_private *ap = netdev_priv(dev);
	struct ace_regs __iomem *regs = ap->regs;
	struct ace_regs __iomem *regs = ap->regs;
	short i, idx;
	short i, idx;


@@ -1657,11 +1659,10 @@ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
		struct rx_desc *rd;
		struct rx_desc *rd;
		dma_addr_t mapping;
		dma_addr_t mapping;


		skb = dev_alloc_skb(ACE_STD_BUFSIZE + NET_IP_ALIGN);
		skb = netdev_alloc_skb_ip_align(dev, ACE_STD_BUFSIZE);
		if (!skb)
		if (!skb)
			break;
			break;


		skb_reserve(skb, NET_IP_ALIGN);
		mapping = pci_map_page(ap->pdev, virt_to_page(skb->data),
		mapping = pci_map_page(ap->pdev, virt_to_page(skb->data),
				       offset_in_page(skb->data),
				       offset_in_page(skb->data),
				       ACE_STD_BUFSIZE,
				       ACE_STD_BUFSIZE,
@@ -1705,8 +1706,9 @@ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs)
}
}




static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs)
static void ace_load_mini_rx_ring(struct net_device *dev, int nr_bufs)
{
{
	struct ace_private *ap = netdev_priv(dev);
	struct ace_regs __iomem *regs = ap->regs;
	struct ace_regs __iomem *regs = ap->regs;
	short i, idx;
	short i, idx;


@@ -1718,11 +1720,10 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs)
		struct rx_desc *rd;
		struct rx_desc *rd;
		dma_addr_t mapping;
		dma_addr_t mapping;


		skb = dev_alloc_skb(ACE_MINI_BUFSIZE + NET_IP_ALIGN);
		skb = netdev_alloc_skb_ip_align(dev, ACE_MINI_BUFSIZE);
		if (!skb)
		if (!skb)
			break;
			break;


		skb_reserve(skb, NET_IP_ALIGN);
		mapping = pci_map_page(ap->pdev, virt_to_page(skb->data),
		mapping = pci_map_page(ap->pdev, virt_to_page(skb->data),
				       offset_in_page(skb->data),
				       offset_in_page(skb->data),
				       ACE_MINI_BUFSIZE,
				       ACE_MINI_BUFSIZE,
@@ -1762,8 +1763,9 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs)
 * Load the jumbo rx ring, this may happen at any time if the MTU
 * Load the jumbo rx ring, this may happen at any time if the MTU
 * is changed to a value > 1500.
 * is changed to a value > 1500.
 */
 */
static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs)
static void ace_load_jumbo_rx_ring(struct net_device *dev, int nr_bufs)
{
{
	struct ace_private *ap = netdev_priv(dev);
	struct ace_regs __iomem *regs = ap->regs;
	struct ace_regs __iomem *regs = ap->regs;
	short i, idx;
	short i, idx;


@@ -1774,11 +1776,10 @@ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs)
		struct rx_desc *rd;
		struct rx_desc *rd;
		dma_addr_t mapping;
		dma_addr_t mapping;


		skb = dev_alloc_skb(ACE_JUMBO_BUFSIZE + NET_IP_ALIGN);
		skb = netdev_alloc_skb_ip_align(dev, ACE_JUMBO_BUFSIZE);
		if (!skb)
		if (!skb)
			break;
			break;


		skb_reserve(skb, NET_IP_ALIGN);
		mapping = pci_map_page(ap->pdev, virt_to_page(skb->data),
		mapping = pci_map_page(ap->pdev, virt_to_page(skb->data),
				       offset_in_page(skb->data),
				       offset_in_page(skb->data),
				       ACE_JUMBO_BUFSIZE,
				       ACE_JUMBO_BUFSIZE,
@@ -2196,7 +2197,7 @@ static irqreturn_t ace_interrupt(int irq, void *dev_id)
#ifdef DEBUG
#ifdef DEBUG
				printk("low on std buffers %i\n", cur_size);
				printk("low on std buffers %i\n", cur_size);
#endif
#endif
				ace_load_std_rx_ring(ap,
				ace_load_std_rx_ring(dev,
						     RX_RING_SIZE - cur_size);
						     RX_RING_SIZE - cur_size);
			} else
			} else
				run_tasklet = 1;
				run_tasklet = 1;
@@ -2212,7 +2213,8 @@ static irqreturn_t ace_interrupt(int irq, void *dev_id)
					printk("low on mini buffers %i\n",
					printk("low on mini buffers %i\n",
					       cur_size);
					       cur_size);
#endif
#endif
					ace_load_mini_rx_ring(ap, RX_MINI_SIZE - cur_size);
					ace_load_mini_rx_ring(dev,
							      RX_MINI_SIZE - cur_size);
				} else
				} else
					run_tasklet = 1;
					run_tasklet = 1;
			}
			}
@@ -2228,7 +2230,8 @@ static irqreturn_t ace_interrupt(int irq, void *dev_id)
					printk("low on jumbo buffers %i\n",
					printk("low on jumbo buffers %i\n",
					       cur_size);
					       cur_size);
#endif
#endif
					ace_load_jumbo_rx_ring(ap, RX_JUMBO_SIZE - cur_size);
					ace_load_jumbo_rx_ring(dev,
							       RX_JUMBO_SIZE - cur_size);
				} else
				} else
					run_tasklet = 1;
					run_tasklet = 1;
			}
			}
@@ -2267,7 +2270,7 @@ static int ace_open(struct net_device *dev)


	if (ap->jumbo &&
	if (ap->jumbo &&
	    !test_and_set_bit(0, &ap->jumbo_refill_busy))
	    !test_and_set_bit(0, &ap->jumbo_refill_busy))
		ace_load_jumbo_rx_ring(ap, RX_JUMBO_SIZE);
		ace_load_jumbo_rx_ring(dev, RX_JUMBO_SIZE);


	if (dev->flags & IFF_PROMISC) {
	if (dev->flags & IFF_PROMISC) {
		cmd.evt = C_SET_PROMISC_MODE;
		cmd.evt = C_SET_PROMISC_MODE;
@@ -2575,7 +2578,7 @@ static int ace_change_mtu(struct net_device *dev, int new_mtu)
			       "support\n", dev->name);
			       "support\n", dev->name);
			ap->jumbo = 1;
			ap->jumbo = 1;
			if (!test_and_set_bit(0, &ap->jumbo_refill_busy))
			if (!test_and_set_bit(0, &ap->jumbo_refill_busy))
				ace_load_jumbo_rx_ring(ap, RX_JUMBO_SIZE);
				ace_load_jumbo_rx_ring(dev, RX_JUMBO_SIZE);
			ace_set_rxtx_parms(dev, 1);
			ace_set_rxtx_parms(dev, 1);
		}
		}
	} else {
	} else {
+3 −3
Original line number Original line Diff line number Diff line
@@ -766,9 +766,9 @@ static inline void ace_unmask_irq(struct net_device *dev)
 * Prototypes
 * Prototypes
 */
 */
static int ace_init(struct net_device *dev);
static int ace_init(struct net_device *dev);
static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs);
static void ace_load_std_rx_ring(struct net_device *dev, int nr_bufs);
static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs);
static void ace_load_mini_rx_ring(struct net_device *dev, int nr_bufs);
static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs);
static void ace_load_jumbo_rx_ring(struct net_device *dev, int nr_bufs);
static irqreturn_t ace_interrupt(int irq, void *dev_id);
static irqreturn_t ace_interrupt(int irq, void *dev_id);
static int ace_load_firmware(struct net_device *dev);
static int ace_load_firmware(struct net_device *dev);
static int ace_open(struct net_device *dev);
static int ace_open(struct net_device *dev);
+5 −3
Original line number Original line Diff line number Diff line
@@ -1557,8 +1557,10 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)


			if (slave_dev->type != ARPHRD_ETHER)
			if (slave_dev->type != ARPHRD_ETHER)
				bond_setup_by_slave(bond_dev, slave_dev);
				bond_setup_by_slave(bond_dev, slave_dev);
			else
			else {
				ether_setup(bond_dev);
				ether_setup(bond_dev);
				bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
			}


			netdev_bonding_change(bond_dev,
			netdev_bonding_change(bond_dev,
					      NETDEV_POST_TYPE_CHANGE);
					      NETDEV_POST_TYPE_CHANGE);
@@ -4330,7 +4332,7 @@ static void bond_setup(struct net_device *bond_dev)
	bond_dev->tx_queue_len = 0;
	bond_dev->tx_queue_len = 0;
	bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
	bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
	bond_dev->priv_flags |= IFF_BONDING;
	bond_dev->priv_flags |= IFF_BONDING;
	bond_dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
	bond_dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);


	/* At first, we block adding VLANs. That's the only way to
	/* At first, we block adding VLANs. That's the only way to
	 * prevent problems that occur when adding VLANs over an
	 * prevent problems that occur when adding VLANs over an
@@ -4691,7 +4693,7 @@ static int bond_check_params(struct bond_params *params)
		/* miimon and arp_interval not set, we need one so things
		/* miimon and arp_interval not set, we need one so things
		 * work as expected, see bonding.txt for details
		 * work as expected, see bonding.txt for details
		 */
		 */
		pr_warning("Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.\n");
		pr_debug("Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.\n");
	}
	}


	if (primary && !USES_PRIMARY(bond_mode)) {
	if (primary && !USES_PRIMARY(bond_mode)) {
Loading