Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Conflicts:
drivers/net/virtio_net.c

+108 -43
+7
Documentation/filesystems/proc.txt
··· 1478 1478 this should be enabled, but if the problem persists the messages can be 1479 1479 disabled. 1480 1480 1481 + netdev_budget 1482 + ------------- 1483 + 1484 + Maximum number of packets taken from all interfaces in one polling cycle (NAPI 1485 + poll). In one polling cycle interfaces which are registered to polling are 1486 + probed in a round-robin manner. The limit of packets in one such probe can be 1487 + set per-device via sysfs class/net/<device>/weight . 1481 1488 1482 1489 netdev_max_backlog 1483 1490 ------------------
+13 -3
drivers/isdn/gigaset/bas-gigaset.c
··· 46 46 /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ 47 47 #define IF_WRITEBUF 264 48 48 49 + /* interrupt pipe message size according to ibid. ch. 2.2 */ 50 + #define IP_MSGSIZE 3 51 + 49 52 /* Values for the Gigaset 307x */ 50 53 #define USB_GIGA_VENDOR_ID 0x0681 51 54 #define USB_3070_PRODUCT_ID 0x0001 ··· 113 110 unsigned char *rcvbuf; /* AT reply receive buffer */ 114 111 115 112 struct urb *urb_int_in; /* URB for interrupt pipe */ 116 - unsigned char int_in_buf[3]; 113 + unsigned char *int_in_buf; 117 114 118 115 spinlock_t lock; /* locks all following */ 119 116 int basstate; /* bitmap (BS_*) */ ··· 660 657 } 661 658 662 659 /* drop incomplete packets even if the missing bytes wouldn't matter */ 663 - if (unlikely(urb->actual_length < 3)) { 660 + if (unlikely(urb->actual_length < IP_MSGSIZE)) { 664 661 dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n", 665 662 urb->actual_length); 666 663 goto resubmit; ··· 2130 2127 static void gigaset_freecshw(struct cardstate *cs) 2131 2128 { 2132 2129 /* timers, URBs and rcvbuf are disposed of in disconnect */ 2130 + kfree(cs->hw.bas->int_in_buf); 2133 2131 kfree(cs->hw.bas); 2134 2132 cs->hw.bas = NULL; 2135 2133 } ··· 2141 2137 2142 2138 cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL); 2143 2139 if (!ucs) { 2140 + pr_err("out of memory\n"); 2141 + return 0; 2142 + } 2143 + ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); 2144 + if (!ucs->int_in_buf) { 2145 + kfree(ucs); 2144 2146 pr_err("out of memory\n"); 2145 2147 return 0; 2146 2148 } ··· 2302 2292 usb_fill_int_urb(ucs->urb_int_in, udev, 2303 2293 usb_rcvintpipe(udev, 2304 2294 (endpoint->bEndpointAddress) & 0x0f), 2305 - ucs->int_in_buf, 3, read_int_callback, cs, 2295 + ucs->int_in_buf, IP_MSGSIZE, read_int_callback, cs, 2306 2296 endpoint->bInterval); 2307 2297 if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) { 2308 2298 dev_err(cs->dev, "could not submit interrupt URB: %s\n",
+6 -6
drivers/net/bnx2.c
··· 57 57 58 58 #define DRV_MODULE_NAME "bnx2" 59 59 #define PFX DRV_MODULE_NAME ": " 60 - #define DRV_MODULE_VERSION "1.9.2" 61 - #define DRV_MODULE_RELDATE "Feb 11, 2009" 60 + #define DRV_MODULE_VERSION "1.9.3" 61 + #define DRV_MODULE_RELDATE "March 17, 2009" 62 62 63 63 #define RUN_AT(x) (jiffies + (x)) 64 64 ··· 5855 5855 for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { 5856 5856 msix_ent[i].entry = i; 5857 5857 msix_ent[i].vector = 0; 5858 - 5859 - snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); 5860 - bp->irq_tbl[i].handler = bnx2_msi_1shot; 5861 5858 } 5862 5859 5863 5860 rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); ··· 5863 5866 5864 5867 bp->irq_nvecs = msix_vecs; 5865 5868 bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; 5866 - for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) 5869 + for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { 5867 5870 bp->irq_tbl[i].vector = msix_ent[i].vector; 5871 + snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); 5872 + bp->irq_tbl[i].handler = bnx2_msi_1shot; 5873 + } 5868 5874 } 5869 5875 5870 5876 static void
+20 -5
drivers/net/bonding/bond_main.c
··· 3545 3545 } 3546 3546 break; 3547 3547 case NETDEV_CHANGE: 3548 - /* 3549 - * TODO: is this what we get if somebody 3550 - * sets up a hierarchical bond, then rmmod's 3551 - * one of the slave bonding devices? 3552 - */ 3548 + if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) { 3549 + struct slave *slave; 3550 + 3551 + slave = bond_get_slave_by_dev(bond, slave_dev); 3552 + if (slave) { 3553 + u16 old_speed = slave->speed; 3554 + u16 old_duplex = slave->duplex; 3555 + 3556 + bond_update_speed_duplex(slave); 3557 + 3558 + if (bond_is_lb(bond)) 3559 + break; 3560 + 3561 + if (old_speed != slave->speed) 3562 + bond_3ad_adapter_speed_changed(slave); 3563 + if (old_duplex != slave->duplex) 3564 + bond_3ad_adapter_duplex_changed(slave); 3565 + } 3566 + } 3567 + 3553 3568 break; 3554 3569 case NETDEV_DOWN: 3555 3570 /*
+17 -3
drivers/net/sh_eth.c
··· 687 687 { 688 688 struct net_device *ndev = netdev; 689 689 struct sh_eth_private *mdp = netdev_priv(ndev); 690 + irqreturn_t ret = IRQ_NONE; 690 691 u32 ioaddr, boguscnt = RX_RING_SIZE; 691 692 u32 intr_status = 0; 692 693 ··· 697 696 /* Get interrpt stat */ 698 697 intr_status = ctrl_inl(ioaddr + EESR); 699 698 /* Clear interrupt */ 700 - ctrl_outl(intr_status, ioaddr + EESR); 699 + if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF | 700 + EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF | 701 + TX_CHECK | EESR_ERR_CHECK)) { 702 + ctrl_outl(intr_status, ioaddr + EESR); 703 + ret = IRQ_HANDLED; 704 + } else 705 + goto other_irq; 701 706 702 707 if (intr_status & (EESR_FRC | /* Frame recv*/ 703 708 EESR_RMAF | /* Multi cast address recv*/ ··· 730 723 ndev->name, intr_status); 731 724 } 732 725 726 + other_irq: 733 727 spin_unlock(&mdp->lock); 734 728 735 - return IRQ_HANDLED; 729 + return ret; 736 730 } 737 731 738 732 static void sh_eth_timer(unsigned long data) ··· 852 844 int ret = 0; 853 845 struct sh_eth_private *mdp = netdev_priv(ndev); 854 846 855 - ret = request_irq(ndev->irq, &sh_eth_interrupt, 0, ndev->name, ndev); 847 + ret = request_irq(ndev->irq, &sh_eth_interrupt, 848 + #if defined(CONFIG_CPU_SUBTYPE_SH7763) || defined(CONFIG_CPU_SUBTYPE_SH7764) 849 + IRQF_SHARED, 850 + #else 851 + 0, 852 + #endif 853 + ndev->name, ndev); 856 854 if (ret) { 857 855 printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); 858 856 return ret;
+2 -2
drivers/net/sh_eth.h
··· 43 43 44 44 #define SH7763_SKB_ALIGN 32 45 45 /* Chip Base Address */ 46 - # define SH_TSU_ADDR 0xFFE01800 47 - # define ARSTR 0xFFE01800 46 + # define SH_TSU_ADDR 0xFEE01800 47 + # define ARSTR SH_TSU_ADDR 48 48 49 49 /* Chip Registers */ 50 50 /* E-DMAC */
+4
drivers/net/smsc911x.c
··· 1225 1225 dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", 1226 1226 (unsigned long)pdata->ioaddr, dev->irq); 1227 1227 1228 + /* Reset the last known duplex and carrier */ 1229 + pdata->last_duplex = -1; 1230 + pdata->last_carrier = -1; 1231 + 1228 1232 /* Bring the PHY up */ 1229 1233 phy_start(pdata->phy_dev); 1230 1234
+29 -16
drivers/net/tulip/tulip_core.c
··· 255 255 256 256 static void tulip_tx_timeout(struct net_device *dev); 257 257 static void tulip_init_ring(struct net_device *dev); 258 + static void tulip_free_ring(struct net_device *dev); 258 259 static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); 259 260 static int tulip_open(struct net_device *dev); 260 261 static int tulip_close(struct net_device *dev); ··· 503 502 { 504 503 int retval; 505 504 506 - if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) 507 - return retval; 508 - 509 505 tulip_init_ring (dev); 506 + 507 + retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev); 508 + if (retval) 509 + goto free_ring; 510 510 511 511 tulip_up (dev); 512 512 513 513 netif_start_queue (dev); 514 514 515 515 return 0; 516 + 517 + free_ring: 518 + tulip_free_ring (dev); 519 + return retval; 516 520 } 517 521 518 522 ··· 774 768 tulip_set_power_state (tp, 0, 1); 775 769 } 776 770 777 - 778 - static int tulip_close (struct net_device *dev) 771 + static void tulip_free_ring (struct net_device *dev) 779 772 { 780 773 struct tulip_private *tp = netdev_priv(dev); 781 - void __iomem *ioaddr = tp->base_addr; 782 774 int i; 783 - 784 - netif_stop_queue (dev); 785 - 786 - tulip_down (dev); 787 - 788 - if (tulip_debug > 1) 789 - printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", 790 - dev->name, ioread32 (ioaddr + CSR5)); 791 - 792 - free_irq (dev->irq, dev); 793 775 794 776 /* Free all the skbuffs in the Rx queue. */ 795 777 for (i = 0; i < RX_RING_SIZE; i++) { ··· 797 803 dev_kfree_skb (skb); 798 804 } 799 805 } 806 + 800 807 for (i = 0; i < TX_RING_SIZE; i++) { 801 808 struct sk_buff *skb = tp->tx_buffers[i].skb; 802 809 ··· 809 814 tp->tx_buffers[i].skb = NULL; 810 815 tp->tx_buffers[i].mapping = 0; 811 816 } 817 + } 818 + 819 + static int tulip_close (struct net_device *dev) 820 + { 821 + struct tulip_private *tp = netdev_priv(dev); 822 + void __iomem *ioaddr = tp->base_addr; 823 + 824 + netif_stop_queue (dev); 825 + 826 + tulip_down (dev); 827 + 828 + if (tulip_debug > 1) 829 + printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", 830 + dev->name, ioread32 (ioaddr + CSR5)); 831 + 832 + free_irq (dev->irq, dev); 833 + 834 + tulip_free_ring (dev); 812 835 813 836 return 0; 814 837 }
+1
drivers/net/virtio_net.c
··· 953 953 954 954 vi->status = VIRTIO_NET_S_LINK_UP; 955 955 virtnet_update_status(vi); 956 + netif_carrier_on(dev); 956 957 957 958 pr_debug("virtnet: registered device %s\n", dev->name); 958 959 return 0;
+1 -1
net/core/dev.c
··· 2712 2712 struct sk_buff *skb, *next; 2713 2713 2714 2714 list_del_init(&napi->dev_list); 2715 - kfree(napi->skb); 2715 + kfree_skb(napi->skb); 2716 2716 2717 2717 for (skb = napi->gro_list; skb; skb = next) { 2718 2718 next = skb->next;
+2 -1
net/ipv4/ip_fragment.c
··· 463 463 static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, 464 464 struct net_device *dev) 465 465 { 466 + struct net *net = container_of(qp->q.net, struct net, ipv4.frags); 466 467 struct iphdr *iph; 467 468 struct sk_buff *fp, *head = qp->q.fragments; 468 469 int len; ··· 549 548 iph = ip_hdr(head); 550 549 iph->frag_off = 0; 551 550 iph->tot_len = htons(len); 552 - IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMOKS); 551 + IP_INC_STATS_BH(net, IPSTATS_MIB_REASMOKS); 553 552 qp->q.fragments = NULL; 554 553 return 0; 555 554
+3 -4
net/ipv6/reassembly.c
··· 452 452 static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, 453 453 struct net_device *dev) 454 454 { 455 + struct net *net = container_of(fq->q.net, struct net, ipv6.frags); 455 456 struct sk_buff *fp, *head = fq->q.fragments; 456 457 int payload_len; 457 458 unsigned int nhoff; ··· 552 551 head->csum); 553 552 554 553 rcu_read_lock(); 555 - IP6_INC_STATS_BH(dev_net(dev), 556 - __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); 554 + IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); 557 555 rcu_read_unlock(); 558 556 fq->q.fragments = NULL; 559 557 return 1; ··· 566 566 printk(KERN_DEBUG "ip6_frag_reasm: no memory for reassembly\n"); 567 567 out_fail: 568 568 rcu_read_lock(); 569 - IP6_INC_STATS_BH(dev_net(dev), 570 - __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); 569 + IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); 571 570 rcu_read_unlock(); 572 571 return -1; 573 572 }
+1 -1
net/ipv6/sit.c
··· 188 188 } 189 189 190 190 nt = netdev_priv(dev); 191 - ipip6_tunnel_init(dev); 192 191 193 192 nt->parms = *parms; 193 + ipip6_tunnel_init(dev); 194 194 195 195 if (parms->i_flags & SIT_ISATAP) 196 196 dev->priv_flags |= IFF_ISATAP;
+2 -1
net/sctp/endpointola.c
··· 111 111 if (sctp_addip_enable) { 112 112 auth_chunks->chunks[0] = SCTP_CID_ASCONF; 113 113 auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK; 114 - auth_chunks->param_hdr.length += htons(2); 114 + auth_chunks->param_hdr.length = 115 + htons(sizeof(sctp_paramhdr_t) + 2); 115 116 } 116 117 } 117 118