1. 15 Jun, 2020 10 commits
  2. 11 May, 2020 4 commits
    • Christian Kellner's avatar
      boltctl: show the link speed, if available · fc530dcb
      Christian Kellner authored
      If the link speed contains non-zero values for lanes and speed
      show the details of rx and tx speed. Insert before authflags to
      to be sore that something is before us and something is after
      us so we don't need extra logic to know what tree element to
      insert ("branch" or "right").
    • Christian Kellner's avatar
      cli/device: expose LinkSpeed dbus property · baecba90
      Christian Kellner authored
      Expose the LinkSpeed dbus property as (linkspeed) including a
      getter method. Install the necessary custom wire conversion to
      convert the wire representation of BoltLinkSpeed to the struct.
    • Christian Kellner's avatar
      cli/proxy: ability to set custom wire conv · 1f383b21
      Christian Kellner authored
      As with BoltExported, add the ability to specify a custom wire
      conversion for a given property. Should be called directly after
      the D-Bus proxy is created, to make sure the handler is installed
    • Christian Kellner's avatar
      device: add LinkSpeed property · 4c2faef9
      Christian Kellner authored
      Expose the link speed of a device (see previous commits) as the
      "linkspeed" object and "LinkSpeed" dbus property. Install a
      custom wire conversion via the existing BoltConvToWire and
      BoltConvFromWire methods provided by BoltLinkSpeed, which will
      serialize the struct as "a{su}" on the bus.
  3. 06 May, 2020 9 commits
    • Christian Kellner's avatar
      test/wire: add basic checks for BoltLinkSpeed · e8c4f7b7
      Christian Kellner authored
      Add simple checks for the new BoltLinkSpeed struct and its methods.
    • Christian Kellner's avatar
      test/sysfs: checks for bolt_sysfs_info_for_device · 9e8f1eff
      Christian Kellner authored
      Add simple checks for bolt_sysfs_info_for_device including the new
      link speed attributes.
    • Christian Kellner's avatar
      sysfs: support reading the link speed · f3edb88b
      Christian Kellner authored
      Add support for obtaining the link speed for a device via the
      existing bolt_sysfs_info_for_device function. If the 'full'
      argument is 'TRUE' the new 'linkspeed' member will contain
      information about the number lanes and speed of the lanes,
      if the corresponding sysfs attributes exist; otherwise they
      will be set to '0'.
    • Christian Kellner's avatar
      test/mock-sysfs: Support for link speed · 8e59388d
      Christian Kellner authored
      Add BoltLinkSpeed arguments to device_plug and device_add to be
      able to (optionally) specify the link speed for a device.
    • Christian Kellner's avatar
      test/glue: replace BTLinkAttr with BoltLinkSpeed · 78fcc702
      Christian Kellner authored
      Instead of using a custom type that is basically a copy of the new
      BoltLinkspeed struct, use the latter instead.
    • Christian Kellner's avatar
      common: introduce new BoltLinkSpeed struct · a8764282
      Christian Kellner authored
      Introduce a new BoltLinkSpeed struct that represents the speed of a
      link between two thunderbolt/usb4 devices in terms of lanes and the
      rate (speed) of the individual lane. See the previous commit for a
      description of lane bonding and transfer speeds. The BoltLinkSpeed
      struct is registered as a boxed type in the type system so it can
      be used as a GObject property. Wire conversion functions are also
      provided so it can be used in custom wire conversions and thus be
      used with BoltExported.
    • Christian Kellner's avatar
      names: add sysfs names for {rx,tx}_{lanes,speed} · 0b693c8a
      Christian Kellner authored
      Recent kernels, starting with commit[1], expose the speed and lanes
      of the link between a device and its upstream parent. Lane bonding
      itself was first supported by Falcon Ridge (2nd generation) chips.
      Current generations (3 and 4) support symmetric connections of up
      to 2 lanes and 20 Gb/s per lane. In the future asymmetric links
      might be possible.
      [1] 91c0c12080d0f40ee7275485221b06b4e1e289e1
    • Christian Kellner's avatar
      exported: ability to install custom wireconv · 6211af58
      Christian Kellner authored
      Add a new class method that allows to replace the automatically
      inferred WireConv for a property with a custom WireConv, by
      supplying custom BoltConvToWire and BoltConvFromWire methods.
      This is useful for anything where the automatic conversion
      would be wrong or no proper automatic conversion exists.
    • Christian Kellner's avatar
      glue: use glib-object include in public header · 530ab408
      Christian Kellner authored
      No need to include <gio/gio.h> from the public header.
  4. 04 May, 2020 5 commits
  5. 03 May, 2020 1 commit
  6. 04 Mar, 2020 11 commits
    • Christian Kellner's avatar
      power: remove watching for the process of guards · 43d3ed81
      Christian Kellner authored
      The idea behind was that a guard could be active for a process and
      when the process dies the guard needs to be removed. This could in
      theory happen for a guard of an external process that is does not
      have a fifo. In reality this case is impossible, because any guard
      that is not created internally, was created via a D-Bus call which
      in turn will always create a fifo. The fifo itself is sufficient
      to also catch the death of the process even when it happens during
      a bolt crash because when bolt re-starts and starts to monitor the
      fifo again it will receive the corresponding close event.
      Therefore remove process watching from BoltPower.
    • Christian Kellner's avatar
      test/guard: check recovering of closed guards · 5b1aeb77
      Christian Kellner authored
      Check that when we recover guards with an intact fifo that was
      closed while we weren't monitoring we get the proper 'released'
      signal after it is recovered.
    • Christian Kellner's avatar
      test/guard: use new bolt_test_run_main_loop helper · d864c09c
      Christian Kellner authored
      Saves us a few lines.
    • Christian Kellner's avatar
      test: helper for running a main loop with timeouts · 0cce219d
      Christian Kellner authored
      It is a common task to run a GMainLoop, waiting for an event, with
      a set timeout that will abort the loop. In most cases this is also
      considered a test failure so the test is aborted with a warning.
      Create a helper function to do exactly that.
    • Christian Kellner's avatar
      test/guard: check recovering of active guard · bd587d8f
      Christian Kellner authored
      Check when cleaning up a guard object with an active fifo leaves
      the fifo itself as well as the saved guard data intact. Verify
      that recovering that guard works and the fifo is still intact as
    • Christian Kellner's avatar
      guard: don't clean fifo in released state · 6c41b5bc
      Christian Kellner authored
      If the guard is being released but the fifo and thus the watch are
      still active, the guard_watch_release function will be called due
      to the removal of the watch in the finalizer. In that case the fifo
      was not being cleaned up on purpose so we just skip the cleanup.
    • Christian Kellner's avatar
      guard: don't recover guards without fifo · ca07257d
      Christian Kellner authored
      When recovering guards, ignore all guards that have no fifo. This
      should in reality not be any different to what was already being
      done, since there are only two different paths that create guards
        - internal ones, created by boltd itself during initialization
          for domain discovery
        - external ones, created by clients via the D-Bus APi, which
          all will have named pipes
      Remove the test that was relying on that code path. The test
      for this should be done in the BoltGuard unit tests anyway.
    • Christian Kellner's avatar
      guard: simple getter for 'fifo' property · 8f7a9568
      Christian Kellner authored
      Simple getter exposing the 'fifo' path string, which can be NULL
      if there is none.
    • Christian Kellner's avatar
      guard: implement getter for 'path' property · 625842c7
      Christian Kellner authored
      Simple getter for the 'path' property; NB: will be NULL if guard
      is not saved, therefore can be used as proxy for 'is-saved' as
    • Christian Kellner's avatar
      guard: fix missing quotation mark in log message · 93675da0
      Christian Kellner authored
      No semantic change, only fix a missing '.
    • Christian Kellner's avatar
      power: convert to use BoltReaper · 875ebe7a
      Christian Kellner authored
      Use BoltReaper to watch for dead processes of active guards. There
      should not be any noticeable change at all.