1. 07 7月, 2020 4 次提交
    • D
      Merge branch 'ethernet-sun-use-generic-power-management' · 83184b8b
      David S. Miller 提交于
      Vaibhav Gupta says:
      
      ====================
      ethernet: sun: 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 sun 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.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83184b8b
    • V
      sun/cassini: use generic power management · f193f4eb
      Vaibhav Gupta 提交于
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Compile-tested only.
      Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f193f4eb
    • V
      sun/niu: use generic power management · b0db0cc2
      Vaibhav Gupta 提交于
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      The driver was calling pci_save/restore_state() which is no more needed.
      
      Compile-tested only.
      Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0db0cc2
    • V
      sun/sungem: use generic power management · d4ce70b3
      Vaibhav Gupta 提交于
      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:
      gem_suspend() calls gem_do_stop() which in turn invokes
      pci_disable_device(). As the PCI helper function is not called at the
      end/start of the function body, breaking the function in two parts
      may change its behavior.
      
      The only other function invoking gem_do_stop() is gem_close(). Hence,
      gem_close() and gem_suspend() can do the required end steps on their own.
      
      The same case is with gem_resume(). Both gem_resume() and gem_open()
      invoke gem_do_start(). Again, make the caller functions do the required
      steps on their own.
      
      Compile-tested only.
      Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4ce70b3
  2. 06 7月, 2020 25 次提交
  3. 05 7月, 2020 11 次提交
    • D
      Merge branch 'qlogic-use-generic-power-management' · e1f04670
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      e1f04670
    • V
      qlcninc: use generic power management · 7ada9a5e
      Vaibhav Gupta 提交于
      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: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ada9a5e
    • V
      netxen_nic: use generic power management · 063ad9bc
      Vaibhav Gupta 提交于
      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: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      063ad9bc
    • C
      net: dsa: microchip: remove unused private members · b20a6b29
      Codrin Ciubotariu 提交于
      Private structure members live_ports, on_ports, rx_ports, tx_ports are
      initialized but not used anywhere. Let's remove them.
      Suggested-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b20a6b29
    • C
      net: dsa: microchip: split adjust_link() in phylink_mac_link_{up|down}() · 143a102e
      Codrin Ciubotariu 提交于
      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: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
      Reviewed-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      143a102e
    • D
      Merge branch 'mptcp-add-REUSEADDR-REUSEPORT-V6ONLY-setsockopt-support' · bdd2ed27
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      bdd2ed27
    • F
      mptcp: support IPV6_V6ONLY setsockopt · c9b95a13
      Florian Westphal 提交于
      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: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9b95a13
    • F
      mptcp: add REUSEADDR/REUSEPORT support · fd1452d8
      Florian Westphal 提交于
      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: NChristoph Paasch <cpaasch@apple.com>
      Suggested-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd1452d8
    • F
      net: use mptcp setsockopt function for SOL_SOCKET on mptcp sockets · 83f0c10b
      Florian Westphal 提交于
      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: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83f0c10b
    • T
      selftests/net: update initializer syntax to use c99 designators · f551e2fd
      Tanner Love 提交于
      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: NTanner Love <tannerlove@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f551e2fd
    • D
      Merge branch 'bnx2x-Perform-IdleChk-dump' · 565f499c
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      565f499c