diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-10 16:03:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-10 16:03:49 -0500 |
commit | b251f0f399e275b027d6541cfbac1d2a3206b44a (patch) | |
tree | e56d5dd46ee3a8cd3063a9109fe8f53990714909 | |
parent | 2b1768f39aebfcccdc5b948eb4962918a5a64581 (diff) | |
parent | a375413311b39005ef281bfd71ae8f4e3df22e97 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Bug fixes galore, mostly in drivers as is often the case:
1) USB gadget and cdc_eem drivers need adjustments to their frame size
lengths in order to handle VLANs correctly. From Ian Coolidge.
2) TIPC and several network drivers erroneously call tasklet_disable
before tasklet_kill, fix from Xiaotian Feng.
3) r8169 driver needs to apply the WOL suspend quirk to more chipsets,
fix from Cyril Brulebois.
4) Fix multicast filters on RTL_GIGA_MAC_VER_35 r8169 chips, from
Nathan Walp.
5) FDB netlink dumps should use RTM_NEWNEIGH as the message type, not
zero. From John Fastabend.
6) Fix smsc95xx tx checksum offload on big-endian, from Steve
Glendinning.
7) __inet_diag_dump() needs to repsect and report the error value
returned from inet_diag_lock_handler() rather than ignore it.
Otherwise if an inet diag handler is not available for a particular
protocol, we essentially report success instead of giving an error
indication. Fix from Cyrill Gorcunov.
8) When the QFQ packet scheduler sees TSO/GSO packets it does not
handle things properly, and in fact ends up corrupting it's
datastructures as well as mis-schedule packets. Fix from Paolo
Valente.
9) Fix oopser in skb_loop_sk(), from Eric Leblond.
10) CXGB4 passes partially uninitialized datastructures in to FW
commands, fix from Vipul Pandya.
11) When we send unsolicited ipv6 neighbour advertisements, we should
send them to the link-local allnodes multicast address, as per
RFC4861. Fix from Hannes Frederic Sowa.
12) There is some kind of bug in the usbnet's kevent deferral
mechanism, but more immediately when it triggers an uncontrolled
stream of kernel messages spam the log. Rate limit the error log
message triggered when this problem occurs, as sending thousands
of error messages into the kernel log doesn't help matters at all,
and in fact makes further diagnosis more difficult.
From Steve Glendinning.
13) Fix gianfar restore from hibernation, from Wang Dongsheng.
14) The netlink message attribute sizes are wrong in the ipv6 GRE
driver, it was using the size of ipv4 addresses instead of ipv6
ones :-) Fix from Nicolas Dichtel."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
gre6: fix rtnl dump messages
gianfar: ethernet vanishes after restoring from hibernation
usbnet: ratelimit kevent may have been dropped warnings
ipv6: send unsolicited neighbour advertisements to all-nodes
net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
usb: gadget: g_ether: fix frame size check for 802.1Q
cxgb4: Fix initialization of SGE_CONTROL register
isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
cxgb4: Initialize data structures before using.
af-packet: fix oops when socket is not present
pkt_sched: enable QFQ to support TSO/GSO
net: inet_diag -- Return error code if protocol handler is missed
net: bnx2x: Fix typo in bnx2x driver
smsc95xx: fix tx checksum offload for big endian
rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dump
ptp: update adjfreq callback description
r8169: allow multicast packets on sub-8168f chipset.
r8169: Fix WoL on RTL8168d/8111d.
drivers/net: use tasklet_kill in device remove/close process
tipc: do not use tasklet_disable before tasklet_kill
25 files changed, 131 insertions, 66 deletions
diff --git a/drivers/isdn/Kconfig b/drivers/isdn/Kconfig index a233ed53913a..86cd75a0e84d 100644 --- a/drivers/isdn/Kconfig +++ b/drivers/isdn/Kconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | menuconfig ISDN | 5 | menuconfig ISDN |
6 | bool "ISDN support" | 6 | bool "ISDN support" |
7 | depends on NET | 7 | depends on NET && NETDEVICES |
8 | depends on !S390 && !UML | 8 | depends on !S390 && !UML |
9 | ---help--- | 9 | ---help--- |
10 | ISDN ("Integrated Services Digital Network", called RNIS in France) | 10 | ISDN ("Integrated Services Digital Network", called RNIS in France) |
diff --git a/drivers/isdn/i4l/Kconfig b/drivers/isdn/i4l/Kconfig index 2302fbe70ac6..9c6650ea848e 100644 --- a/drivers/isdn/i4l/Kconfig +++ b/drivers/isdn/i4l/Kconfig | |||
@@ -6,7 +6,7 @@ if ISDN_I4L | |||
6 | 6 | ||
7 | config ISDN_PPP | 7 | config ISDN_PPP |
8 | bool "Support synchronous PPP" | 8 | bool "Support synchronous PPP" |
9 | depends on INET && NETDEVICES | 9 | depends on INET |
10 | select SLHC | 10 | select SLHC |
11 | help | 11 | help |
12 | Over digital connections such as ISDN, there is no need to | 12 | Over digital connections such as ISDN, there is no need to |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 8c610fa6782b..e2a945ee9f05 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1312,7 +1312,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) | |||
1312 | } else | 1312 | } else |
1313 | return -EINVAL; | 1313 | return -EINVAL; |
1314 | break; | 1314 | break; |
1315 | #ifdef CONFIG_NETDEVICES | ||
1316 | case IIOCNETGPN: | 1315 | case IIOCNETGPN: |
1317 | /* Get peer phone number of a connected | 1316 | /* Get peer phone number of a connected |
1318 | * isdn network interface */ | 1317 | * isdn network interface */ |
@@ -1322,7 +1321,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) | |||
1322 | return isdn_net_getpeer(&phone, argp); | 1321 | return isdn_net_getpeer(&phone, argp); |
1323 | } else | 1322 | } else |
1324 | return -EINVAL; | 1323 | return -EINVAL; |
1325 | #endif | ||
1326 | default: | 1324 | default: |
1327 | return -EINVAL; | 1325 | return -EINVAL; |
1328 | } | 1326 | } |
@@ -1352,7 +1350,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) | |||
1352 | case IIOCNETLCR: | 1350 | case IIOCNETLCR: |
1353 | printk(KERN_INFO "INFO: ISDN_ABC_LCR_SUPPORT not enabled\n"); | 1351 | printk(KERN_INFO "INFO: ISDN_ABC_LCR_SUPPORT not enabled\n"); |
1354 | return -ENODEV; | 1352 | return -ENODEV; |
1355 | #ifdef CONFIG_NETDEVICES | ||
1356 | case IIOCNETAIF: | 1353 | case IIOCNETAIF: |
1357 | /* Add a network-interface */ | 1354 | /* Add a network-interface */ |
1358 | if (arg) { | 1355 | if (arg) { |
@@ -1491,7 +1488,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) | |||
1491 | return -EFAULT; | 1488 | return -EFAULT; |
1492 | return isdn_net_force_hangup(name); | 1489 | return isdn_net_force_hangup(name); |
1493 | break; | 1490 | break; |
1494 | #endif /* CONFIG_NETDEVICES */ | ||
1495 | case IIOCSETVER: | 1491 | case IIOCSETVER: |
1496 | dev->net_verbose = arg; | 1492 | dev->net_verbose = arg; |
1497 | printk(KERN_INFO "isdn: Verbose-Level is %d\n", dev->net_verbose); | 1493 | printk(KERN_INFO "isdn: Verbose-Level is %d\n", dev->net_verbose); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index c65295dded39..6e5bdd1a31d9 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -1702,7 +1702,7 @@ static int bnx2x_set_eee(struct net_device *dev, struct ethtool_eee *edata) | |||
1702 | SHMEM_EEE_ADV_STATUS_SHIFT); | 1702 | SHMEM_EEE_ADV_STATUS_SHIFT); |
1703 | if ((advertised != (eee_cfg & SHMEM_EEE_ADV_STATUS_MASK))) { | 1703 | if ((advertised != (eee_cfg & SHMEM_EEE_ADV_STATUS_MASK))) { |
1704 | DP(BNX2X_MSG_ETHTOOL, | 1704 | DP(BNX2X_MSG_ETHTOOL, |
1705 | "Direct manipulation of EEE advertisment is not supported\n"); | 1705 | "Direct manipulation of EEE advertisement is not supported\n"); |
1706 | return -EINVAL; | 1706 | return -EINVAL; |
1707 | } | 1707 | } |
1708 | 1708 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 6dd0dd076cc5..f6cfdc6cf20f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -9941,7 +9941,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy, | |||
9941 | else | 9941 | else |
9942 | rc = bnx2x_8483x_disable_eee(phy, params, vars); | 9942 | rc = bnx2x_8483x_disable_eee(phy, params, vars); |
9943 | if (rc) { | 9943 | if (rc) { |
9944 | DP(NETIF_MSG_LINK, "Failed to set EEE advertisment\n"); | 9944 | DP(NETIF_MSG_LINK, "Failed to set EEE advertisement\n"); |
9945 | return rc; | 9945 | return rc; |
9946 | } | 9946 | } |
9947 | } else { | 9947 | } else { |
@@ -12987,7 +12987,7 @@ static u8 bnx2x_analyze_link_error(struct link_params *params, | |||
12987 | DP(NETIF_MSG_LINK, "Analyze TX Fault\n"); | 12987 | DP(NETIF_MSG_LINK, "Analyze TX Fault\n"); |
12988 | break; | 12988 | break; |
12989 | default: | 12989 | default: |
12990 | DP(NETIF_MSG_LINK, "Analyze UNKOWN\n"); | 12990 | DP(NETIF_MSG_LINK, "Analyze UNKNOWN\n"); |
12991 | } | 12991 | } |
12992 | DP(NETIF_MSG_LINK, "Link changed:[%x %x]->%x\n", vars->link_up, | 12992 | DP(NETIF_MSG_LINK, "Link changed:[%x %x]->%x\n", vars->link_up, |
12993 | old_status, status); | 12993 | old_status, status); |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 32eec15fe4c2..730ae2cfa49e 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |||
@@ -2519,6 +2519,7 @@ int t4_fw_bye(struct adapter *adap, unsigned int mbox) | |||
2519 | { | 2519 | { |
2520 | struct fw_bye_cmd c; | 2520 | struct fw_bye_cmd c; |
2521 | 2521 | ||
2522 | memset(&c, 0, sizeof(c)); | ||
2522 | INIT_CMD(c, BYE, WRITE); | 2523 | INIT_CMD(c, BYE, WRITE); |
2523 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); | 2524 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); |
2524 | } | 2525 | } |
@@ -2535,6 +2536,7 @@ int t4_early_init(struct adapter *adap, unsigned int mbox) | |||
2535 | { | 2536 | { |
2536 | struct fw_initialize_cmd c; | 2537 | struct fw_initialize_cmd c; |
2537 | 2538 | ||
2539 | memset(&c, 0, sizeof(c)); | ||
2538 | INIT_CMD(c, INITIALIZE, WRITE); | 2540 | INIT_CMD(c, INITIALIZE, WRITE); |
2539 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); | 2541 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); |
2540 | } | 2542 | } |
@@ -2551,6 +2553,7 @@ int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset) | |||
2551 | { | 2553 | { |
2552 | struct fw_reset_cmd c; | 2554 | struct fw_reset_cmd c; |
2553 | 2555 | ||
2556 | memset(&c, 0, sizeof(c)); | ||
2554 | INIT_CMD(c, RESET, WRITE); | 2557 | INIT_CMD(c, RESET, WRITE); |
2555 | c.val = htonl(reset); | 2558 | c.val = htonl(reset); |
2556 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); | 2559 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); |
@@ -2828,7 +2831,7 @@ int t4_fixup_host_params(struct adapter *adap, unsigned int page_size, | |||
2828 | HOSTPAGESIZEPF7(sge_hps)); | 2831 | HOSTPAGESIZEPF7(sge_hps)); |
2829 | 2832 | ||
2830 | t4_set_reg_field(adap, SGE_CONTROL, | 2833 | t4_set_reg_field(adap, SGE_CONTROL, |
2831 | INGPADBOUNDARY(INGPADBOUNDARY_MASK) | | 2834 | INGPADBOUNDARY_MASK | |
2832 | EGRSTATUSPAGESIZE_MASK, | 2835 | EGRSTATUSPAGESIZE_MASK, |
2833 | INGPADBOUNDARY(fl_align_log - 5) | | 2836 | INGPADBOUNDARY(fl_align_log - 5) | |
2834 | EGRSTATUSPAGESIZE(stat_len != 64)); | 2837 | EGRSTATUSPAGESIZE(stat_len != 64)); |
@@ -3278,6 +3281,7 @@ int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, | |||
3278 | { | 3281 | { |
3279 | struct fw_vi_enable_cmd c; | 3282 | struct fw_vi_enable_cmd c; |
3280 | 3283 | ||
3284 | memset(&c, 0, sizeof(c)); | ||
3281 | c.op_to_viid = htonl(FW_CMD_OP(FW_VI_ENABLE_CMD) | FW_CMD_REQUEST | | 3285 | c.op_to_viid = htonl(FW_CMD_OP(FW_VI_ENABLE_CMD) | FW_CMD_REQUEST | |
3282 | FW_CMD_EXEC | FW_VI_ENABLE_CMD_VIID(viid)); | 3286 | FW_CMD_EXEC | FW_VI_ENABLE_CMD_VIID(viid)); |
3283 | c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_LED | FW_LEN16(c)); | 3287 | c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_LED | FW_LEN16(c)); |
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 1d03dcdd5e56..19ac096cb07b 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -1353,8 +1353,11 @@ static int gfar_restore(struct device *dev) | |||
1353 | struct gfar_private *priv = dev_get_drvdata(dev); | 1353 | struct gfar_private *priv = dev_get_drvdata(dev); |
1354 | struct net_device *ndev = priv->ndev; | 1354 | struct net_device *ndev = priv->ndev; |
1355 | 1355 | ||
1356 | if (!netif_running(ndev)) | 1356 | if (!netif_running(ndev)) { |
1357 | netif_device_attach(ndev); | ||
1358 | |||
1357 | return 0; | 1359 | return 0; |
1360 | } | ||
1358 | 1361 | ||
1359 | gfar_init_bds(ndev); | 1362 | gfar_init_bds(ndev); |
1360 | init_registers(ndev); | 1363 | init_registers(ndev); |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index f8064df10cc4..92317e9c0f73 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -1948,10 +1948,10 @@ jme_close(struct net_device *netdev) | |||
1948 | 1948 | ||
1949 | JME_NAPI_DISABLE(jme); | 1949 | JME_NAPI_DISABLE(jme); |
1950 | 1950 | ||
1951 | tasklet_disable(&jme->linkch_task); | 1951 | tasklet_kill(&jme->linkch_task); |
1952 | tasklet_disable(&jme->txclean_task); | 1952 | tasklet_kill(&jme->txclean_task); |
1953 | tasklet_disable(&jme->rxclean_task); | 1953 | tasklet_kill(&jme->rxclean_task); |
1954 | tasklet_disable(&jme->rxempty_task); | 1954 | tasklet_kill(&jme->rxempty_task); |
1955 | 1955 | ||
1956 | jme_disable_rx_engine(jme); | 1956 | jme_disable_rx_engine(jme); |
1957 | jme_disable_tx_engine(jme); | 1957 | jme_disable_tx_engine(jme); |
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 9b9c2ac5c4c2..d19a143aa5a8 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -4026,7 +4026,7 @@ static void __devexit skge_remove(struct pci_dev *pdev) | |||
4026 | dev0 = hw->dev[0]; | 4026 | dev0 = hw->dev[0]; |
4027 | unregister_netdev(dev0); | 4027 | unregister_netdev(dev0); |
4028 | 4028 | ||
4029 | tasklet_disable(&hw->phy_task); | 4029 | tasklet_kill(&hw->phy_task); |
4030 | 4030 | ||
4031 | spin_lock_irq(&hw->hw_lock); | 4031 | spin_lock_irq(&hw->hw_lock); |
4032 | hw->intr_mask = 0; | 4032 | hw->intr_mask = 0; |
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index 318fee91c79d..e558edd1cb6c 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c | |||
@@ -5407,8 +5407,8 @@ static int netdev_close(struct net_device *dev) | |||
5407 | /* Delay for receive task to stop scheduling itself. */ | 5407 | /* Delay for receive task to stop scheduling itself. */ |
5408 | msleep(2000 / HZ); | 5408 | msleep(2000 / HZ); |
5409 | 5409 | ||
5410 | tasklet_disable(&hw_priv->rx_tasklet); | 5410 | tasklet_kill(&hw_priv->rx_tasklet); |
5411 | tasklet_disable(&hw_priv->tx_tasklet); | 5411 | tasklet_kill(&hw_priv->tx_tasklet); |
5412 | free_irq(dev->irq, hw_priv->dev); | 5412 | free_irq(dev->irq, hw_priv->dev); |
5413 | 5413 | ||
5414 | transmit_cleanup(hw_priv, 0); | 5414 | transmit_cleanup(hw_priv, 0); |
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index e7ff886e8047..927aa33d4349 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -3827,6 +3827,8 @@ static void rtl_wol_suspend_quirk(struct rtl8169_private *tp) | |||
3827 | void __iomem *ioaddr = tp->mmio_addr; | 3827 | void __iomem *ioaddr = tp->mmio_addr; |
3828 | 3828 | ||
3829 | switch (tp->mac_version) { | 3829 | switch (tp->mac_version) { |
3830 | case RTL_GIGA_MAC_VER_25: | ||
3831 | case RTL_GIGA_MAC_VER_26: | ||
3830 | case RTL_GIGA_MAC_VER_29: | 3832 | case RTL_GIGA_MAC_VER_29: |
3831 | case RTL_GIGA_MAC_VER_30: | 3833 | case RTL_GIGA_MAC_VER_30: |
3832 | case RTL_GIGA_MAC_VER_32: | 3834 | case RTL_GIGA_MAC_VER_32: |
@@ -4519,6 +4521,9 @@ static void rtl_set_rx_mode(struct net_device *dev) | |||
4519 | mc_filter[1] = swab32(data); | 4521 | mc_filter[1] = swab32(data); |
4520 | } | 4522 | } |
4521 | 4523 | ||
4524 | if (tp->mac_version == RTL_GIGA_MAC_VER_35) | ||
4525 | mc_filter[1] = mc_filter[0] = 0xffffffff; | ||
4526 | |||
4522 | RTL_W32(MAR0 + 4, mc_filter[1]); | 4527 | RTL_W32(MAR0 + 4, mc_filter[1]); |
4523 | RTL_W32(MAR0 + 0, mc_filter[0]); | 4528 | RTL_W32(MAR0 + 0, mc_filter[0]); |
4524 | 4529 | ||
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 0793299bd39e..1d04754a6637 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -990,7 +990,7 @@ static int axienet_stop(struct net_device *ndev) | |||
990 | axienet_setoptions(ndev, lp->options & | 990 | axienet_setoptions(ndev, lp->options & |
991 | ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN)); | 991 | ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN)); |
992 | 992 | ||
993 | tasklet_disable(&lp->dma_err_tasklet); | 993 | tasklet_kill(&lp->dma_err_tasklet); |
994 | 994 | ||
995 | free_irq(lp->tx_irq, ndev); | 995 | free_irq(lp->tx_irq, ndev); |
996 | free_irq(lp->rx_irq, ndev); | 996 | free_irq(lp->rx_irq, ndev); |
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index c81e278629ff..08d55b6bf272 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/usb/cdc.h> | 31 | #include <linux/usb/cdc.h> |
32 | #include <linux/usb/usbnet.h> | 32 | #include <linux/usb/usbnet.h> |
33 | #include <linux/gfp.h> | 33 | #include <linux/gfp.h> |
34 | #include <linux/if_vlan.h> | ||
34 | 35 | ||
35 | 36 | ||
36 | /* | 37 | /* |
@@ -92,7 +93,7 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf) | |||
92 | 93 | ||
93 | /* no jumbogram (16K) support for now */ | 94 | /* no jumbogram (16K) support for now */ |
94 | 95 | ||
95 | dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN; | 96 | dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN + VLAN_HLEN; |
96 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; | 97 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; |
97 | 98 | ||
98 | return 0; | 99 | return 0; |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 7479a5761d0d..3286166415b4 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -1344,6 +1344,7 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev, | |||
1344 | } else { | 1344 | } else { |
1345 | u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); | 1345 | u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); |
1346 | skb_push(skb, 4); | 1346 | skb_push(skb, 4); |
1347 | cpu_to_le32s(&csum_preamble); | ||
1347 | memcpy(skb->data, &csum_preamble, 4); | 1348 | memcpy(skb->data, &csum_preamble, 4); |
1348 | } | 1349 | } |
1349 | } | 1350 | } |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index cb04f900cc46..edb81ed06950 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -359,10 +359,12 @@ static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb, | |||
359 | void usbnet_defer_kevent (struct usbnet *dev, int work) | 359 | void usbnet_defer_kevent (struct usbnet *dev, int work) |
360 | { | 360 | { |
361 | set_bit (work, &dev->flags); | 361 | set_bit (work, &dev->flags); |
362 | if (!schedule_work (&dev->kevent)) | 362 | if (!schedule_work (&dev->kevent)) { |
363 | netdev_err(dev->net, "kevent %d may have been dropped\n", work); | 363 | if (net_ratelimit()) |
364 | else | 364 | netdev_err(dev->net, "kevent %d may have been dropped\n", work); |
365 | } else { | ||
365 | netdev_dbg(dev->net, "kevent %d scheduled\n", work); | 366 | netdev_dbg(dev->net, "kevent %d scheduled\n", work); |
367 | } | ||
366 | } | 368 | } |
367 | EXPORT_SYMBOL_GPL(usbnet_defer_kevent); | 369 | EXPORT_SYMBOL_GPL(usbnet_defer_kevent); |
368 | 370 | ||
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index 192251adf986..282eedec675e 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c | |||
@@ -382,7 +382,7 @@ static void cancel_transfers(struct b43legacy_pioqueue *queue) | |||
382 | { | 382 | { |
383 | struct b43legacy_pio_txpacket *packet, *tmp_packet; | 383 | struct b43legacy_pio_txpacket *packet, *tmp_packet; |
384 | 384 | ||
385 | tasklet_disable(&queue->txtask); | 385 | tasklet_kill(&queue->txtask); |
386 | 386 | ||
387 | list_for_each_entry_safe(packet, tmp_packet, &queue->txrunning, list) | 387 | list_for_each_entry_safe(packet, tmp_packet, &queue->txrunning, list) |
388 | free_txpacket(packet, 0); | 388 | free_txpacket(packet, 0); |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 6458764994ef..4ec3c0d7a18b 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/ctype.h> | 20 | #include <linux/ctype.h> |
21 | #include <linux/etherdevice.h> | 21 | #include <linux/etherdevice.h> |
22 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
23 | #include <linux/if_vlan.h> | ||
23 | 24 | ||
24 | #include "u_ether.h" | 25 | #include "u_ether.h" |
25 | 26 | ||
@@ -295,7 +296,7 @@ static void rx_complete(struct usb_ep *ep, struct usb_request *req) | |||
295 | while (skb2) { | 296 | while (skb2) { |
296 | if (status < 0 | 297 | if (status < 0 |
297 | || ETH_HLEN > skb2->len | 298 | || ETH_HLEN > skb2->len |
298 | || skb2->len > ETH_FRAME_LEN) { | 299 | || skb2->len > VLAN_ETH_FRAME_LEN) { |
299 | dev->net->stats.rx_errors++; | 300 | dev->net->stats.rx_errors++; |
300 | dev->net->stats.rx_length_errors++; | 301 | dev->net->stats.rx_length_errors++; |
301 | DBG(dev, "rx length %d\n", skb2->len); | 302 | DBG(dev, "rx length %d\n", skb2->len); |
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index f2dc6d8fc680..38a993508327 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h | |||
@@ -54,7 +54,8 @@ struct ptp_clock_request { | |||
54 | * clock operations | 54 | * clock operations |
55 | * | 55 | * |
56 | * @adjfreq: Adjusts the frequency of the hardware clock. | 56 | * @adjfreq: Adjusts the frequency of the hardware clock. |
57 | * parameter delta: Desired period change in parts per billion. | 57 | * parameter delta: Desired frequency offset from nominal frequency |
58 | * in parts per billion | ||
58 | * | 59 | * |
59 | * @adjtime: Shifts the time of the hardware clock. | 60 | * @adjtime: Shifts the time of the hardware clock. |
60 | * parameter delta: Desired change in nanoseconds. | 61 | * parameter delta: Desired change in nanoseconds. |
diff --git a/net/core/dev.c b/net/core/dev.c index 09cb3f6dc40c..bda6d004f9f0 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1666,7 +1666,7 @@ static inline int deliver_skb(struct sk_buff *skb, | |||
1666 | 1666 | ||
1667 | static inline bool skb_loop_sk(struct packet_type *ptype, struct sk_buff *skb) | 1667 | static inline bool skb_loop_sk(struct packet_type *ptype, struct sk_buff *skb) |
1668 | { | 1668 | { |
1669 | if (ptype->af_packet_priv == NULL) | 1669 | if (!ptype->af_packet_priv || !skb->sk) |
1670 | return false; | 1670 | return false; |
1671 | 1671 | ||
1672 | if (ptype->id_match) | 1672 | if (ptype->id_match) |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 76d4c2c3c89b..fad649ae4dec 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -2192,7 +2192,8 @@ static int nlmsg_populate_fdb(struct sk_buff *skb, | |||
2192 | goto skip; | 2192 | goto skip; |
2193 | 2193 | ||
2194 | err = nlmsg_populate_fdb_fill(skb, dev, ha->addr, | 2194 | err = nlmsg_populate_fdb_fill(skb, dev, ha->addr, |
2195 | portid, seq, 0, NTF_SELF); | 2195 | portid, seq, |
2196 | RTM_NEWNEIGH, NTF_SELF); | ||
2196 | if (err < 0) | 2197 | if (err < 0) |
2197 | return err; | 2198 | return err; |
2198 | skip: | 2199 | skip: |
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 535584c00f91..0c34bfabc11f 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -892,13 +892,16 @@ static int __inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb, | |||
892 | struct inet_diag_req_v2 *r, struct nlattr *bc) | 892 | struct inet_diag_req_v2 *r, struct nlattr *bc) |
893 | { | 893 | { |
894 | const struct inet_diag_handler *handler; | 894 | const struct inet_diag_handler *handler; |
895 | int err = 0; | ||
895 | 896 | ||
896 | handler = inet_diag_lock_handler(r->sdiag_protocol); | 897 | handler = inet_diag_lock_handler(r->sdiag_protocol); |
897 | if (!IS_ERR(handler)) | 898 | if (!IS_ERR(handler)) |
898 | handler->dump(skb, cb, r, bc); | 899 | handler->dump(skb, cb, r, bc); |
900 | else | ||
901 | err = PTR_ERR(handler); | ||
899 | inet_diag_unlock_handler(handler); | 902 | inet_diag_unlock_handler(handler); |
900 | 903 | ||
901 | return skb->len; | 904 | return err ? : skb->len; |
902 | } | 905 | } |
903 | 906 | ||
904 | static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) | 907 | static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) |
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 0185679c5f53..d5cb3c4e66f8 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
@@ -1633,9 +1633,9 @@ static size_t ip6gre_get_size(const struct net_device *dev) | |||
1633 | /* IFLA_GRE_OKEY */ | 1633 | /* IFLA_GRE_OKEY */ |
1634 | nla_total_size(4) + | 1634 | nla_total_size(4) + |
1635 | /* IFLA_GRE_LOCAL */ | 1635 | /* IFLA_GRE_LOCAL */ |
1636 | nla_total_size(4) + | 1636 | nla_total_size(sizeof(struct in6_addr)) + |
1637 | /* IFLA_GRE_REMOTE */ | 1637 | /* IFLA_GRE_REMOTE */ |
1638 | nla_total_size(4) + | 1638 | nla_total_size(sizeof(struct in6_addr)) + |
1639 | /* IFLA_GRE_TTL */ | 1639 | /* IFLA_GRE_TTL */ |
1640 | nla_total_size(1) + | 1640 | nla_total_size(1) + |
1641 | /* IFLA_GRE_TOS */ | 1641 | /* IFLA_GRE_TOS */ |
@@ -1659,8 +1659,8 @@ static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev) | |||
1659 | nla_put_be16(skb, IFLA_GRE_OFLAGS, p->o_flags) || | 1659 | nla_put_be16(skb, IFLA_GRE_OFLAGS, p->o_flags) || |
1660 | nla_put_be32(skb, IFLA_GRE_IKEY, p->i_key) || | 1660 | nla_put_be32(skb, IFLA_GRE_IKEY, p->i_key) || |
1661 | nla_put_be32(skb, IFLA_GRE_OKEY, p->o_key) || | 1661 | nla_put_be32(skb, IFLA_GRE_OKEY, p->o_key) || |
1662 | nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->raddr) || | 1662 | nla_put(skb, IFLA_GRE_LOCAL, sizeof(struct in6_addr), &p->laddr) || |
1663 | nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->laddr) || | 1663 | nla_put(skb, IFLA_GRE_REMOTE, sizeof(struct in6_addr), &p->raddr) || |
1664 | nla_put_u8(skb, IFLA_GRE_TTL, p->hop_limit) || | 1664 | nla_put_u8(skb, IFLA_GRE_TTL, p->hop_limit) || |
1665 | /*nla_put_u8(skb, IFLA_GRE_TOS, t->priority) ||*/ | 1665 | /*nla_put_u8(skb, IFLA_GRE_TOS, t->priority) ||*/ |
1666 | nla_put_u8(skb, IFLA_GRE_ENCAP_LIMIT, p->encap_limit) || | 1666 | nla_put_u8(skb, IFLA_GRE_ENCAP_LIMIT, p->encap_limit) || |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index ff36194a71aa..2edce30ef733 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -535,7 +535,7 @@ static void ndisc_send_unsol_na(struct net_device *dev) | |||
535 | { | 535 | { |
536 | struct inet6_dev *idev; | 536 | struct inet6_dev *idev; |
537 | struct inet6_ifaddr *ifa; | 537 | struct inet6_ifaddr *ifa; |
538 | struct in6_addr mcaddr; | 538 | struct in6_addr mcaddr = IN6ADDR_LINKLOCAL_ALLNODES_INIT; |
539 | 539 | ||
540 | idev = in6_dev_get(dev); | 540 | idev = in6_dev_get(dev); |
541 | if (!idev) | 541 | if (!idev) |
@@ -543,7 +543,6 @@ static void ndisc_send_unsol_na(struct net_device *dev) | |||
543 | 543 | ||
544 | read_lock_bh(&idev->lock); | 544 | read_lock_bh(&idev->lock); |
545 | list_for_each_entry(ifa, &idev->addr_list, if_list) { | 545 | list_for_each_entry(ifa, &idev->addr_list, if_list) { |
546 | addrconf_addr_solict_mult(&ifa->addr, &mcaddr); | ||
547 | ndisc_send_na(dev, NULL, &mcaddr, &ifa->addr, | 546 | ndisc_send_na(dev, NULL, &mcaddr, &ifa->addr, |
548 | /*router=*/ !!idev->cnf.forwarding, | 547 | /*router=*/ !!idev->cnf.forwarding, |
549 | /*solicited=*/ false, /*override=*/ true, | 548 | /*solicited=*/ false, /*override=*/ true, |
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index f0dd83cff906..9687fa1c2275 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c | |||
@@ -84,18 +84,19 @@ | |||
84 | * grp->index is the index of the group; and grp->slot_shift | 84 | * grp->index is the index of the group; and grp->slot_shift |
85 | * is the shift for the corresponding (scaled) sigma_i. | 85 | * is the shift for the corresponding (scaled) sigma_i. |
86 | */ | 86 | */ |
87 | #define QFQ_MAX_INDEX 19 | 87 | #define QFQ_MAX_INDEX 24 |
88 | #define QFQ_MAX_WSHIFT 16 | 88 | #define QFQ_MAX_WSHIFT 12 |
89 | 89 | ||
90 | #define QFQ_MAX_WEIGHT (1<<QFQ_MAX_WSHIFT) | 90 | #define QFQ_MAX_WEIGHT (1<<QFQ_MAX_WSHIFT) |
91 | #define QFQ_MAX_WSUM (2*QFQ_MAX_WEIGHT) | 91 | #define QFQ_MAX_WSUM (16*QFQ_MAX_WEIGHT) |
92 | 92 | ||
93 | #define FRAC_BITS 30 /* fixed point arithmetic */ | 93 | #define FRAC_BITS 30 /* fixed point arithmetic */ |
94 | #define ONE_FP (1UL << FRAC_BITS) | 94 | #define ONE_FP (1UL << FRAC_BITS) |
95 | #define IWSUM (ONE_FP/QFQ_MAX_WSUM) | 95 | #define IWSUM (ONE_FP/QFQ_MAX_WSUM) |
96 | 96 | ||
97 | #define QFQ_MTU_SHIFT 11 | 97 | #define QFQ_MTU_SHIFT 16 /* to support TSO/GSO */ |
98 | #define QFQ_MIN_SLOT_SHIFT (FRAC_BITS + QFQ_MTU_SHIFT - QFQ_MAX_INDEX) | 98 | #define QFQ_MIN_SLOT_SHIFT (FRAC_BITS + QFQ_MTU_SHIFT - QFQ_MAX_INDEX) |
99 | #define QFQ_MIN_LMAX 256 /* min possible lmax for a class */ | ||
99 | 100 | ||
100 | /* | 101 | /* |
101 | * Possible group states. These values are used as indexes for the bitmaps | 102 | * Possible group states. These values are used as indexes for the bitmaps |
@@ -231,6 +232,32 @@ static void qfq_update_class_params(struct qfq_sched *q, struct qfq_class *cl, | |||
231 | q->wsum += delta_w; | 232 | q->wsum += delta_w; |
232 | } | 233 | } |
233 | 234 | ||
235 | static void qfq_update_reactivate_class(struct qfq_sched *q, | ||
236 | struct qfq_class *cl, | ||
237 | u32 inv_w, u32 lmax, int delta_w) | ||
238 | { | ||
239 | bool need_reactivation = false; | ||
240 | int i = qfq_calc_index(inv_w, lmax); | ||
241 | |||
242 | if (&q->groups[i] != cl->grp && cl->qdisc->q.qlen > 0) { | ||
243 | /* | ||
244 | * shift cl->F back, to not charge the | ||
245 | * class for the not-yet-served head | ||
246 | * packet | ||
247 | */ | ||
248 | cl->F = cl->S; | ||
249 | /* remove class from its slot in the old group */ | ||
250 | qfq_deactivate_class(q, cl); | ||
251 | need_reactivation = true; | ||
252 | } | ||
253 | |||
254 | qfq_update_class_params(q, cl, lmax, inv_w, delta_w); | ||
255 | |||
256 | if (need_reactivation) /* activate in new group */ | ||
257 | qfq_activate_class(q, cl, qdisc_peek_len(cl->qdisc)); | ||
258 | } | ||
259 | |||
260 | |||
234 | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | 261 | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, |
235 | struct nlattr **tca, unsigned long *arg) | 262 | struct nlattr **tca, unsigned long *arg) |
236 | { | 263 | { |
@@ -238,7 +265,7 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | |||
238 | struct qfq_class *cl = (struct qfq_class *)*arg; | 265 | struct qfq_class *cl = (struct qfq_class *)*arg; |
239 | struct nlattr *tb[TCA_QFQ_MAX + 1]; | 266 | struct nlattr *tb[TCA_QFQ_MAX + 1]; |
240 | u32 weight, lmax, inv_w; | 267 | u32 weight, lmax, inv_w; |
241 | int i, err; | 268 | int err; |
242 | int delta_w; | 269 | int delta_w; |
243 | 270 | ||
244 | if (tca[TCA_OPTIONS] == NULL) { | 271 | if (tca[TCA_OPTIONS] == NULL) { |
@@ -270,16 +297,14 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | |||
270 | 297 | ||
271 | if (tb[TCA_QFQ_LMAX]) { | 298 | if (tb[TCA_QFQ_LMAX]) { |
272 | lmax = nla_get_u32(tb[TCA_QFQ_LMAX]); | 299 | lmax = nla_get_u32(tb[TCA_QFQ_LMAX]); |
273 | if (!lmax || lmax > (1UL << QFQ_MTU_SHIFT)) { | 300 | if (lmax < QFQ_MIN_LMAX || lmax > (1UL << QFQ_MTU_SHIFT)) { |
274 | pr_notice("qfq: invalid max length %u\n", lmax); | 301 | pr_notice("qfq: invalid max length %u\n", lmax); |
275 | return -EINVAL; | 302 | return -EINVAL; |
276 | } | 303 | } |
277 | } else | 304 | } else |
278 | lmax = 1UL << QFQ_MTU_SHIFT; | 305 | lmax = psched_mtu(qdisc_dev(sch)); |
279 | 306 | ||
280 | if (cl != NULL) { | 307 | if (cl != NULL) { |
281 | bool need_reactivation = false; | ||
282 | |||
283 | if (tca[TCA_RATE]) { | 308 | if (tca[TCA_RATE]) { |
284 | err = gen_replace_estimator(&cl->bstats, &cl->rate_est, | 309 | err = gen_replace_estimator(&cl->bstats, &cl->rate_est, |
285 | qdisc_root_sleeping_lock(sch), | 310 | qdisc_root_sleeping_lock(sch), |
@@ -291,24 +316,8 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | |||
291 | if (lmax == cl->lmax && inv_w == cl->inv_w) | 316 | if (lmax == cl->lmax && inv_w == cl->inv_w) |
292 | return 0; /* nothing to update */ | 317 | return 0; /* nothing to update */ |
293 | 318 | ||
294 | i = qfq_calc_index(inv_w, lmax); | ||
295 | sch_tree_lock(sch); | 319 | sch_tree_lock(sch); |
296 | if (&q->groups[i] != cl->grp && cl->qdisc->q.qlen > 0) { | 320 | qfq_update_reactivate_class(q, cl, inv_w, lmax, delta_w); |
297 | /* | ||
298 | * shift cl->F back, to not charge the | ||
299 | * class for the not-yet-served head | ||
300 | * packet | ||
301 | */ | ||
302 | cl->F = cl->S; | ||
303 | /* remove class from its slot in the old group */ | ||
304 | qfq_deactivate_class(q, cl); | ||
305 | need_reactivation = true; | ||
306 | } | ||
307 | |||
308 | qfq_update_class_params(q, cl, lmax, inv_w, delta_w); | ||
309 | |||
310 | if (need_reactivation) /* activate in new group */ | ||
311 | qfq_activate_class(q, cl, qdisc_peek_len(cl->qdisc)); | ||
312 | sch_tree_unlock(sch); | 321 | sch_tree_unlock(sch); |
313 | 322 | ||
314 | return 0; | 323 | return 0; |
@@ -663,15 +672,48 @@ static void qfq_make_eligible(struct qfq_sched *q, u64 old_V) | |||
663 | 672 | ||
664 | 673 | ||
665 | /* | 674 | /* |
666 | * XXX we should make sure that slot becomes less than 32. | 675 | * If the weight and lmax (max_pkt_size) of the classes do not change, |
667 | * This is guaranteed by the input values. | 676 | * then QFQ guarantees that the slot index is never higher than |
668 | * roundedS is always cl->S rounded on grp->slot_shift bits. | 677 | * 2 + ((1<<QFQ_MTU_SHIFT)/QFQ_MIN_LMAX) * (QFQ_MAX_WEIGHT/QFQ_MAX_WSUM). |
678 | * | ||
679 | * With the current values of the above constants, the index is | ||
680 | * then guaranteed to never be higher than 2 + 256 * (1 / 16) = 18. | ||
681 | * | ||
682 | * When the weight of a class is increased or the lmax of the class is | ||
683 | * decreased, a new class with smaller slot size may happen to be | ||
684 | * activated. The activation of this class should be properly delayed | ||
685 | * to when the service of the class has finished in the ideal system | ||
686 | * tracked by QFQ. If the activation of the class is not delayed to | ||
687 | * this reference time instant, then this class may be unjustly served | ||
688 | * before other classes waiting for service. This may cause | ||
689 | * (unfrequently) the above bound to the slot index to be violated for | ||
690 | * some of these unlucky classes. | ||
691 | * | ||
692 | * Instead of delaying the activation of the new class, which is quite | ||
693 | * complex, the following inaccurate but simple solution is used: if | ||
694 | * the slot index is higher than QFQ_MAX_SLOTS-2, then the timestamps | ||
695 | * of the class are shifted backward so as to let the slot index | ||
696 | * become equal to QFQ_MAX_SLOTS-2. This threshold is used because, if | ||
697 | * the slot index is above it, then the data structure implementing | ||
698 | * the bucket list either gets immediately corrupted or may get | ||
699 | * corrupted on a possible next packet arrival that causes the start | ||
700 | * time of the group to be shifted backward. | ||
669 | */ | 701 | */ |
670 | static void qfq_slot_insert(struct qfq_group *grp, struct qfq_class *cl, | 702 | static void qfq_slot_insert(struct qfq_group *grp, struct qfq_class *cl, |
671 | u64 roundedS) | 703 | u64 roundedS) |
672 | { | 704 | { |
673 | u64 slot = (roundedS - grp->S) >> grp->slot_shift; | 705 | u64 slot = (roundedS - grp->S) >> grp->slot_shift; |
674 | unsigned int i = (grp->front + slot) % QFQ_MAX_SLOTS; | 706 | unsigned int i; /* slot index in the bucket list */ |
707 | |||
708 | if (unlikely(slot > QFQ_MAX_SLOTS - 2)) { | ||
709 | u64 deltaS = roundedS - grp->S - | ||
710 | ((u64)(QFQ_MAX_SLOTS - 2)<<grp->slot_shift); | ||
711 | cl->S -= deltaS; | ||
712 | cl->F -= deltaS; | ||
713 | slot = QFQ_MAX_SLOTS - 2; | ||
714 | } | ||
715 | |||
716 | i = (grp->front + slot) % QFQ_MAX_SLOTS; | ||
675 | 717 | ||
676 | hlist_add_head(&cl->next, &grp->slots[i]); | 718 | hlist_add_head(&cl->next, &grp->slots[i]); |
677 | __set_bit(slot, &grp->full_slots); | 719 | __set_bit(slot, &grp->full_slots); |
@@ -892,6 +934,13 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
892 | } | 934 | } |
893 | pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid); | 935 | pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid); |
894 | 936 | ||
937 | if (unlikely(cl->lmax < qdisc_pkt_len(skb))) { | ||
938 | pr_debug("qfq: increasing maxpkt from %u to %u for class %u", | ||
939 | cl->lmax, qdisc_pkt_len(skb), cl->common.classid); | ||
940 | qfq_update_reactivate_class(q, cl, cl->inv_w, | ||
941 | qdisc_pkt_len(skb), 0); | ||
942 | } | ||
943 | |||
895 | err = qdisc_enqueue(skb, cl->qdisc); | 944 | err = qdisc_enqueue(skb, cl->qdisc); |
896 | if (unlikely(err != NET_XMIT_SUCCESS)) { | 945 | if (unlikely(err != NET_XMIT_SUCCESS)) { |
897 | pr_debug("qfq_enqueue: enqueue failed %d\n", err); | 946 | pr_debug("qfq_enqueue: enqueue failed %d\n", err); |
diff --git a/net/tipc/handler.c b/net/tipc/handler.c index 111ff8300ae5..b36f0fcd9bdf 100644 --- a/net/tipc/handler.c +++ b/net/tipc/handler.c | |||
@@ -116,7 +116,6 @@ void tipc_handler_stop(void) | |||
116 | return; | 116 | return; |
117 | 117 | ||
118 | handler_enabled = 0; | 118 | handler_enabled = 0; |
119 | tasklet_disable(&tipc_tasklet); | ||
120 | tasklet_kill(&tipc_tasklet); | 119 | tasklet_kill(&tipc_tasklet); |
121 | 120 | ||
122 | spin_lock_bh(&qitem_lock); | 121 | spin_lock_bh(&qitem_lock); |