1. 04 6月, 2021 4 次提交
    • V
      net: pcs: xpcs: convert to phylink_pcs_ops · 11059740
      Vladimir Oltean 提交于
      Since all the remaining members of struct mdio_xpcs_ops have direct
      equivalents in struct phylink_pcs_ops, it is about time we remove it
      altogether.
      
      Since the phylink ops return void, we need to remove the error
      propagation from the various xpcs methods and simply print an error
      message where appropriate.
      
      Since xpcs_get_state_c73() detects link faults and attempts to reset the
      link on its own by calling xpcs_config(), but xpcs_config() now has a
      lot of phylink arguments which are not needed and cannot be simply
      fabricated by anybody else except phylink, the actual implementation has
      been moved into a smaller xpcs_do_config().
      
      The const struct mdio_xpcs_ops *priv->hw->xpcs has been removed, so we
      need to look at the struct mdio_xpcs_args pointer now as an indication
      whether the port has an XPCS or not.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11059740
    • V
      net: pcs: xpcs: export xpcs_probe · 8e2bb956
      Vladimir Oltean 提交于
      Similar to the other recently functions, it is not necessary for
      xpcs_probe to be a function pointer, so export it so that it can be
      called directly.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e2bb956
    • V
      net: pcs: xpcs: export xpcs_config_eee · 14b517cb
      Vladimir Oltean 提交于
      There is no good reason why we need to go through:
      
      stmmac_xpcs_config_eee
      -> stmmac_do_callback
         -> mdio_xpcs_ops->config_eee
            -> xpcs_config_eee
      
      when we can simply call xpcs_config_eee.
      
      priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
      as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
      done that way because the mdio_bus_data pointer might or might not be
      populated in all stmmac instantiations.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14b517cb
    • V
      net: pcs: xpcs: export xpcs_validate · a1a753ed
      Vladimir Oltean 提交于
      Calling a function pointer with a single implementation through
      struct mdio_xpcs_ops is clunky, and the stmmac_do_callback system forces
      this to return int, even though it always returns zero.
      
      Simply remove the "validate" function pointer from struct mdio_xpcs_ops
      and replace it with an exported xpcs_validate symbol which is called
      directly by stmmac.
      
      priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
      as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
      done that way because the mdio_bus_data pointer might or might not be
      populated in all stmmac instantiations.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1a753ed
  2. 02 6月, 2021 1 次提交
  3. 18 5月, 2021 1 次提交
  4. 01 5月, 2021 1 次提交
  5. 15 4月, 2021 1 次提交
  6. 01 4月, 2021 1 次提交
  7. 26 3月, 2021 1 次提交
  8. 25 3月, 2021 2 次提交
  9. 19 3月, 2021 2 次提交
  10. 18 3月, 2021 1 次提交
  11. 27 2月, 2021 2 次提交
  12. 31 10月, 2020 1 次提交
  13. 12 9月, 2020 1 次提交
  14. 31 3月, 2020 1 次提交
  15. 18 3月, 2020 1 次提交
  16. 10 3月, 2020 1 次提交
  17. 14 1月, 2020 2 次提交
  18. 19 12月, 2019 4 次提交
  19. 17 11月, 2019 1 次提交
  20. 12 11月, 2019 1 次提交
  21. 07 10月, 2019 1 次提交
  22. 05 9月, 2019 2 次提交
  23. 18 8月, 2019 4 次提交
    • J
      net: stmmac: Add support for VLAN Insertion Offload · 30d93227
      Jose Abreu 提交于
      Adds the logic to insert a given VLAN ID in a packet. This is offloaded
      to HW and its descriptor based. For now, only XGMAC implements the
      necessary callbacks.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30d93227
    • J
      net: stmmac: Add support for SA Insertion/Replacement in XGMAC cores · 8000ddc0
      Jose Abreu 提交于
      Add the support for Source Address Insertion and Replacement in XGMAC
      cores. Two methods are supported: Descriptor based and register based.
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8000ddc0
    • J
      net: stmmac: Add Split Header support and enable it in XGMAC cores · 67afd6d1
      Jose Abreu 提交于
      Add the support for Split Header feature in the RX path and enable it in
      XGMAC cores.
      
      This does not impact neither beneficts bandwidth but it does reduces CPU
      usage because without the feature all the entire packet is memcpy'ed,
      while that with the feature only the header is.
      
      With Split Header disabled 'perf stat -d' gives:
      86870.624945 task-clock (msec)      #    0.429 CPUs utilized
           1073352 context-switches       #    0.012 M/sec
                 1 cpu-migrations         #    0.000 K/sec
               213 page-faults            #    0.002 K/sec
      327113872376 cycles                 #    3.766 GHz (62.53%)
       56618161216 instructions           #    0.17  insn per cycle (75.06%)
       10742205071 branches               #  123.658 M/sec (75.36%)
         584309242 branch-misses          #    5.44% of all branches (75.19%)
       17594787965 L1-dcache-loads        #  202.540 M/sec (74.88%)
        4003773131 L1-dcache-load-misses  #   22.76% of all L1-dcache hits (74.89%)
        1313301468 LLC-loads              #   15.118 M/sec (49.75%)
         355906510 LLC-load-misses        #   27.10% of all LL-cache hits (49.92%)
      
      With Split Header enabled 'perf stat -d' gives:
      49324.456539 task-clock (msec)     #    0.245 CPUs utilized
           2542387 context-switches      #    0.052 M/sec
                 1 cpu-migrations        #    0.000 K/sec
               213 page-faults           #    0.004 K/sec
      177092791469 cycles                #    3.590 GHz (62.30%)
       68555756017 instructions          #    0.39  insn per cycle (75.16%)
       12697019382 branches              #  257.418 M/sec (74.81%)
         442081897 branch-misses         #    3.48% of all branches (74.79%)
       20337958358 L1-dcache-loads       #  412.330 M/sec (75.46%)
        3820210140 L1-dcache-load-misses #   18.78% of all L1-dcache hits (75.35%)
        1257719198 LLC-loads             #   25.499 M/sec (49.73%)
         685543923 LLC-load-misses       #   54.51% of all LL-cache hits (49.86%)
      
      Changes from v2:
      	- Reword commit message (Jakub)
      Changes from v1:
      	- Add performance info (David)
      	- Add misssing dma_sync_single_for_device()
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67afd6d1
    • J
      net: stmmac: Get correct timestamp values from XGMAC · 25e80cd0
      Jose Abreu 提交于
      TX Timestamp in XGMAC comes from MAC instead of descriptors. Implement
      this in a new callback.
      
      Also, RX Timestamp in XGMAC must be cheked against corruption and we need
      a barrier to make sure that descriptor fields are read correctly.
      
      Changes from v2:
      	- Rework return code check (Jakub)
      Changes from v1:
      	- Rework the get timestamp function (David)
      Signed-off-by: NJose Abreu <joabreu@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25e80cd0
  24. 09 8月, 2019 3 次提交