1. 19 Feb, 2024 8 commits
  2. 18 Feb, 2024 3 commits
  3. 17 Feb, 2024 6 commits
  4. 16 Feb, 2024 23 commits
    • Ivan Vecera's avatar
      i40e: Remove VEB recursion · f09cbb6c
      Ivan Vecera authored
      The VEB (virtual embedded switch) as a switch element can be
      connected according datasheet though its uplink to:
      - Physical port
      - Port Virtualizer (not used directly by i40e driver but can
        be present in MFP mode where the physical port is shared
        between PFs)
      - No uplink (aka floating VEB)
      
      But VEB uplink cannot be connected to another VEB and any attempt
      to do so results in:
      
      "i40e 0000:02:00.0: couldn't add VEB, err -EIO aq_err I40E_AQ_RC_ENOENT"
      
      that indicates "the uplink SEID does not point to valid element".
      
      Remove this logic from the driver code this way:
      
      1) For debugfs only allow to build floating VEB (uplink_seid == 0)
         or main VEB (uplink_seid == mac_seid)
      2) Do not recurse in i40e_veb_link_event() as no VEB cannot have
         sub-VEBs
      3) Ditto for i40e_veb_rebuild() + simplify the function as we know
         that the VEB for rebuild can be only the main LAN VEB or some
         of the floating VEBs
      4) In i40e_rebuild() there is no need to check veb->uplink_seid
         as the possible ones are 0 and MAC SEID
      5) In i40e_vsi_release() do not take into account VEBs whose
         uplink is another VEB as this is not possible
      6) Remove veb_idx field from i40e_veb as a VEB cannot have
         sub-VEBs
      
      Tested using i40e debugfs interface:
      1) Initial state
      [root@cnb-03 net-next]# CMD="/sys/kernel/debug/i40e/0000:02:00.0/command"
      [root@cnb-03 net-next]# echo dump switch > $CMD
      [root@cnb-03 net-next]# dmesg -c
      [   98.440641] i40e 0000:02:00.0: header: 3 reported 3 total
      [   98.446053] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [   98.452593] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [   98.458856] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      
      2) Add floating VEB
      [root@cnb-03 net-next]# echo add relay > $CMD
      [root@cnb-03 net-next]# dmesg -c
      [  122.745630] i40e 0000:02:00.0: added relay 162
      [root@cnb-03 net-next]# echo dump switch > $CMD
      [root@cnb-03 net-next]# dmesg -c
      [  136.650049] i40e 0000:02:00.0: header: 4 reported 4 total
      [  136.655466] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  136.661994] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  136.668264] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      [  136.674787] i40e 0000:02:00.0: type=17 seid=162 uplink=0 downlink=0
      
      3) Add VMDQ2 VSI to this new VEB
      [root@cnb-03 net-next]# dmesg -c
      [  168.351763] i40e 0000:02:00.0: added VSI 394 to relay 162
      [  168.374652] enp2s0f0np0v0: NIC Link is Up, 40 Gbps Full Duplex, Flow Control: None
      [root@cnb-03 net-next]# echo dump switch > $CMD
      [root@cnb-03 net-next]# dmesg -c
      [  195.683204] i40e 0000:02:00.0: header: 5 reported 5 total
      [  195.688611] i40e 0000:02:00.0: type=19 seid=394 uplink=162 downlink=16
      [  195.695143] i40e 0000:02:00.0: type=17 seid=162 uplink=0 downlink=0
      [  195.701410] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  195.707935] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  195.714201] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      
      4) Try to delete the VEB
      [root@cnb-03 net-next]# echo del relay 162 > $CMD
      [root@cnb-03 net-next]# dmesg -c
      [  239.260901] i40e 0000:02:00.0: deleting relay 162
      [  239.265621] i40e 0000:02:00.0: can't remove VEB 162 with 1 VSIs left
      
      5) Do PF reset and check switch status after rebuild
      [root@cnb-03 net-next]# echo pfr > $CMD
      [root@cnb-03 net-next]# echo dump switch > $CMD
      [root@cnb-03 net-next]# dmesg -c
      ...
      [  272.333655] i40e 0000:02:00.0: header: 5 reported 5 total
      [  272.339066] i40e 0000:02:00.0: type=19 seid=394 uplink=162 downlink=16
      [  272.345599] i40e 0000:02:00.0: type=17 seid=162 uplink=0 downlink=0
      [  272.351862] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  272.358387] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  272.364654] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      
      6) Delete VSI and delete VEB
      [  297.199116] i40e 0000:02:00.0: deleting VSI 394
      [  299.807580] i40e 0000:02:00.0: deleting relay 162
      [  309.767905] i40e 0000:02:00.0: header: 3 reported 3 total
      [  309.773318] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  309.779845] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  309.786111] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      f09cbb6c
    • Ivan Vecera's avatar
      i40e: Fix broken support for floating VEBs · 08cdde31
      Ivan Vecera authored
      Although the i40e supports so-called floating VEB (VEB without
      an uplink connection to external network), this support is
      broken. This functionality is currently unused (except debugfs)
      but it will be used by subsequent series for switchdev mode
      slow-path. Fix this by following:
      
      1) Handle correctly floating VEB (VEB with uplink_seid == 0)
         in i40e_reconstitute_veb() and look for owner VSI and
         create it only for non-floating VEBs and also set bridge
         mode only for such VEBs as the floating ones are using
         always VEB mode.
      2) Handle correctly floating VEB in i40e_veb_release() and
         disallow its release when there are some VSIs. This is
         different from regular VEB that have owner VSI that is
         connected to VEB's uplink after VEB deletion by FW.
      3) Fix i40e_add_veb() to handle 'vsi' that is NULL for floating
         VEBs. For floating VEB use 0 for downlink SEID and 'true'
         for 'default_port' parameters as per datasheet.
      4) Fix 'add relay' command in i40e_dbg_command_write() to allow
         to create floating VEB by 'add relay 0 0' or 'add relay'
      
      Tested using debugfs:
      1) Initial state
      [root@host net-next]# echo dump switch > $CMD
      [root@host net-next]# dmesg -c
      [  173.701286] i40e 0000:02:00.0: header: 3 reported 3 total
      [  173.706701] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  173.713241] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  173.719507] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      
      2) Add floating VEB
      [root@host net-next]# CMD="/sys/kernel/debug/i40e/0000:02:00.0/command"
      [root@host net-next]# echo add relay > $CMD
      [root@host net-next]# dmesg -c
      [  245.551720] i40e 0000:02:00.0: added relay 162
      [root@host net-next]# echo dump switch > $CMD
      [root@host net-next]# dmesg -c
      [  276.984371] i40e 0000:02:00.0: header: 4 reported 4 total
      [  276.989779] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  276.996302] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  277.002569] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      [  277.009091] i40e 0000:02:00.0: type=17 seid=162 uplink=0 downlink=0
      
      3) Add VMDQ2 VSI to this new VEB
      [root@host net-next]# echo add vsi 162 > $CMD
      [root@host net-next]# dmesg -c
      [  332.314030] i40e 0000:02:00.0: added VSI 394 to relay 162
      [  332.337486] enp2s0f0np0v0: NIC Link is Up, 40 Gbps Full Duplex, Flow Control: None
      [root@host net-next]# echo dump switch > $CMD
      [root@host net-next]# dmesg -c
      [  387.284490] i40e 0000:02:00.0: header: 5 reported 5 total
      [  387.289904] i40e 0000:02:00.0: type=19 seid=394 uplink=162 downlink=16
      [  387.296446] i40e 0000:02:00.0: type=17 seid=162 uplink=0 downlink=0
      [  387.302708] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  387.309234] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  387.315500] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      
      4) Try to delete the VEB
      [root@host net-next]# echo del relay 162 > $CMD
      [root@host net-next]# dmesg -c
      [  428.749297] i40e 0000:02:00.0: deleting relay 162
      [  428.754011] i40e 0000:02:00.0: can't remove VEB 162 with 1 VSIs left
      
      5) Do PF reset and check switch status after rebuild
      [root@host net-next]# echo pfr > $CMD
      [root@host net-next]# echo dump switch > $CMD
      [root@host net-next]# dmesg -c
      [  738.056172] i40e 0000:02:00.0: header: 5 reported 5 total
      [  738.061577] i40e 0000:02:00.0: type=19 seid=394 uplink=162 downlink=16
      [  738.068104] i40e 0000:02:00.0: type=17 seid=162 uplink=0 downlink=0
      [  738.074367] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [  738.080892] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [  738.087160] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      
      6) Delete VSI and delete VEB
      [root@host net-next]# echo del vsi 394 > $CMD
      [root@host net-next]# echo del relay 162 > $CMD
      [root@host net-next]# echo dump switch > $CMD
      [root@host net-next]# dmesg -c
      [ 1233.081126] i40e 0000:02:00.0: deleting VSI 394
      [ 1239.345139] i40e 0000:02:00.0: deleting relay 162
      [ 1244.886920] i40e 0000:02:00.0: header: 3 reported 3 total
      [ 1244.892328] i40e 0000:02:00.0: type=19 seid=392 uplink=160 downlink=16
      [ 1244.898853] i40e 0000:02:00.0: type=17 seid=160 uplink=2 downlink=0
      [ 1244.905119] i40e 0000:02:00.0: type=19 seid=390 uplink=160 downlink=16
      Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      08cdde31
    • Ivan Vecera's avatar
      i40e: Add helpers to find VSI and VEB by SEID and use them · b7fac08d
      Ivan Vecera authored
      Add two helpers i40e_(veb|vsi)_get_by_seid() to find corresponding
      VEB or VSI by their SEID value and use these helpers to replace
      existing open-coded loops.
      Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b7fac08d
    • Ivan Vecera's avatar
      i40e: Introduce and use macros for iterating VSIs and VEBs · b1f1b46f
      Ivan Vecera authored
      Introduce i40e_for_each_vsi() and i40e_for_each_veb() helper
      macros and use them to iterate relevant arrays.
      
      Replace pattern:
      for (i = 0; i < pf->num_alloc_vsi; i++)
      by:
      i40e_for_each_vsi(pf, i, vsi)
      
      and pattern:
      for (i = 0; i < I40E_MAX_VEB; i++)
      by
      i40e_for_each_veb(pf, i, veb)
      
      These macros also check if array item pf->vsi[i] or pf->veb[i]
      are not NULL and skip such items so we can remove redundant
      checks from loop bodies.
      Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      b1f1b46f
    • Ivan Vecera's avatar
      i40e: Use existing helper to find flow director VSI · 7e6cec7d
      Ivan Vecera authored
      Use existing i40e_find_vsi_by_type() to find a VSI
      associated with flow director.
      Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      7e6cec7d
    • Christian Marangi's avatar
      net: phy: aquantia: add AQR113 PHY ID · 71b605d3
      Christian Marangi authored
      Add Aquantia AQR113 PHY ID. Aquantia AQR113 is just a chip size variant of
      the already supported AQR133C where the only difference is the PHY ID
      and the hw chip size.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71b605d3
    • Diogo Ivo's avatar
      net: ti: icssg-prueth: Remove duplicate cleanup calls in emac_ndo_stop() · 1d085e9c
      Diogo Ivo authored
      Remove the duplicate calls to prueth_emac_stop() and
      prueth_cleanup_tx_chns() in emac_ndo_stop().
      Signed-off-by: default avatarDiogo Ivo <diogo.ivo@siemens.com>
      Reviewed-by: default avatarRoger Quadros <rogerq@kernel.org>
      Reviewed-by: default avatarMD Danish Anwar <danishanwar@ti.com>
      Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d085e9c
    • Geert Uytterhoeven's avatar
      tcp: Spelling s/curcuit/circuit/ · 21bd52ea
      Geert Uytterhoeven authored
      Fix a misspelling of "circuit".
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21bd52ea
    • David S. Miller's avatar
      Merge branch 'ionic-xdp-support' · d70a2a45
      David S. Miller authored
      Shannon Nelson says:
      
      ====================
      ionic: add XDP support
      
      This patchset is new support in ionic for XDP processing,
      including basic XDP on Rx packets, TX and REDIRECT, and frags
      for jumbo frames.
      
      Since ionic has not yet been converted to use the page_pool APIs,
      this uses the simple MEM_TYPE_PAGE_ORDER0 buffering.  There are plans
      to convert the driver in the near future.
      
      v4:
       - removed "inline" from short utility functions
       - changed to use "goto err_out" in ionic_xdp_register_rxq_info()
       - added "continue" to reduce nesting in ionic_xdp_queues_config()
       - used xdp_prog in ionic_rx_clean() to flag whether or not to sync
         the rx buffer after calling ionix_xdp_run()
       - swapped order of XDP_TX and XDP_REDIRECT cases in ionic_xdp_run()
         to make patch 6 a little cleaner
      
      v3:
      https://lore.kernel.org/netdev/20240210004827.53814-1-shannon.nelson@amd.com/
       - removed budget==0 patch, sent it separately to net
      
      v2:
      https://lore.kernel.org/netdev/20240208005725.65134-1-shannon.nelson@amd.com/
       - added calls to txq_trans_cond_update()
       - added a new patch to catch NAPI budget==0
      
      v1:
      https://lore.kernel.org/netdev/20240130013042.11586-1-shannon.nelson@amd.com/
      
      RFC:
      https://lore.kernel.org/netdev/20240118192500.58665-1-shannon.nelson@amd.com/
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d70a2a45
    • Shannon Nelson's avatar
      ionic: implement xdp frags support · 5377805d
      Shannon Nelson authored
      Add support for using scatter-gather / frags in XDP in both
      Rx and Tx paths.
      Co-developed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5377805d
    • Shannon Nelson's avatar
      ionic: add ndo_xdp_xmit · 26f5726a
      Shannon Nelson authored
      When our ndo_xdp_xmit is called we mark the buffer with
      XDP_REDIRECT so we know to return it to the XDP stack for
      cleaning.
      Co-developed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26f5726a
    • Shannon Nelson's avatar
      ionic: Add XDP_REDIRECT support · 587fc3f0
      Shannon Nelson authored
      The XDP_REDIRECT packets are given to the XDP stack and
      we drop the use of the related page: it will get freed
      by the driver that ends up doing the Tx.  Because we have
      some hardware configurations with limited queue resources,
      we use the existing datapath Tx queues rather than creating
      and managing a separate set of xdp_tx queues.
      Co-developed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      587fc3f0
    • Shannon Nelson's avatar
      ionic: Add XDP_TX support · 8eeed837
      Shannon Nelson authored
      The XDP_TX packets get fed back into the Rx queue's partnered
      Tx queue as an xdp_frame.
      Co-developed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8eeed837
    • Shannon Nelson's avatar
      ionic: Add XDP packet headroom · f81da39b
      Shannon Nelson authored
      If an xdp program is loaded, add headroom at the beginning
      of the frame to allow for editing and insertions that an XDP
      program might need room for, and tailroom used later for XDP
      frame tracking.  These are only needed in the first Rx buffer
      in a packet, not for any trailing frags.
      Co-developed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f81da39b
    • Shannon Nelson's avatar
      ionic: add initial framework for XDP support · 180e35cd
      Shannon Nelson authored
      Set up the basics for running Rx packets through XDP programs.
      Add new queue setup and teardown steps for adding/removing an
      XDP program, and add the call to run the XDP on a packet.
      
      The XDP frame size needs to be the MTU plus standard ethernet
      header, plus head room for XDP scribblings and tail room for a
      struct skb_shared_info.  Also, at this point, we don't support
      XDP frags, only a single contiguous Rx buffer.  This means
      that our page splitting is not very useful, so when XDP is in
      use we need to use the full Rx buffer size and not do sharing.
      Co-developed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      180e35cd
    • Shannon Nelson's avatar
      ionic: use dma range APIs · d67ee210
      Shannon Nelson authored
      Convert Rx datapath handling to use the DMA range APIs
      in preparation for adding XDP handling.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d67ee210
    • Shannon Nelson's avatar
      ionic: add helpers for accessing buffer info · 97538c14
      Shannon Nelson authored
      These helpers clean up some of the code around DMA mapping
      and other buffer references, and will be used in the next
      few patches for the XDP support.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      97538c14
    • Shannon Nelson's avatar
      ionic: set adminq irq affinity · c699f35d
      Shannon Nelson authored
      We claim to have the AdminQ on our irq0 and thus cpu id 0,
      but we need to be sure we set the affinity hint to try to
      keep it there.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c699f35d
    • Alexander Gordeev's avatar
      net/iucv: fix virtual vs physical address confusion · 2210c548
      Alexander Gordeev authored
      Fix virtual vs physical address confusion. This does not fix a bug
      since virtual and physical address spaces are currently the same.
      Acked-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2210c548
    • David S. Miller's avatar
      Merge branch 'ravb-rutime-PM-support' · fc136368
      David S. Miller authored
      Claudiu Beznea says:
      
      ====================
      net: ravb: Add runtime PM support (part 2)
      
      Series adds runtime PM support for the ravb driver. This is a continuation
      of [1].
      
      There are 5 more preparation patches (patches 1-5) and patch 6
      adds runtime PM support.
      
      Patches in this series were part of [2].
      
      Changes in v4:
      - remove unnecessary code from patch 4/6
      - improve the code in patch 5/6
      
      Changes in v3:
      - fixed typos
      - added patch "net: ravb: Move the update of ndev->features to
        ravb_set_features()"
      - changes title of patch "net: ravb: Do not apply RX checksum
        settings to hardware if the interface is down" from v2 into
        "net: ravb: Do not apply features to hardware if the interface
        is down", changed patch description and updated the patch
      - collected tags
      
      Changes in v2:
      - address review comments
      - in patch 4/5 take into account the latest changes introduced
        in ravb_set_features_gbeth()
      
      Changes since [2]:
      - patch 1/5 is new
      - use pm_runtime_get_noresume() and pm_runtime_active() in patches
        3/5, 4/5
      - fixed higlighted typos in patch 4/5
      
      [1] https://lore.kernel.org/all/20240202084136.3426492-1-claudiu.beznea.uj@bp.renesas.com/
      [2] https://lore.kernel.org/all/20240105082339.1468817-1-claudiu.beznea.uj@bp.renesas.com/
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc136368
    • Claudiu Beznea's avatar
      net: ravb: Add runtime PM support · 48f894ab
      Claudiu Beznea authored
      Add runtime PM support for the ravb driver. As the driver is used by
      different IP variants, with different behaviors, to be able to have the
      runtime PM support available for all devices, the preparatory commits
      moved all the resources parsing and allocations in the driver's probe
      function and kept the settings for ravb_open(). This is due to the fact
      that on some IP variants-platforms tuples disabling/enabling the clocks
      will switch the IP to the reset operation mode where register contents is
      lost and reconfiguration needs to be done. For this the rabv_open()
      function enables the clocks, switches the IP to configuration mode, applies
      all the register settings and switches the IP to the operational mode. At
      the end of ravb_open() IP is ready to send/receive data.
      
      In ravb_close() necessary reverts are done (compared with ravb_open()), the
      IP is switched to reset mode and clocks are disabled.
      
      The ethtool APIs or IOCTLs that might execute while the interface is down
      are either cached (and applied in ravb_open()) or rejected (as at that time
      the IP is in reset mode). Keeping the IP in the reset mode also increases
      the power saved (according to the hardware manual).
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
      Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48f894ab
    • Claudiu Beznea's avatar
      net: ravb: Do not apply features to hardware if the interface is down · a71a50e3
      Claudiu Beznea authored
      Do not apply features to hardware if the interface is down. In case runtime
      PM is enabled, and while the interface is down, the IP will be in reset
      mode (as for some platforms disabling the clocks will switch the IP to
      reset mode, which will lead to losing register contents) and applying
      settings in reset mode is not an option. Instead, cache the features and
      apply them in ravb_open() through ravb_emac_init().
      
      To avoid accessing the hardware while the interface is down
      pm_runtime_active() check was introduced. Along with it the device runtime
      PM usage counter has been incremented to avoid disabling the device clocks
      while the check is in progress (if any).
      
      Commit prepares for the addition of runtime PM.
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
      Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a71a50e3
    • Claudiu Beznea's avatar
      net: ravb: Move the update of ndev->features to ravb_set_features() · 7bddccc9
      Claudiu Beznea authored
      Commit c2da9408 ("ravb: Add Rx checksum offload support for GbEth")
      introduced support for setting GbEth features. With this the IP-specific
      features update functions update the ndev->features individually.
      
      Next commits add runtime PM support for the ravb driver. The runtime PM
      implementation will enable/disable the IP clocks on
      the ravb_open()/ravb_close() functions. Accessing the IP registers with
      clocks disabled blocks the system.
      
      The ravb_set_features() function could be executed when the Ethernet
      interface is closed so we need to ensure we don't access IP registers while
      the interface is down when runtime PM support will be in place.
      
      For these, move the update of ndev->features to ravb_set_features(). In
      this way we update the ndev->features only when the IP-specific features
      set function returns success and we can avoid code duplication when
      introducing runtime PM registers protection.
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
      Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7bddccc9