1. 05 Jul, 2020 16 commits
    • Vladimir Oltean's avatar
      net: dsa: felix: clarify the intention of writes to MII_BMCR · 3f2628d6
      Vladimir Oltean authored
      The driver appears to write to BMCR_SPEED and BMCR_DUPLEX, fields which
      are read-only, since they are actually configured through the
      vendor-specific IF_MODE (0x14) register.
      
      But the reason we're writing back the read-only values of MII_BMCR is to
      alter these writable fields:
      
      BMCR_RESET
      BMCR_LOOPBACK
      BMCR_ANENABLE
      BMCR_PDOWN
      BMCR_ISOLATE
      BMCR_ANRESTART
      
      In particular, the only field which is really relevant to this driver is
      BMCR_ANENABLE. Clarify that intention by spelling it out, using
      phy_set_bits and phy_clear_bits.
      
      The driver also made a few writes to BMCR_RESET and BMCR_ANRESTART which
      are unnecessary and may temporarily disrupt the link to the PHY. Remove
      them.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f2628d6
    • David S. Miller's avatar
      Merge branch 'qlogic-use-generic-power-management' · e1f04670
      David S. Miller authored
      Vaibhav Gupta says:
      
      ====================
      qlogic: use generic power management
      
      Linux Kernel Mentee: Remove Legacy Power Management.
      
      The purpose of this patch series is to remove legacy power management callbacks
      from qlogic ethernet drivers.
      
      The callbacks performing suspend() and resume() operations are still calling
      pci_save_state(), pci_set_power_state(), etc. and handling the power management
      themselves, which is not recommended.
      
      The conversion requires the removal of the those function calls and change the
      callback definition accordingly and make use of dev_pm_ops structure.
      
      All patches are compile-tested only.
      
      V2: Fix unused variable warning in v1.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1f04670
    • Vaibhav Gupta's avatar
      qlcninc: use generic power management · 7ada9a5e
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and taking care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      .suspend() calls __qlcnic_shutdown, which then calls qlcnic_82xx_shutdown;
      .resume()  calls __qlcnic_resume,   which then calls qlcnic_82xx_resume;
      
      Both ...82xx..() are define in
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c and are used only in
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c.
      
      Hence upgrade them and remove PCI function calls, like pci_save_state() and
      pci_enable_wake(), inside them
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ada9a5e
    • Vaibhav Gupta's avatar
      netxen_nic: use generic power management · 063ad9bc
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      In this driver:
      netxen_nic_resume() calls netxen_nic_attach_func() which then invokes PCI
      helper functions like pci_enable_device(), pci_set_power_state() and
      pci_restore_state(). Other function:
       - netxen_io_slot_reset()
      also calls netxen_nic_attach_func().
      
      Also, netxen_io_slot_reset() returns specific value based on the return value
      of netxen_nic_attach_func() as whole. Thus, cannot simply move some piece of
      code from netxen_nic_attach_func() to it.
      
      Hence, define a new function netxen_nic_attach_late_func() to do the tasks
      which has to be done after PCI helper functions have done their job.
      
      Now, netxen_nic_attach_func() invokes netxen_nic_attach_late_func(), thus
      netxen_io_slot_reset() behaves normally.
      And, netxen_nic_resume() calls netxen_nic_attach_late_func() to avoid PCI
      helper functions calls.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      063ad9bc
    • Codrin Ciubotariu's avatar
      net: dsa: microchip: remove unused private members · b20a6b29
      Codrin Ciubotariu authored
      Private structure members live_ports, on_ports, rx_ports, tx_ports are
      initialized but not used anywhere. Let's remove them.
      Suggested-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b20a6b29
    • Codrin Ciubotariu's avatar
      net: dsa: microchip: split adjust_link() in phylink_mac_link_{up|down}() · 143a102e
      Codrin Ciubotariu authored
      The DSA subsystem moved to phylink and adjust_link() became deprecated in
      the process. This patch removes adjust_link from the KSZ DSA switches and
      adds phylink_mac_link_up() and phylink_mac_link_down().
      Signed-off-by: default avatarCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
      Reviewed-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      143a102e
    • David S. Miller's avatar
      Merge branch 'mptcp-add-REUSEADDR-REUSEPORT-V6ONLY-setsockopt-support' · bdd2ed27
      David S. Miller authored
      Florian Westphal says:
      
      ====================
      mptcp: add REUSEADDR/REUSEPORT/V6ONLY setsockopt support
      
      restarting an mptcp-patched sshd yields following error:
      
        sshd: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
        sshd: error: setsockopt IPV6_V6ONLY: Operation not supported
        sshd: error: Bind to port 22 on :: failed: Address already in use.
        sshd: fatal: Cannot bind any address.
      
      This series adds support for the needed setsockopts:
      
      First patch skips the generic SOL_SOCKET handler for MPTCP:
      in mptcp case, the setsockopt needs to alter the tcp socket, not the mptcp
      parent socket.
      
      Second patch adds minimal SOL_SOCKET support: REUSEPORT and REUSEADDR.
      Rest is still handled by the generic SOL_SOCKET code.
      
      Last patch adds IPV6ONLY support.  This makes ipv6 work for openssh:
      It creates two listening sockets, before this patch, binding the ipv6
      socket will fail because the port is already bound by the ipv4 one.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bdd2ed27
    • Florian Westphal's avatar
      mptcp: support IPV6_V6ONLY setsockopt · c9b95a13
      Florian Westphal authored
      Without this, Opensshd fails to open an ipv6 socket listening
      socket:
        error: setsockopt IPV6_V6ONLY: Operation not supported
        error: Bind to port 22 on :: failed: Address already in use.
      
      Opensshd opens an ipv4 and and ipv6 listening socket, but because
      IPV6_V6ONLY setsockopt fails, the port number is already in use.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c9b95a13
    • Florian Westphal's avatar
      mptcp: add REUSEADDR/REUSEPORT support · fd1452d8
      Florian Westphal authored
      This will e.g. make 'sshd restart' work when MPTCP is used, as we will
      now set this option on the listener socket instead of only the mptcp
      socket (where it has no effect).
      
      We still need to copy the setting to the master socket so that a
      subsequent getsockopt() returns the expected value.
      Reported-by: default avatarChristoph Paasch <cpaasch@apple.com>
      Suggested-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd1452d8
    • Florian Westphal's avatar
      net: use mptcp setsockopt function for SOL_SOCKET on mptcp sockets · 83f0c10b
      Florian Westphal authored
      setsockopt(mptcp_fd, SOL_SOCKET, ...)...  appears to work (returns 0),
      but it has no effect -- this is because the MPTCP layer never has a
      chance to copy the settings to the subflow socket.
      
      Skip the generic handling for the mptcp case and instead call the
      mptcp specific handler instead for SOL_SOCKET too.
      
      Next patch adds more specific handling for SOL_SOCKET to mptcp.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83f0c10b
    • Tanner Love's avatar
      selftests/net: update initializer syntax to use c99 designators · f551e2fd
      Tanner Love authored
      Before, clang version 9 threw errors such as: error:
      use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                      { tstamp: true, swtstamp: true }
                        ^~~~~~~
                        .tstamp =
      Fix these warnings in tools/testing/selftests/net in the same manner as
      commit 121e357a ("selftests/harness: Update named initializer syntax").
      N.B. rxtimestamp.c is the only affected file in the directory.
      Signed-off-by: default avatarTanner Love <tannerlove@google.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f551e2fd
    • David S. Miller's avatar
      Merge branch 'bnx2x-Perform-IdleChk-dump' · 565f499c
      David S. Miller authored
      Sudarsana Reddy Kalluru says:
      
      ====================
      bnx2x: Perform IdleChk dump.
      
      Idlechk test verifies that the chip is in idle state. If there are any
      errors, Idlechk dump would capture the same. This data will help in
      debugging the device related issues.
      The patch series adds driver support for dumping IdleChk data during the
      debug dump collection.
      Patch (1) adds register definitions required in this implementation.
      Patch (2) adds the implementation for Idlechk tests.
      Patch (3) adds driver changes to invoke Idlechk implementation.
      
      Changes from previous version:
      -------------------------------
      v3: Combined the test data creation and implementation to a single patch.
      v2: Addressed issues reported by kernel test robot.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      565f499c
    • Sudarsana Reddy Kalluru's avatar
      bnx2x: Perform Idlechk dump during the debug collection. · a4666570
      Sudarsana Reddy Kalluru authored
      The patch adds driver changes to perform Idlechk dump during the debug
      data collection.
      Signed-off-by: default avatarSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4666570
    • Sudarsana Reddy Kalluru's avatar
      bnx2x: Add support for idlechk tests. · cdf711f2
      Sudarsana Reddy Kalluru authored
      This patch populates a database of idlechk tests (registers and
      predicates) and performs the idlechk using this data.
      Signed-off-by: default avatarSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cdf711f2
    • Sudarsana Reddy Kalluru's avatar
      bnx2x: Add Idlechk related register definitions. · 4365f35b
      Sudarsana Reddy Kalluru authored
      The patch adds register definitions required for Idlechk implementation.
      Signed-off-by: default avatarSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4365f35b
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · f91c031e
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2020-07-04
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      We've added 73 non-merge commits during the last 17 day(s) which contain
      a total of 106 files changed, 5233 insertions(+), 1283 deletions(-).
      
      The main changes are:
      
      1) bpftool ability to show PIDs of processes having open file descriptors
         for BPF map/program/link/BTF objects, relying on BPF iterator progs
         to extract this info efficiently, from Andrii Nakryiko.
      
      2) Addition of BPF iterator progs for dumping TCP and UDP sockets to
         seq_files, from Yonghong Song.
      
      3) Support access to BPF map fields in struct bpf_map from programs
         through BTF struct access, from Andrey Ignatov.
      
      4) Add a bpf_get_task_stack() helper to be able to dump /proc/*/stack
         via seq_file from BPF iterator progs, from Song Liu.
      
      5) Make SO_KEEPALIVE and related options available to bpf_setsockopt()
         helper, from Dmitry Yakunin.
      
      6) Optimize BPF sk_storage selection of its caching index, from Martin
         KaFai Lau.
      
      7) Removal of redundant synchronize_rcu()s from BPF map destruction which
         has been a historic leftover, from Alexei Starovoitov.
      
      8) Several improvements to test_progs to make it easier to create a shell
         loop that invokes each test individually which is useful for some CIs,
         from Jesper Dangaard Brouer.
      
      9) Fix bpftool prog dump segfault when compiled without skeleton code on
         older clang versions, from John Fastabend.
      
      10) Bunch of cleanups and minor improvements, from various others.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f91c031e
  2. 03 Jul, 2020 24 commits