1. 06 Jul, 2020 12 commits
    • Alexander Lobakin's avatar
      net: qed: address kernel-doc warnings · 71e11a3f
      Alexander Lobakin authored
      Get rid of the kernel-doc warnings when building with W=1+ by
      rewriting the problematic doc comments according to the
      recommended format and style.
      
      Note that this only fixes problems found in C source files,
      headers aren't in scope for now.
      Signed-off-by: default avatarAlexander Lobakin <alobakin@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71e11a3f
    • Alexander Lobakin's avatar
      net: qed: correct qed_hw_err_notify() prototype · 365cd2ce
      Alexander Lobakin authored
      Change the prototype of qed_hw_err_notify() with the following:
      * constify "fmt" argument according to printk() declarations;
      * anontate it with __cold attribute to move the function out of
        the line;
      * annotate it with __printf() attribute;
      
      This eliminates W=1+ warning:
      
      drivers/net/ethernet/qlogic/qed/qed_hw.c: In function
      ‘qed_hw_err_notify’:
      drivers/net/ethernet/qlogic/qed/qed_hw.c:851:3: warning: function
      ‘qed_hw_err_notify’ might be a candidate for ‘gnu_printf’ format
      attribute [-Wsuggest-attribute=format]
       len = vsnprintf(buf, QED_HW_ERR_MAX_STR_SIZE, fmt, vl);
       ^~~
      
      as well as saves some code size:
      
      add/remove: 0/0 grow/shrink: 2/4 up/down: 40/-125 (-85)
      Function                                     old     new   delta
      qed_dmae_execute_command                    1680    1711     +31
      qed_spq_post                                1104    1113      +9
      qed_int_sp_dpc                              3554    3545      -9
      qed_mcp_cmd_and_union                       1896    1876     -20
      qed_hw_err_notify                            395     352     -43
      qed_mcp_handle_events                       2630    2577     -53
      Total: Before=368645, After=368560, chg -0.02%
      
      __printf() will also be helpful with catching bad format strings
      and arguments.
      Signed-off-by: default avatarAlexander Lobakin <alobakin@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      365cd2ce
    • Alexander Lobakin's avatar
      net: qed: cleanup global structs declarations · c6b7314d
      Alexander Lobakin authored
      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: default avatarAlexander Lobakin <alobakin@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6b7314d
    • Alexander Lobakin's avatar
      net: qed: move static iro_arr[] out of header file · 0dfda108
      Alexander Lobakin authored
      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: default avatarAlexander Lobakin <alobakin@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0dfda108
    • Sabrina Dubroca's avatar
      geneve: move all configuration under struct geneve_config · 9e06e859
      Sabrina Dubroca authored
      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: default avatarSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e06e859
    • Ioana Ciornei's avatar
      dpaa2-eth: fix draining of S/G cache · 0fe665d4
      Ioana Ciornei authored
      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: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fe665d4
    • Tang Bin's avatar
      net/amd: Remove needless assignment and the extra brank lines · bc0c3ae4
      Tang Bin authored
      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: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc0c3ae4
    • Matthieu Baerts's avatar
      selftests: mptcp: capture pcap on both sides · 0b8241fe
      Matthieu Baerts authored
      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: default avatarChristoph Paasch <cpaasch@apple.com>
      Signed-off-by: default avatarChristoph Paasch <cpaasch@apple.com>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b8241fe
    • David S. Miller's avatar
      Merge branch 'ethernet-sun-use-generic-power-management' · 83184b8b
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      83184b8b
    • Vaibhav Gupta's avatar
      sun/cassini: use generic power management · f193f4eb
      Vaibhav Gupta authored
      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: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f193f4eb
    • Vaibhav Gupta's avatar
      sun/niu: use generic power management · b0db0cc2
      Vaibhav Gupta authored
      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: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0db0cc2
    • Vaibhav Gupta's avatar
      sun/sungem: use generic power management · d4ce70b3
      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:
      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: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4ce70b3
  2. 05 Jul, 2020 28 commits