diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-20 05:27:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-20 05:27:41 -0400 |
commit | 2b1c4354de72ced917d2f3fe88117613f992234b (patch) | |
tree | 3e7643cad45d94e3c331366418532043bd4fa5a9 | |
parent | 5e140dfc1fe87eae27846f193086724806b33c7d (diff) | |
parent | 170ebf85160dd128e1c4206cc197cce7d1424705 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/virtio_net.c
-rw-r--r-- | Documentation/filesystems/proc.txt | 7 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 16 | ||||
-rw-r--r-- | drivers/net/bnx2.c | 12 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 25 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 20 | ||||
-rw-r--r-- | drivers/net/sh_eth.h | 4 | ||||
-rw-r--r-- | drivers/net/smsc911x.c | 4 | ||||
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 45 | ||||
-rw-r--r-- | drivers/net/virtio_net.c | 1 | ||||
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_fragment.c | 3 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 7 | ||||
-rw-r--r-- | net/ipv6/sit.c | 2 | ||||
-rw-r--r-- | net/sctp/endpointola.c | 3 |
14 files changed, 108 insertions, 43 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a87be42f8211..830bad7cce0f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1478,6 +1478,13 @@ of problems on the network like duplicate address or bad checksums. Normally, | |||
1478 | this should be enabled, but if the problem persists the messages can be | 1478 | this should be enabled, but if the problem persists the messages can be |
1479 | disabled. | 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 | netdev_max_backlog | 1489 | netdev_max_backlog |
1483 | ------------------ | 1490 | ------------------ |
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 18dd8aacbe8d..831ddce1467b 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -46,6 +46,9 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); | |||
46 | /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ | 46 | /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ |
47 | #define IF_WRITEBUF 264 | 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 | /* Values for the Gigaset 307x */ | 52 | /* Values for the Gigaset 307x */ |
50 | #define USB_GIGA_VENDOR_ID 0x0681 | 53 | #define USB_GIGA_VENDOR_ID 0x0681 |
51 | #define USB_3070_PRODUCT_ID 0x0001 | 54 | #define USB_3070_PRODUCT_ID 0x0001 |
@@ -110,7 +113,7 @@ struct bas_cardstate { | |||
110 | unsigned char *rcvbuf; /* AT reply receive buffer */ | 113 | unsigned char *rcvbuf; /* AT reply receive buffer */ |
111 | 114 | ||
112 | struct urb *urb_int_in; /* URB for interrupt pipe */ | 115 | struct urb *urb_int_in; /* URB for interrupt pipe */ |
113 | unsigned char int_in_buf[3]; | 116 | unsigned char *int_in_buf; |
114 | 117 | ||
115 | spinlock_t lock; /* locks all following */ | 118 | spinlock_t lock; /* locks all following */ |
116 | int basstate; /* bitmap (BS_*) */ | 119 | int basstate; /* bitmap (BS_*) */ |
@@ -657,7 +660,7 @@ static void read_int_callback(struct urb *urb) | |||
657 | } | 660 | } |
658 | 661 | ||
659 | /* drop incomplete packets even if the missing bytes wouldn't matter */ | 662 | /* drop incomplete packets even if the missing bytes wouldn't matter */ |
660 | if (unlikely(urb->actual_length < 3)) { | 663 | if (unlikely(urb->actual_length < IP_MSGSIZE)) { |
661 | dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n", | 664 | dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n", |
662 | urb->actual_length); | 665 | urb->actual_length); |
663 | goto resubmit; | 666 | goto resubmit; |
@@ -2127,6 +2130,7 @@ static void gigaset_reinitbcshw(struct bc_state *bcs) | |||
2127 | static void gigaset_freecshw(struct cardstate *cs) | 2130 | static void gigaset_freecshw(struct cardstate *cs) |
2128 | { | 2131 | { |
2129 | /* timers, URBs and rcvbuf are disposed of in disconnect */ | 2132 | /* timers, URBs and rcvbuf are disposed of in disconnect */ |
2133 | kfree(cs->hw.bas->int_in_buf); | ||
2130 | kfree(cs->hw.bas); | 2134 | kfree(cs->hw.bas); |
2131 | cs->hw.bas = NULL; | 2135 | cs->hw.bas = NULL; |
2132 | } | 2136 | } |
@@ -2140,6 +2144,12 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
2140 | pr_err("out of memory\n"); | 2144 | pr_err("out of memory\n"); |
2141 | return 0; | 2145 | return 0; |
2142 | } | 2146 | } |
2147 | ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); | ||
2148 | if (!ucs->int_in_buf) { | ||
2149 | kfree(ucs); | ||
2150 | pr_err("out of memory\n"); | ||
2151 | return 0; | ||
2152 | } | ||
2143 | 2153 | ||
2144 | ucs->urb_cmd_in = NULL; | 2154 | ucs->urb_cmd_in = NULL; |
2145 | ucs->urb_cmd_out = NULL; | 2155 | ucs->urb_cmd_out = NULL; |
@@ -2292,7 +2302,7 @@ static int gigaset_probe(struct usb_interface *interface, | |||
2292 | usb_fill_int_urb(ucs->urb_int_in, udev, | 2302 | usb_fill_int_urb(ucs->urb_int_in, udev, |
2293 | usb_rcvintpipe(udev, | 2303 | usb_rcvintpipe(udev, |
2294 | (endpoint->bEndpointAddress) & 0x0f), | 2304 | (endpoint->bEndpointAddress) & 0x0f), |
2295 | ucs->int_in_buf, 3, read_int_callback, cs, | 2305 | ucs->int_in_buf, IP_MSGSIZE, read_int_callback, cs, |
2296 | endpoint->bInterval); | 2306 | endpoint->bInterval); |
2297 | if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) { | 2307 | if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) { |
2298 | dev_err(cs->dev, "could not submit interrupt URB: %s\n", | 2308 | dev_err(cs->dev, "could not submit interrupt URB: %s\n", |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 8466d351a703..ad446db8e186 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.9.2" | 60 | #define DRV_MODULE_VERSION "1.9.3" |
61 | #define DRV_MODULE_RELDATE "Feb 11, 2009" | 61 | #define DRV_MODULE_RELDATE "March 17, 2009" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -5855,9 +5855,6 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
5855 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { | 5855 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { |
5856 | msix_ent[i].entry = i; | 5856 | msix_ent[i].entry = i; |
5857 | msix_ent[i].vector = 0; | 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 | rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); | 5860 | rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); |
@@ -5866,8 +5863,11 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
5866 | 5863 | ||
5867 | bp->irq_nvecs = msix_vecs; | 5864 | bp->irq_nvecs = msix_vecs; |
5868 | bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; | 5865 | bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; |
5869 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) | 5866 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { |
5870 | bp->irq_tbl[i].vector = msix_ent[i].vector; | 5867 | bp->irq_tbl[i].vector = msix_ent[i].vector; |
5868 | snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); | ||
5869 | bp->irq_tbl[i].handler = bnx2_msi_1shot; | ||
5870 | } | ||
5871 | } | 5871 | } |
5872 | 5872 | ||
5873 | static void | 5873 | static void |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index bfe1ed8389ca..dce3cf92c613 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3545,11 +3545,26 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave | |||
3545 | } | 3545 | } |
3546 | break; | 3546 | break; |
3547 | case NETDEV_CHANGE: | 3547 | case NETDEV_CHANGE: |
3548 | /* | 3548 | if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) { |
3549 | * TODO: is this what we get if somebody | 3549 | struct slave *slave; |
3550 | * sets up a hierarchical bond, then rmmod's | 3550 | |
3551 | * one of the slave bonding devices? | 3551 | slave = bond_get_slave_by_dev(bond, slave_dev); |
3552 | */ | 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 | break; | 3568 | break; |
3554 | case NETDEV_DOWN: | 3569 | case NETDEV_DOWN: |
3555 | /* | 3570 | /* |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 7f8e514eb5e9..7b1882765a0c 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -687,6 +687,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
687 | { | 687 | { |
688 | struct net_device *ndev = netdev; | 688 | struct net_device *ndev = netdev; |
689 | struct sh_eth_private *mdp = netdev_priv(ndev); | 689 | struct sh_eth_private *mdp = netdev_priv(ndev); |
690 | irqreturn_t ret = IRQ_NONE; | ||
690 | u32 ioaddr, boguscnt = RX_RING_SIZE; | 691 | u32 ioaddr, boguscnt = RX_RING_SIZE; |
691 | u32 intr_status = 0; | 692 | u32 intr_status = 0; |
692 | 693 | ||
@@ -696,7 +697,13 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
696 | /* Get interrpt stat */ | 697 | /* Get interrpt stat */ |
697 | intr_status = ctrl_inl(ioaddr + EESR); | 698 | intr_status = ctrl_inl(ioaddr + EESR); |
698 | /* Clear interrupt */ | 699 | /* Clear interrupt */ |
699 | ctrl_outl(intr_status, ioaddr + EESR); | 700 | if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF | |
701 | EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF | | ||
702 | TX_CHECK | EESR_ERR_CHECK)) { | ||
703 | ctrl_outl(intr_status, ioaddr + EESR); | ||
704 | ret = IRQ_HANDLED; | ||
705 | } else | ||
706 | goto other_irq; | ||
700 | 707 | ||
701 | if (intr_status & (EESR_FRC | /* Frame recv*/ | 708 | if (intr_status & (EESR_FRC | /* Frame recv*/ |
702 | EESR_RMAF | /* Multi cast address recv*/ | 709 | EESR_RMAF | /* Multi cast address recv*/ |
@@ -723,9 +730,10 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) | |||
723 | ndev->name, intr_status); | 730 | ndev->name, intr_status); |
724 | } | 731 | } |
725 | 732 | ||
733 | other_irq: | ||
726 | spin_unlock(&mdp->lock); | 734 | spin_unlock(&mdp->lock); |
727 | 735 | ||
728 | return IRQ_HANDLED; | 736 | return ret; |
729 | } | 737 | } |
730 | 738 | ||
731 | static void sh_eth_timer(unsigned long data) | 739 | static void sh_eth_timer(unsigned long data) |
@@ -844,7 +852,13 @@ static int sh_eth_open(struct net_device *ndev) | |||
844 | int ret = 0; | 852 | int ret = 0; |
845 | struct sh_eth_private *mdp = netdev_priv(ndev); | 853 | struct sh_eth_private *mdp = netdev_priv(ndev); |
846 | 854 | ||
847 | ret = request_irq(ndev->irq, &sh_eth_interrupt, 0, ndev->name, ndev); | 855 | ret = request_irq(ndev->irq, &sh_eth_interrupt, |
856 | #if defined(CONFIG_CPU_SUBTYPE_SH7763) || defined(CONFIG_CPU_SUBTYPE_SH7764) | ||
857 | IRQF_SHARED, | ||
858 | #else | ||
859 | 0, | ||
860 | #endif | ||
861 | ndev->name, ndev); | ||
848 | if (ret) { | 862 | if (ret) { |
849 | printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); | 863 | printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); |
850 | return ret; | 864 | return ret; |
diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index 73bc7181cc18..1537e13e623d 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h | |||
@@ -43,8 +43,8 @@ | |||
43 | 43 | ||
44 | #define SH7763_SKB_ALIGN 32 | 44 | #define SH7763_SKB_ALIGN 32 |
45 | /* Chip Base Address */ | 45 | /* Chip Base Address */ |
46 | # define SH_TSU_ADDR 0xFFE01800 | 46 | # define SH_TSU_ADDR 0xFEE01800 |
47 | # define ARSTR 0xFFE01800 | 47 | # define ARSTR SH_TSU_ADDR |
48 | 48 | ||
49 | /* Chip Registers */ | 49 | /* Chip Registers */ |
50 | /* E-DMAC */ | 50 | /* E-DMAC */ |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index d61514698bb3..ad3cbc91a8fa 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -1225,6 +1225,10 @@ static int smsc911x_open(struct net_device *dev) | |||
1225 | dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", | 1225 | dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", |
1226 | (unsigned long)pdata->ioaddr, dev->irq); | 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 | /* Bring the PHY up */ | 1232 | /* Bring the PHY up */ |
1229 | phy_start(pdata->phy_dev); | 1233 | phy_start(pdata->phy_dev); |
1230 | 1234 | ||
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index bee75fa87a9c..2abb5d3becc6 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -255,6 +255,7 @@ const char tulip_media_cap[32] = | |||
255 | 255 | ||
256 | static void tulip_tx_timeout(struct net_device *dev); | 256 | static void tulip_tx_timeout(struct net_device *dev); |
257 | static void tulip_init_ring(struct net_device *dev); | 257 | static void tulip_init_ring(struct net_device *dev); |
258 | static void tulip_free_ring(struct net_device *dev); | ||
258 | static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); | 259 | static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); |
259 | static int tulip_open(struct net_device *dev); | 260 | static int tulip_open(struct net_device *dev); |
260 | static int tulip_close(struct net_device *dev); | 261 | static int tulip_close(struct net_device *dev); |
@@ -502,16 +503,21 @@ tulip_open(struct net_device *dev) | |||
502 | { | 503 | { |
503 | int retval; | 504 | int retval; |
504 | 505 | ||
505 | if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) | ||
506 | return retval; | ||
507 | |||
508 | tulip_init_ring (dev); | 506 | tulip_init_ring (dev); |
509 | 507 | ||
508 | retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev); | ||
509 | if (retval) | ||
510 | goto free_ring; | ||
511 | |||
510 | tulip_up (dev); | 512 | tulip_up (dev); |
511 | 513 | ||
512 | netif_start_queue (dev); | 514 | netif_start_queue (dev); |
513 | 515 | ||
514 | return 0; | 516 | return 0; |
517 | |||
518 | free_ring: | ||
519 | tulip_free_ring (dev); | ||
520 | return retval; | ||
515 | } | 521 | } |
516 | 522 | ||
517 | 523 | ||
@@ -768,23 +774,11 @@ static void tulip_down (struct net_device *dev) | |||
768 | tulip_set_power_state (tp, 0, 1); | 774 | tulip_set_power_state (tp, 0, 1); |
769 | } | 775 | } |
770 | 776 | ||
771 | 777 | static void tulip_free_ring (struct net_device *dev) | |
772 | static int tulip_close (struct net_device *dev) | ||
773 | { | 778 | { |
774 | struct tulip_private *tp = netdev_priv(dev); | 779 | struct tulip_private *tp = netdev_priv(dev); |
775 | void __iomem *ioaddr = tp->base_addr; | ||
776 | int i; | 780 | int i; |
777 | 781 | ||
778 | netif_stop_queue (dev); | ||
779 | |||
780 | tulip_down (dev); | ||
781 | |||
782 | if (tulip_debug > 1) | ||
783 | printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", | ||
784 | dev->name, ioread32 (ioaddr + CSR5)); | ||
785 | |||
786 | free_irq (dev->irq, dev); | ||
787 | |||
788 | /* Free all the skbuffs in the Rx queue. */ | 782 | /* Free all the skbuffs in the Rx queue. */ |
789 | for (i = 0; i < RX_RING_SIZE; i++) { | 783 | for (i = 0; i < RX_RING_SIZE; i++) { |
790 | struct sk_buff *skb = tp->rx_buffers[i].skb; | 784 | struct sk_buff *skb = tp->rx_buffers[i].skb; |
@@ -803,6 +797,7 @@ static int tulip_close (struct net_device *dev) | |||
803 | dev_kfree_skb (skb); | 797 | dev_kfree_skb (skb); |
804 | } | 798 | } |
805 | } | 799 | } |
800 | |||
806 | for (i = 0; i < TX_RING_SIZE; i++) { | 801 | for (i = 0; i < TX_RING_SIZE; i++) { |
807 | struct sk_buff *skb = tp->tx_buffers[i].skb; | 802 | struct sk_buff *skb = tp->tx_buffers[i].skb; |
808 | 803 | ||
@@ -814,6 +809,24 @@ static int tulip_close (struct net_device *dev) | |||
814 | tp->tx_buffers[i].skb = NULL; | 809 | tp->tx_buffers[i].skb = NULL; |
815 | tp->tx_buffers[i].mapping = 0; | 810 | tp->tx_buffers[i].mapping = 0; |
816 | } | 811 | } |
812 | } | ||
813 | |||
814 | static int tulip_close (struct net_device *dev) | ||
815 | { | ||
816 | struct tulip_private *tp = netdev_priv(dev); | ||
817 | void __iomem *ioaddr = tp->base_addr; | ||
818 | |||
819 | netif_stop_queue (dev); | ||
820 | |||
821 | tulip_down (dev); | ||
822 | |||
823 | if (tulip_debug > 1) | ||
824 | printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", | ||
825 | dev->name, ioread32 (ioaddr + CSR5)); | ||
826 | |||
827 | free_irq (dev->irq, dev); | ||
828 | |||
829 | tulip_free_ring (dev); | ||
817 | 830 | ||
818 | return 0; | 831 | return 0; |
819 | } | 832 | } |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3d0033920224..a6f1e19159d8 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -953,6 +953,7 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
953 | 953 | ||
954 | vi->status = VIRTIO_NET_S_LINK_UP; | 954 | vi->status = VIRTIO_NET_S_LINK_UP; |
955 | virtnet_update_status(vi); | 955 | virtnet_update_status(vi); |
956 | netif_carrier_on(dev); | ||
956 | 957 | ||
957 | pr_debug("virtnet: registered device %s\n", dev->name); | 958 | pr_debug("virtnet: registered device %s\n", dev->name); |
958 | return 0; | 959 | return 0; |
diff --git a/net/core/dev.c b/net/core/dev.c index c01303129119..ca212acd3348 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2712,7 +2712,7 @@ void netif_napi_del(struct napi_struct *napi) | |||
2712 | struct sk_buff *skb, *next; | 2712 | struct sk_buff *skb, *next; |
2713 | 2713 | ||
2714 | list_del_init(&napi->dev_list); | 2714 | list_del_init(&napi->dev_list); |
2715 | kfree(napi->skb); | 2715 | kfree_skb(napi->skb); |
2716 | 2716 | ||
2717 | for (skb = napi->gro_list; skb; skb = next) { | 2717 | for (skb = napi->gro_list; skb; skb = next) { |
2718 | next = skb->next; | 2718 | next = skb->next; |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 6659ac000eeb..7985346653bd 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -463,6 +463,7 @@ err: | |||
463 | static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, | 463 | static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, |
464 | struct net_device *dev) | 464 | struct net_device *dev) |
465 | { | 465 | { |
466 | struct net *net = container_of(qp->q.net, struct net, ipv4.frags); | ||
466 | struct iphdr *iph; | 467 | struct iphdr *iph; |
467 | struct sk_buff *fp, *head = qp->q.fragments; | 468 | struct sk_buff *fp, *head = qp->q.fragments; |
468 | int len; | 469 | int len; |
@@ -548,7 +549,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, | |||
548 | iph = ip_hdr(head); | 549 | iph = ip_hdr(head); |
549 | iph->frag_off = 0; | 550 | iph->frag_off = 0; |
550 | iph->tot_len = htons(len); | 551 | iph->tot_len = htons(len); |
551 | IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMOKS); | 552 | IP_INC_STATS_BH(net, IPSTATS_MIB_REASMOKS); |
552 | qp->q.fragments = NULL; | 553 | qp->q.fragments = NULL; |
553 | return 0; | 554 | return 0; |
554 | 555 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 3c575118fca5..e9ac7a12f595 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -452,6 +452,7 @@ err: | |||
452 | static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | 452 | static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, |
453 | struct net_device *dev) | 453 | struct net_device *dev) |
454 | { | 454 | { |
455 | struct net *net = container_of(fq->q.net, struct net, ipv6.frags); | ||
455 | struct sk_buff *fp, *head = fq->q.fragments; | 456 | struct sk_buff *fp, *head = fq->q.fragments; |
456 | int payload_len; | 457 | int payload_len; |
457 | unsigned int nhoff; | 458 | unsigned int nhoff; |
@@ -551,8 +552,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | |||
551 | head->csum); | 552 | head->csum); |
552 | 553 | ||
553 | rcu_read_lock(); | 554 | rcu_read_lock(); |
554 | IP6_INC_STATS_BH(dev_net(dev), | 555 | IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); |
555 | __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); | ||
556 | rcu_read_unlock(); | 556 | rcu_read_unlock(); |
557 | fq->q.fragments = NULL; | 557 | fq->q.fragments = NULL; |
558 | return 1; | 558 | return 1; |
@@ -566,8 +566,7 @@ out_oom: | |||
566 | printk(KERN_DEBUG "ip6_frag_reasm: no memory for reassembly\n"); | 566 | printk(KERN_DEBUG "ip6_frag_reasm: no memory for reassembly\n"); |
567 | out_fail: | 567 | out_fail: |
568 | rcu_read_lock(); | 568 | rcu_read_lock(); |
569 | IP6_INC_STATS_BH(dev_net(dev), | 569 | IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); |
570 | __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); | ||
571 | rcu_read_unlock(); | 570 | rcu_read_unlock(); |
572 | return -1; | 571 | return -1; |
573 | } | 572 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 26915effb3bc..664ab82e03b2 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -188,9 +188,9 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct net *net, | |||
188 | } | 188 | } |
189 | 189 | ||
190 | nt = netdev_priv(dev); | 190 | nt = netdev_priv(dev); |
191 | ipip6_tunnel_init(dev); | ||
192 | 191 | ||
193 | nt->parms = *parms; | 192 | nt->parms = *parms; |
193 | ipip6_tunnel_init(dev); | ||
194 | 194 | ||
195 | if (parms->i_flags & SIT_ISATAP) | 195 | if (parms->i_flags & SIT_ISATAP) |
196 | dev->priv_flags |= IFF_ISATAP; | 196 | dev->priv_flags |= IFF_ISATAP; |
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 4c8d9f45ce09..905fda582b92 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c | |||
@@ -111,7 +111,8 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, | |||
111 | if (sctp_addip_enable) { | 111 | if (sctp_addip_enable) { |
112 | auth_chunks->chunks[0] = SCTP_CID_ASCONF; | 112 | auth_chunks->chunks[0] = SCTP_CID_ASCONF; |
113 | auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK; | 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 | ||