1. 14 Feb, 2024 7 commits
    • Sasha Neftin's avatar
      igc: Remove temporary workaround · 55ea9899
      Sasha Neftin authored
      PHY_CONTROL register works as defined in the IEEE 802.3 specification
      (IEEE 802.3-2008 22.2.4.1). Tidy up the temporary workaround.
      
      User impact: PHY can now be powered down when the ethernet link is down.
      
      Testing hints: ip link set down <device> (or just disconnect the
      ethernet cable).
      
      Oldest tested NVM version is: 1045:740.
      
      Fixes: 5586838f ("igc: Add code for PHY support")
      Signed-off-by: default avatarSasha Neftin <sasha.neftin@intel.com>
      Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      55ea9899
    • Kunwu Chan's avatar
      igb: Fix string truncation warnings in igb_set_fw_version · c56d0558
      Kunwu Chan authored
      Commit 1978d3ea ("intel: fix string truncation warnings")
      fixes '-Wformat-truncation=' warnings in igb_main.c by using kasprintf.
      
      drivers/net/ethernet/intel/igb/igb_main.c:3092:53: warning:‘%d’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 1 and 13 [-Wformat-truncation=]
       3092 |                                  "%d.%d, 0x%08x, %d.%d.%d",
            |                                                     ^~
      drivers/net/ethernet/intel/igb/igb_main.c:3092:34: note:directive argument in the range [0, 65535]
       3092 |                                  "%d.%d, 0x%08x, %d.%d.%d",
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/intel/igb/igb_main.c:3092:34: note:directive argument in the range [0, 65535]
      drivers/net/ethernet/intel/igb/igb_main.c:3090:25: note:‘snprintf’ output between 23 and 43 bytes into a destination of size 32
      
      kasprintf() returns a pointer to dynamically allocated memory
      which can be NULL upon failure.
      
      Fix this warning by using a larger space for adapter->fw_version,
      and then fall back and continue to use snprintf.
      
      Fixes: 1978d3ea ("intel: fix string truncation warnings")
      Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
      Cc: Kunwu Chan <kunwu.chan@hotmail.com>
      Suggested-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      c56d0558
    • Arnd Bergmann's avatar
      ethernet: cpts: fix function pointer cast warnings · 9b23fceb
      Arnd Bergmann authored
      clang-16 warns about the mismatched prototypes for the devm_* callbacks:
      
      drivers/net/ethernet/ti/cpts.c:691:12: error: cast from 'void (*)(struct clk_hw *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
        691 |                                        (void(*)(void *))clk_hw_unregister_mux,
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      include/linux/device.h:406:34: note: expanded from macro 'devm_add_action_or_reset'
        406 |         __devm_add_action_or_reset(dev, action, data, #action)
            |                                         ^~~~~~
      drivers/net/ethernet/ti/cpts.c:703:12: error: cast from 'void (*)(struct device_node *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
        703 |                                        (void(*)(void *))of_clk_del_provider,
            |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      include/linux/device.h:406:34: note: expanded from macro 'devm_add_action_or_reset'
        406 |         __devm_add_action_or_reset(dev, action, data, #action)
      
      Use separate helper functions for this instead, using the expected prototypes
      with a void* argument.
      
      Fixes: a3047a81 ("net: ethernet: ti: cpts: add support for ext rftclk selection")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b23fceb
    • Arnd Bergmann's avatar
      bnad: fix work_queue type mismatch · 5d07e432
      Arnd Bergmann authored
      clang-16 warns about a function pointer cast:
      
      drivers/net/ethernet/brocade/bna/bnad.c:1995:4: error: cast from 'void (*)(struct delayed_work *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
       1995 |                         (work_func_t)bnad_tx_cleanup);
      drivers/net/ethernet/brocade/bna/bnad.c:2252:4: error: cast from 'void (*)(void *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
       2252 |                         (work_func_t)(bnad_rx_cleanup));
      
      The problem here is mixing up work_struct and delayed_work, which relies
      the former being the first member of the latter.
      
      Change the code to use consistent types here to address the warning and
      make it more robust against workqueue interface changes.
      
      Side note: the use of a delayed workqueue for cleaning up TX descriptors
      is probably a bad idea since this introduces a noticeable delay. The
      driver currently does not appear to use BQL, but if one wanted to add
      that, this would have to be changed as well.
      
      Fixes: 01b54b14 ("bna: tx rx cleanup fix")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d07e432
    • Dmitry Antipov's avatar
      net: smc: fix spurious error message from __sock_release() · 6cf9ff46
      Dmitry Antipov authored
      Commit 67f562e3 ("net/smc: transfer fasync_list in case of fallback")
      leaves the socket's fasync list pointer within a container socket as well.
      When the latter is destroyed, '__sock_release()' warns about its non-empty
      fasync list, which is a dangling pointer to previously freed fasync list
      of an underlying TCP socket. Fix this spurious warning by nullifying
      fasync list of a container socket.
      
      Fixes: 67f562e3 ("net/smc: transfer fasync_list in case of fallback")
      Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cf9ff46
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · d9a31cda
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2024-02-12 (i40e)
      
      This series contains updates to i40e driver only.
      
      Ivan Vecera corrects the looping value used while waiting for queues to
      be disabled as well as an incorrect mask being used for DCB
      configuration.
      
      Maciej resolves an issue related to XDP traffic; removing a double call to
      i40e_pf_rxq_wait() and accounting for XDP rings when stopping rings.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9a31cda
    • Subbaraya Sundeep's avatar
      octeontx2-af: Remove the PF_FUNC validation for NPC transmit rules · 858b3113
      Subbaraya Sundeep authored
      NPC transmit side mcam rules can use the pcifunc (in packet metadata
      added by hardware) of transmitting device for mcam lookup similar to
      the channel of receiving device at receive side.
      The commit 18603683 ("octeontx2-af: Remove channel verification
      while installing MCAM rules") removed the receive side channel
      verification to save hardware MCAM filters while switching packets
      across interfaces but missed removing transmit side checks.
      This patch removes transmit side rules validation.
      
      Fixes: 18603683 ("octeontx2-af: Remove channel verification while installing MCAM rules")
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      858b3113
  2. 13 Feb, 2024 19 commits
  3. 12 Feb, 2024 13 commits
  4. 10 Feb, 2024 1 commit
    • David S. Miller's avatar
      Merge branch 'tls-fixes' · 78e563f2
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      net: tls: fix some issues with async encryption
      
      valis was reporting a race on socket close so I sat down to try to fix it.
      I used Sabrina's async crypto debug patch to test... and in the process
      run into some of the same issues, and created very similar fixes :(
      I didn't realize how many of those patches weren't applied. Once I found
      Sabrina's code [1] it turned out to be so similar in fact that I added
      her S-o-b's and Co-develop'eds in a semi-haphazard way.
      
      With this series in place all expected tests pass with async crypto.
      Sabrina had a few more fixes, but I'll leave those to her, things are
      not crashing anymore.
      
      [1] https://lore.kernel.org/netdev/cover.1694018970.git.sd@queasysnail.net/
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78e563f2