1. 07 7月, 2020 10 次提交
    • A
      net: qed: cleanup global structs declarations · c6b7314d
      Alexander Lobakin 提交于
      Fix several sparse warnings by moving structs declarations into
      the corresponding header files:
      
      drivers/net/ethernet/qlogic/qed/qed_dcbx.c:2402:32: warning:
      symbol 'qed_dcbnl_ops_pass' was not declared. Should it be static?
      
      drivers/net/ethernet/qlogic/qed/qed_ll2.c:2754:26: warning: symbol
      'qed_ll2_ops_pass' was not declared. Should it be static?
      
      drivers/net/ethernet/qlogic/qed/qed_ptp.c:449:30: warning: symbol
      'qed_ptp_ops_pass' was not declared. Should it be static?
      
      drivers/net/ethernet/qlogic/qed/qed_sriov.c:5265:29: warning:
      symbol 'qed_iov_ops_pass' was not declared. Should it be static?
      
      (some of them were declared twice in different header files)
      
      Also make qed_hw_err_type_descr[] const while at it.
      Signed-off-by: NAlexander Lobakin <alobakin@marvell.com>
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6b7314d
    • A
      net: qed: move static iro_arr[] out of header file · 0dfda108
      Alexander Lobakin 提交于
      Static variables (and functions, unless they're inline) should not
      be declared in header files.
      Move the static array iro_arr[] from "qed_hsi.h" to the sole place
      where it's used, "qed_init_ops.c". This eliminates lots of warnings
      (42 of them actually) against W=1+:
      
      In file included from drivers/net/ethernet/qlogic/qed/qed.h:51:0,
                       from drivers/net/ethernet/qlogic/qed/qed_ooo.c:40:
      drivers/net/ethernet/qlogic/qed/qed_hsi.h:4421:18: warning: 'iro_arr'
      defined but not used [-Wunused-const-variable=]
       static const u32 iro_arr[] = {
                        ^~~~~~~
      Signed-off-by: NAlexander Lobakin <alobakin@marvell.com>
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0dfda108
    • S
      geneve: move all configuration under struct geneve_config · 9e06e859
      Sabrina Dubroca 提交于
      This patch adds a new structure geneve_config and moves the per-device
      configuration attributes to it, like we already have in VXLAN with
      struct vxlan_config. This ends up being pretty invasive since those
      attributes are used everywhere.
      
      This allows us to clean up the argument lists for geneve_configure (4
      arguments instead of 8) and geneve_nl2info (5 instead of 9).
      
      This also reduces the copy-paste of code setting those attributes
      between geneve_configure and geneve_changelink to a single memcpy,
      which would have avoided the bug fixed in commit
      56c09de3 ("geneve: allow changing DF behavior after creation").
      Signed-off-by: NSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e06e859
    • I
      dpaa2-eth: fix draining of S/G cache · 0fe665d4
      Ioana Ciornei 提交于
      On link down, the draining of the S/G cache should be done on all
      _possible_ CPUs not just the ones that are online in that moment.
      Fix this by changing the iterator.
      
      Fixes: d70446ee ("dpaa2-eth: send a scatter-gather FD instead of realloc-ing")
      Reported-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fe665d4
    • T
      net/amd: Remove needless assignment and the extra brank lines · bc0c3ae4
      Tang Bin 提交于
      The variable 'err = -ENODEV;' in au1000_probe() is
      duplicate, so remove redundant one. And remove the
      extra blank lines in the file au1000_eth.c
      Signed-off-by: NZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: NTang Bin <tangbin@cmss.chinamobile.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc0c3ae4
    • M
      selftests: mptcp: capture pcap on both sides · 0b8241fe
      Matthieu Baerts 提交于
      When investigating performance issues that involve latency / loss /
      reordering it is useful to have the pcap from the sender-side as it
      allows to easier infer the state of the sender's congestion-control,
      loss-recovery, etc.
      
      Allow the selftests to capture a pcap on both sender and receiver so
      that this information is not lost when reproducing.
      
      This patch also improves the file names. Instead of:
      
        ns4-5ee79a56-X4O6gS-ns3-5ee79a56-X4O6gS-MPTCP-MPTCP-10.0.3.1.pcap
      
      We now have something like for the same test:
      
        5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-connector.pcap
        5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-listener.pcap
      
      It was a connection from ns3 to ns4, better to start with ns3 then. The
      port is also added, easier to find the trace we want.
      Co-developed-by: NChristoph Paasch <cpaasch@apple.com>
      Signed-off-by: NChristoph Paasch <cpaasch@apple.com>
      Signed-off-by: NMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b8241fe
    • 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 5 次提交
    • 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