Skip to content
  1. Nov 22, 2019
  2. Nov 21, 2019
  3. Nov 20, 2019
    • Geert Uytterhoeven's avatar
      mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n · 6e4ff1c9
      Geert Uytterhoeven authored
      Commit 1d463956 ("mdio_bus: Fix PTR_ERR applied after initialization
      to constant") accidentally changed a check from -ENOTSUPP to -ENOSYS,
      causing failures if reset controller support is not enabled.  E.g. on
      r7s72100/rskrza1:
      
          sh-eth e8203000.ethernet: MDIO init failed: -524
          sh-eth: probe of e8203000.ethernet failed with error -524
      
      Seen on r8a7740/armadillo, r7s72100/rskrza1, and r7s9210/rza2mevb.
      
      Fixes: 1d463956
      
       ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: YueHaibing <yuehaibing@huawei.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e4ff1c9
    • David S. Miller's avatar
      Revert "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled" · 2c61e821
      David S. Miller authored
      This reverts commit 075e238d
      
      .
      
      Going to go with Geert's fix instead, which also has a
      correct Fixes tag.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c61e821
    • Huazhong Tan's avatar
      net: hns3: fix a wrong reset interrupt status mask · 74e78d6b
      Huazhong Tan authored
      According to hardware user manual, bits5~7 in register
      HCLGE_MISC_VECTOR_INT_STS means reset interrupts status,
      but HCLGE_RESET_INT_M is defined as bits0~2 now. So it
      will make hclge_reset_err_handle() read the wrong reset
      interrupt status.
      
      This patch fixes this wrong bit mask.
      
      Fixes: 2336f19d
      
       ("net: hns3: check reset interrupt status when reset fails")
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74e78d6b
    • Chuhong Yuan's avatar
      net: fec: fix clock count mis-match · a31eda65
      Chuhong Yuan authored
      pm_runtime_put_autosuspend in probe will call runtime suspend to
      disable clks automatically if CONFIG_PM is defined. (If CONFIG_PM
      is not defined, its implementation will be empty, then runtime
      suspend will not be called.)
      
      Therefore, we can call pm_runtime_get_sync to runtime resume it
      first to enable clks, which matches the runtime suspend. (Only when
      CONFIG_PM is defined, otherwise pm_runtime_get_sync will also be
      empty, then runtime resume will not be called.)
      
      Then it is fine to disable clks without causing clock count mis-match.
      
      Fixes: c43eab3e
      
       ("net: fec: add missed clk_disable_unprepare in remove")
      Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
      Acked-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a31eda65
    • Davide Caratti's avatar
      net/sched: act_pedit: fix WARN() in the traffic path · f67169fe
      Davide Caratti authored
      when configuring act_pedit rules, the number of keys is validated only on
      addition of a new entry. This is not sufficient to avoid hitting a WARN()
      in the traffic path: for example, it is possible to replace a valid entry
      with a new one having 0 extended keys, thus causing splats in dmesg like:
      
       pedit BUG: index 42
       WARNING: CPU: 2 PID: 4054 at net/sched/act_pedit.c:410 tcf_pedit_act+0xc84/0x1200 [act_pedit]
       [...]
       RIP: 0010:tcf_pedit_act+0xc84/0x1200 [act_pedit]
       Code: 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ac 00 00 00 48 8b 44 24 10 48 c7 c7 a0 c4 e4 c0 8b 70 18 e8 1c 30 95 ea <0f> 0b e9 a0 fa ff ff e8 00 03 f5 ea e9 14 f4 ff ff 48 89 58 40 e9
       RSP: 0018:ffff888077c9f320 EFLAGS: 00010286
       RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffffac2983a2
       RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff888053927bec
       RBP: dffffc0000000000 R08: ffffed100a726209 R09: ffffed100a726209
       R10: 0000000000000001 R11: ffffed100a726208 R12: ffff88804beea780
       R13: ffff888079a77400 R14: ffff88804beea780 R15: ffff888027ab2000
       FS:  00007fdeec9bd740(0000) GS:ffff888053900000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 00007ffdb3dfd000 CR3: 000000004adb4006 CR4: 00000000001606e0
       Call Trace:
        tcf_action_exec+0x105/0x3f0
        tcf_classify+0xf2/0x410
        __dev_queue_xmit+0xcbf/0x2ae0
        ip_finish_output2+0x711/0x1fb0
        ip_output+0x1bf/0x4b0
        ip_send_skb+0x37/0xa0
        raw_sendmsg+0x180c/0x2430
        sock_sendmsg+0xdb/0x110
        __sys_sendto+0x257/0x2b0
        __x64_sys_sendto+0xdd/0x1b0
        do_syscall_64+0xa5/0x4e0
        entry_SYSCALL_64_after_hwframe+0x49/0xbe
       RIP: 0033:0x7fdeeb72e993
       Code: 48 8b 0d e0 74 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 0d d6 2c 00 00 75 13 49 89 ca b8 2c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 4b cc 00 00 48 89 04 24
       RSP: 002b:00007ffdb3de8a18 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
       RAX: ffffffffffffffda RBX: 000055c81972b700 RCX: 00007fdeeb72e993
       RDX: 0000000000000040 RSI: 000055c81972b700 RDI: 0000000000000003
       RBP: 00007ffdb3dea130 R08: 000055c819728510 R09: 0000000000000010
       R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040
       R13: 000055c81972b6c0 R14: 000055c81972969c R15: 0000000000000080
      
      Fix this moving the check on 'nkeys' earlier in tcf_pedit_init(), so that
      attempts to install rules having 0 keys are always rejected with -EINVAL.
      
      Fixes: 1da177e4
      
       ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f67169fe
    • Russell King's avatar
      net: phylink: fix link mode modification in PHY mode · d9922c0e
      Russell King authored
      
      
      Modifying the link settings via phylink_ethtool_ksettings_set() and
      phylink_ethtool_set_pauseparam() didn't always work as intended for
      PHY based setups, as calling phylink_mac_config() would result in the
      unresolved configuration being committed to the MAC, rather than the
      configuration with the speed and duplex setting.
      
      This would work fine if the update caused the link to renegotiate,
      but if no settings have changed, phylib won't trigger a renegotiation
      cycle, and the MAC will be left incorrectly configured.
      
      Avoid calling phylink_mac_config() unless we are using an inband mode
      in phylink_ethtool_ksettings_set(), and use phy_set_asym_pause() as
      introduced in 4.20 to set the PHY settings in
      phylink_ethtool_set_pauseparam().
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9922c0e
    • Russell King's avatar
      net: phylink: update documentation on create and destroy · 269a6b5f
      Russell King authored
      
      
      Update the documentation on phylink's create and destroy functions to
      explicitly state that the rtnl lock must not be held while calling
      these.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      269a6b5f
    • Corinna Vinschen's avatar
      r8169: disable TSO on a single version of RTL8168c to fix performance · a0783cd0
      Corinna Vinschen authored
      During performance testing, I found that one of my r8169 NICs suffered
      a major performance loss, a 8168c model.
      
      Running netperf's TCP_STREAM test didn't return the expected
      throughput of > 900 Mb/s, but rather only about 22 Mb/s.  Strange
      enough, running the TCP_MAERTS and UDP_STREAM tests all returned with
      throughput > 900 Mb/s, as did TCP_STREAM with the other r8169 NICs I can
      test (either one of 8169s, 8168e, 8168f).
      
      Bisecting turned up commit 93681cd7,
      "r8169: enable HW csum and TSO" as the culprit.
      
      I added my 8168c version, RTL_GIGA_MAC_VER_22, to the code
      special-casing the 8168evl as per the patch below.  This fixed the
      performance problem for me.
      
      Fixes: 93681cd7
      
       ("r8169: enable HW csum and TSO")
      Signed-off-by: default avatarCorinna Vinschen <vinschen@redhat.com>
      Reviewed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0783cd0
    • Zhu Yanjun's avatar
      MAINTAINERS: forcedeth: Change Zhu Yanjun's email address · c9d55b62
      Zhu Yanjun authored
      
      
      I prefer to use my personal email address for kernel related work.
      
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Acked-by: default avatarRain River <rain.1986.08.12@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c9d55b62
    • Ivan Khoronzhuk's avatar
      taprio: don't reject same mqprio settings · b5a0faa3
      Ivan Khoronzhuk authored
      The taprio qdisc allows to set mqprio setting but only once. In case
      if mqprio settings are provided next time the error is returned as
      it's not allowed to change traffic class mapping in-flignt and that
      is normal. But if configuration is absolutely the same - no need to
      return error. It allows to provide same command couple times,
      changing only base time for instance, or changing only scheds maps,
      but leaving mqprio setting w/o modification. It more corresponds the
      message: "Changing the traffic mapping of a running schedule is not
      supported", so reject mqprio if it's really changed.
      
      Also corrected TC_BITMASK + 1 for consistency, as proposed.
      
      Fixes: a3d43c0d
      
       ("taprio: Add support adding an admin schedule")
      Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Tested-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Acked-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5a0faa3
    • Willem de Bruijn's avatar
      net/tls: enable sk_msg redirect to tls socket egress · d4ffb02d
      Willem de Bruijn authored
      Bring back tls_sw_sendpage_locked. sk_msg redirection into a socket
      with TLS_TX takes the following path:
      
        tcp_bpf_sendmsg_redir
          tcp_bpf_push_locked
            tcp_bpf_push
              kernel_sendpage_locked
                sock->ops->sendpage_locked
      
      Also update the flags test in tls_sw_sendpage_locked to allow flag
      MSG_NO_SHARED_FRAGS. bpf_tcp_sendmsg sets this.
      
      Link: https://lore.kernel.org/netdev/CA+FuTSdaAawmZ2N8nfDDKu3XLpXBbMtcCT0q4FntDD2gn8ASUw@mail.gmail.com/T/#t
      Link: https://github.com/wdebruij/kerneltools/commits/icept.2
      Fixes: 0608c69c ("bpf: sk_msg, sock{map|hash} redirect through ULP")
      Fixes: f3de19af
      
       ("Revert \"net/tls: remove unused function tls_sw_sendpage_locked\"")
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4ffb02d
    • Adi Suresh's avatar
      gve: fix dma sync bug where not all pages synced · db96c2cb
      Adi Suresh authored
      The previous commit had a bug where the last page in the memory range
      could not be synced. This change fixes the behavior so that all the
      required pages are synced.
      
      Fixes: 9cfeeb57
      
       ("gve: Fixes DMA synchronization")
      Signed-off-by: default avatarAdi Suresh <adisuresh@google.com>
      Reviewed-by: default avatarCatherine Sullivan <csully@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db96c2cb
  4. Nov 19, 2019
    • Marek Behún's avatar
      mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled · 075e238d
      Marek Behún authored
      
      
      When CONFIG_RESET_CONTROLLER is disabled, the
      devm_reset_control_get_exclusive function returns -ENOTSUPP. This is not
      handled in subsequent check and then the mdio device fails to probe.
      
      When CONFIG_RESET_CONTROLLER is enabled, its code checks in OF for reset
      device, and since it is not present, returns -ENOENT. -ENOENT is handled.
      Add -ENOTSUPP also.
      
      This happened to me when upgrading kernel on Turris Omnia. You either
      have to enable CONFIG_RESET_CONTROLLER or use this patch.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Fixes: 71dd6c0d
      
       ("net: phy: add support for reset-controller")
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      075e238d