1. Jul 07, 2020
  2. Jul 06, 2020
  3. Jul 05, 2020
    • 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