1. 19 9月, 2017 6 次提交
  2. 17 9月, 2017 2 次提交
  3. 16 9月, 2017 6 次提交
    • S
      netvsc: increase default receive buffer size · 5023a6db
      Stephen Hemminger 提交于
      The default receive buffer size was reduced by recent change
      to a value which was appropriate for 10G and Windows Server 2016.
      But the value is too small for full performance with 40G on Azure.
      Increase the default back to maximum supported by host.
      
      Fixes: 8b532797 ("netvsc: allow controlling send/recv buffer size")
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5023a6db
    • G
      net: smsc911x: Quieten netif during suspend · 2aa70f86
      Geert Uytterhoeven 提交于
      If the network interface is kept running during suspend, the net core
      may call net_device_ops.ndo_start_xmit() while the Ethernet device is
      still suspended, which may lead to a system crash.
      
      E.g. on sh73a0/kzm9g and r8a73a4/ape6evm, the external Ethernet chip is
      driven by a PM controlled clock.  If the Ethernet registers are accessed
      while the clock is not running, the system will crash with an imprecise
      external abort.
      
      As this is a race condition with a small time window, it is not so easy
      to trigger at will.  Using pm_test may increase your chances:
      
          # echo 0 > /sys/module/printk/parameters/console_suspend
          # echo platform > /sys/power/pm_test
          # echo mem > /sys/power/state
      
      To fix this, make sure the network interface is quietened during
      suspend.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2aa70f86
    • F
      net: systemport: Fix 64-bit stats deadlock · 7095c973
      Florian Fainelli 提交于
      We can enter a deadlock situation because there is no sufficient protection
      when ndo_get_stats64() runs in process context to guard against RX or TX NAPI
      contexts running in softirq, this can lead to the following lockdep splat and
      actual deadlock was experienced as well with an iperf session in the background
      and a while loop doing ifconfig + ethtool.
      
      [    5.780350] ================================
      [    5.784679] WARNING: inconsistent lock state
      [    5.789011] 4.13.0-rc7-02179-g32fae27c725d #70 Not tainted
      [    5.794561] --------------------------------
      [    5.798890] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [    5.804971] swapper/0/0 [HC0[0]:SC1[1]:HE0:SE0] takes:
      [    5.810175]  (&syncp->seq#2){+.?...}, at: [<c0768a28>] bcm_sysport_tx_reclaim+0x30/0x54
      [    5.818327] {SOFTIRQ-ON-W} state was registered at:
      [    5.823278]   bcm_sysport_get_stats64+0x17c/0x258
      [    5.828053]   dev_get_stats+0x38/0xac
      [    5.831776]   rtnl_fill_stats+0x30/0x118
      [    5.835761]   rtnl_fill_ifinfo+0x538/0xe24
      [    5.839921]   rtmsg_ifinfo_build_skb+0x6c/0xd8
      [    5.844430]   rtmsg_ifinfo_event.part.5+0x14/0x44
      [    5.849201]   rtmsg_ifinfo+0x20/0x28
      [    5.852837]   register_netdevice+0x628/0x6b8
      [    5.857171]   register_netdev+0x14/0x24
      [    5.861051]   bcm_sysport_probe+0x30c/0x438
      [    5.865280]   platform_drv_probe+0x50/0xb0
      [    5.869418]   driver_probe_device+0x2e8/0x450
      [    5.873817]   __driver_attach+0x104/0x120
      [    5.877871]   bus_for_each_dev+0x7c/0xc0
      [    5.881834]   bus_add_driver+0x1b0/0x270
      [    5.885797]   driver_register+0x78/0xf4
      [    5.889675]   do_one_initcall+0x54/0x190
      [    5.893646]   kernel_init_freeable+0x144/0x1d0
      [    5.898135]   kernel_init+0x8/0x110
      [    5.901665]   ret_from_fork+0x14/0x2c
      [    5.905363] irq event stamp: 24263
      [    5.908804] hardirqs last  enabled at (24262): [<c08eecf0>] net_rx_action+0xc4/0x4e4
      [    5.916624] hardirqs last disabled at (24263): [<c0a7da00>] _raw_spin_lock_irqsave+0x1c/0x98
      [    5.925143] softirqs last  enabled at (24258): [<c022a7fc>] irq_enter+0x84/0x98
      [    5.932524] softirqs last disabled at (24259): [<c022a918>] irq_exit+0x108/0x16c
      [    5.939985]
      [    5.939985] other info that might help us debug this:
      [    5.946576]  Possible unsafe locking scenario:
      [    5.946576]
      [    5.952556]        CPU0
      [    5.955031]        ----
      [    5.957506]   lock(&syncp->seq#2);
      [    5.960955]   <Interrupt>
      [    5.963604]     lock(&syncp->seq#2);
      [    5.967227]
      [    5.967227]  *** DEADLOCK ***
      [    5.967227]
      [    5.973222] 1 lock held by swapper/0/0:
      [    5.977092]  #0:  (&(&ring->lock)->rlock){..-...}, at: [<c0768a18>] bcm_sysport_tx_reclaim+0x20/0x54
      
      So just remove the u64_stats_update_begin()/end() pair in ndo_get_stats64()
      since it does not appear to be useful for anything. No inconsistency was
      observed with either ifconfig or ethtool, global TX counts equal the sum of
      per-queue TX counts on a 32-bit architecture.
      
      Fixes: 10377ba7 ("net: systemport: Support 64bit statistics")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7095c973
    • A
      net: vrf: avoid gcc-4.6 warning · ecf09117
      Arnd Bergmann 提交于
      When building an allmodconfig kernel with gcc-4.6, we get a rather
      odd warning:
      
      drivers/net/vrf.c: In function ‘vrf_ip6_input_dst’:
      drivers/net/vrf.c:964:3: error: initialized field with side-effects overwritten [-Werror]
      drivers/net/vrf.c:964:3: error: (near initialization for ‘fl6’) [-Werror]
      
      I have no idea what this warning is even trying to say, but it does
      seem like a false positive. Reordering the initialization in to match
      the structure definition gets rid of the warning, and might also avoid
      whatever gcc thinks is wrong here.
      
      Fixes: 9ff74384 ("net: vrf: Handle ipv6 multicast and link-local addresses")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ecf09117
    • H
      qed: remove unnecessary call to memset · 4739df62
      Himanshu Jha 提交于
      call to memset to assign 0 value immediately after allocating
      memory with kzalloc is unnecesaary as kzalloc allocates the memory
      filled with 0 value.
      
      Semantic patch used to resolve this issue:
      
      @@
      expression e,e2; constant c;
      statement S;
      @@
      
        e = kzalloc(e2, c);
        if(e == NULL) S
      - memset(e, 0, e2);
      Signed-off-by: NHimanshu Jha <himanshujha199640@gmail.com>
      Signed-off-by: NHimanshu Jha <himanshujha199640@gmail.com>
      Acked-by: NSudarsana Kalluru <sudarsana.kalluru@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4739df62
    • K
      Input: i8042 - add Gigabyte P57 to the keyboard reset table · 697c5d8a
      Kai-Heng Feng 提交于
      Similar to other Gigabyte laptops, the touchpad on P57 requires a
      keyboard reset to detect Elantech touchpad correctly.
      
      BugLink: https://bugs.launchpad.net/bugs/1594214Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      697c5d8a
  4. 15 9月, 2017 2 次提交
    • B
      Revert "PCI: Avoid race while enabling upstream bridges" · 0f50a49e
      Bjorn Helgaas 提交于
      This reverts commit 40f11adc.
      
      Jens found that iwlwifi firmware loading failed on a Lenovo X1 Carbon,
      gen4:
      
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-34.ucode failed with error -2
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-33.ucode failed with error -2
        iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-32.ucode failed with error -2
        iwlwifi 0000:04:00.0: loaded firmware version 31.532993.0 op_mode iwlmvm
        iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208
        ...
        iwlwifi 0000:04:00.0: Failed to load firmware chunk!
        iwlwifi 0000:04:00.0: Could not load the [0] uCode section
        iwlwifi 0000:04:00.0: Failed to start INIT ucode: -110
        iwlwifi 0000:04:00.0: Failed to run INIT ucode: -110
      
      He bisected it to 40f11adc ("PCI: Avoid race while enabling upstream
      bridges").  Revert that commit to fix the regression.
      
      Link: http://lkml.kernel.org/r/4bcbcbc1-7c79-09f0-5071-bc2f53bf6574@kernel.dk
      Fixes: 40f11adc ("PCI: Avoid race while enabling upstream bridges")
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Srinath Mannam <srinath.mannam@broadcom.com>
      CC: Jens Axboe <axboe@kernel.dk>
      CC: Luca Coelho <luca@coelho.fi>
      CC: Johannes Berg <johannes@sipsolutions.net>
      CC: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
      0f50a49e
    • C
      tg3: clean up redundant initialization of tnapi · 23f48222
      Colin Ian King 提交于
      tnapi is being initialized and then immediately updated and
      hence the initialiation is redundant.  Clean up the warning
      by moving the declaration and initialization to the inside
      of the for-loop.
      
      Cleans up clang scan-build warning:
      warning: Value stored to 'tnapi' during its initialization is never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23f48222
  5. 14 9月, 2017 16 次提交
  6. 13 9月, 2017 6 次提交
  7. 12 9月, 2017 2 次提交
    • D
      pinctrl/amd: save pin registers over suspend/resume · 79d2c8be
      Daniel Drake 提交于
      The touchpad in the Asus laptop models X505BA/BP and X542BA/BP is
      unresponsive after suspend/resume. The following error appears during
      resume:
      
        i2c_hid i2c-ELAN1300:00: failed to reset device.
      
      The problem here is that i2c_hid does not notice the interrupt being
      generated at this point, because the GPIO is no longer configured
      for interrupts.
      
      Fix this by saving pinctrl-amd pin registers during suspend and
      restoring them at resume time.
      
      Based on code from pinctrl-intel.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Drake <drake@endlessm.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      79d2c8be
    • G
      pinctrl: armada-37xx: Fix gpio interrupt setup · a9a1a483
      Gregory CLEMENT 提交于
      Since commit dc749a09 ("gpiolib: allow gpio irqchip to map irqs
      dynamically"), the irqs for gpio are not statically allocated during in
      gpiochip_irqchip_add.
      
      This driver was based on this assumption for initializing the mask
      associated to each interrupt this led to a NULL pointer crash in the
      kernel:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      Mem abort info:
        Exception class = DABT (current EL), IL = 32 bits
        SET = 0, FnV = 0
        EA = 0, S1PTW = 0
      Data abort info:
        ISV = 0, ISS = 0x00000068
        CM = 0, WnR = 1
      [0000000000000000] user address but active_mm is swapper
      Internal error: Oops: 96000044 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-06657-g3b9f8ed2 #576
      Hardware name: Marvell Armada 3720 Development Board DB-88F3720-DDR3 (DT)
      task: ffff80001d908000 task.stack: ffff000008068000
      PC is at armada_37xx_pinctrl_probe+0x5f8/0x670
      LR is at armada_37xx_pinctrl_probe+0x5e8/0x670
      pc : [<ffff000008e25cdc>] lr : [<ffff000008e25ccc>] pstate: 60000045
      sp : ffff00000806bb80
      x29: ffff00000806bb80 x28: 0000000000000024
      x27: 000000000000000c x26: 0000000000000001
      x25: ffff80001efee760 x24: 0000000000000000
      x23: ffff80001db6f570 x22: ffff80001db6f438
      x21: 0000000000000000 x20: ffff80001d9f4810
      x19: ffff80001db6f418 x18: 0000000000000000
      x17: 0000000000000001 x16: 0000000000000019
      x15: ffffffffffffffff x14: 0140000000000000
      x13: 0000000000000000 x12: 0000000000000030
      x11: 0101010101010101 x10: 0000000000000040
      x9 : ffff000009923580 x8 : ffff80001d400248
      x7 : ffff80001d400270 x6 : 0000000000000000
      x5 : ffff80001d400248 x4 : ffff80001d400270
      x3 : 0000000000000000 x2 : 0000000000000001
      x1 : 0000000000000001 x0 : 0000000000000000
      Process swapper/0 (pid: 1, stack limit = 0xffff000008068000)
      Call trace:
      Exception stack(0xffff00000806ba40 to 0xffff00000806bb80)
      ba40: 0000000000000000 0000000000000001 0000000000000001 0000000000000000
      ba60: ffff80001d400270 ffff80001d400248 0000000000000000 ffff80001d400270
      ba80: ffff80001d400248 ffff000009923580 0000000000000040 0101010101010101
      baa0: 0000000000000030 0000000000000000 0140000000000000 ffffffffffffffff
      bac0: 0000000000000019 0000000000000001 0000000000000000 ffff80001db6f418
      bae0: ffff80001d9f4810 0000000000000000 ffff80001db6f438 ffff80001db6f570
      bb00: 0000000000000000 ffff80001efee760 0000000000000001 000000000000000c
      bb20: 0000000000000024 ffff00000806bb80 ffff000008e25ccc ffff00000806bb80
      bb40: ffff000008e25cdc 0000000060000045 ffff00000806bb60 ffff0000081189b8
      bb60: ffffffffffffffff ffff00000811cf1c ffff00000806bb80 ffff000008e25cdc
      [<ffff000008e25cdc>] armada_37xx_pinctrl_probe+0x5f8/0x670
      [<ffff00000859d8c8>] platform_drv_probe+0x58/0xb8
      [<ffff00000859bb44>] driver_probe_device+0x22c/0x2d8
      [<ffff00000859bcac>] __driver_attach+0xbc/0xc0
      [<ffff000008599c84>] bus_for_each_dev+0x4c/0x98
      [<ffff00000859b440>] driver_attach+0x20/0x28
      [<ffff00000859af90>] bus_add_driver+0x1b8/0x228
      [<ffff00000859c648>] driver_register+0x60/0xf8
      [<ffff00000859df64>] __platform_driver_probe+0x74/0x130
      [<ffff000008e256dc>] armada_37xx_pinctrl_driver_init+0x20/0x28
      [<ffff000008083980>] do_one_initcall+0x38/0x128
      [<ffff000008e00cf4>] kernel_init_freeable+0x188/0x22c
      [<ffff0000089b56e8>] kernel_init+0x10/0x100
      [<ffff000008084bb0>] ret_from_fork+0x10/0x18
      Code: f9403fa2 12001341 1100075a 9ac12041 (b9000001)
      ---[ end trace 8b0f4e05e1603208 ]---
      
      This patch moves the initialization of the mask field in the irq_startup
      function. However some callbacks such as irq_set_type and irq_set_wake
      could be called before irq_startup. For those functions the mask is
      computed at each call which is not a issue as these functions are not
      located in a hot path but are used sporadically for configuration.
      
      Fixes: dc749a09 ("gpiolib: allow gpio irqchip to map irqs
      dynamically")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a9a1a483