Skip to content
Snippets Groups Projects
  1. Jul 07, 2023
  2. Jun 29, 2023
    • Vladimir Oltean's avatar
      net: mscc: ocelot: don't keep PTP configuration of all ports in single structure · 45d0fcb5
      Vladimir Oltean authored
      
      In a future change, the driver will need to determine whether PTP RX
      timestamping is enabled on a port (including whether traps were set up
      on that port in particular) and that is currently not possible.
      
      The driver supports different RX filters (L2, L4) and kinds of TX
      timestamping (one-step, two-step) on its ports, but it saves all
      configuration in a single struct hwtstamp_config that is global to the
      switch. So, the latest timestamping configuration on one port
      (including a request to disable timestamping) affects what gets reported
      for all ports, even though the configuration itself is still individual
      to each port.
      
      The port timestamping configurations are only coupled because of the
      common structure, so replace the hwtstamp_config with a mask of trapped
      protocols saved per port. We also have the ptp_cmd to distinguish
      between one-step and two-step PTP timestamping, so with those 2 bits of
      information we can fully reconstruct a descriptive struct
      hwtstamp_config for each port, during the SIOCGHWTSTAMP ioctl.
      
      Fixes: 4e3b0468 ("net: mscc: PTP Hardware Clock (PHC) support")
      Fixes: 96ca08c0 ("net: mscc: ocelot: set up traps for PTP packets")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      45d0fcb5
  3. Jun 23, 2023
  4. May 16, 2023
  5. Apr 24, 2023
  6. Apr 18, 2023
  7. Apr 14, 2023
  8. Apr 13, 2023
    • Stephen Boyd's avatar
      clk: starfive: Avoid casting iomem pointers · d1aae066
      Stephen Boyd authored
      
      Let's use a wrapper struct for the auxiliary_device made in
      jh7110_reset_controller_register() so that we can stop casting iomem
      pointers. The casts trip up tools like sparse, and make for some awkward
      casts that are largely unnecessary. While we're here, change the
      allocation from devm and actually free the auxiliary_device memory in
      the release function. This avoids any use after free problems where the
      parent device driver is unbound from the device but the
      auxiliuary_device is still in use accessing devm freed memory.
      
      Cc: Tommaso Merciai <tomm.merciai@gmail.com>
      Cc: Emil Renner Berthing <emil.renner.berthing@canonical.com>
      Cc: Hal Feng <hal.feng@starfivetech.com>
      Cc: Conor Dooley <conor.dooley@microchip.com>
      Cc: Xingyu Wu <xingyu.wu@starfivetech.com>
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Fixes: edab7204 ("clk: starfive: Add StarFive JH7110 system clock driver")
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      Link: https://lore.kernel.org/r/20230413205528.4044216-1-sboyd@kernel.org
      d1aae066
  9. Apr 07, 2023
  10. Mar 20, 2023
  11. Mar 05, 2023
  12. Feb 07, 2023
  13. Jan 31, 2023
  14. Jan 23, 2023
    • Vladimir Oltean's avatar
      net: mscc: ocelot: add MAC Merge layer support for VSC9959 · 6505b680
      Vladimir Oltean authored
      
      Felix (VSC9959) has a DEV_GMII:MM_CONFIG block composed of 2 registers
      (ENABLE_CONFIG and VERIF_CONFIG). Because the MAC Merge statistics and
      pMAC statistics are already in the Ocelot switch lib even if just Felix
      supports them, I'm adding support for the whole MAC Merge layer in the
      common Ocelot library too.
      
      There is an interrupt (shared with the PTP interrupt) which signals
      changes to the MM verification state. This is done because the
      preemptible traffic classes should be committed to hardware only once
      the verification procedure has declared the link partner of being
      capable of receiving preemptible frames.
      
      We implement ethtool getters and setters for the MAC Merge layer state.
      The "TX enabled" and "verify status" are taken from the IRQ handler,
      using a mutex to ensure serialized access.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6505b680
    • Vladimir Oltean's avatar
      net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959 · ab3f97a9
      Vladimir Oltean authored
      
      The Felix VSC9959 switch supports frame preemption and has a MAC Merge
      layer. In addition to the structured stats that exist for the eMAC,
      export the counters associated with its pMAC (pause, RMON, MAC, PHY,
      control) plus the high-level MAC Merge layer stats. The unstructured
      ethtool counters, as well as the rtnl_link_stats64 were left to report
      only the eMAC counters.
      
      Because statistics processing is quite self-contained in ocelot_stats.c
      now, I've opted for introducing an ocelot->mm_supported bool, based on
      which the common switch lib does everything, rather than pushing the
      TSN-specific code in felix_vsc9959.c, as happens for other TSN stuff.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab3f97a9
  15. Jan 10, 2023
  16. Dec 05, 2022
  17. Nov 25, 2022
  18. Nov 22, 2022
  19. Nov 21, 2022
  20. Nov 17, 2022
  21. Nov 11, 2022
  22. Nov 10, 2022
  23. Nov 01, 2022
  24. Oct 28, 2022
Loading