Skip to content
  1. Feb 08, 2019
    • Eran Ben Elisha's avatar
      devlink: Add health report functionality · c8e1da0b
      Eran Ben Elisha authored
      
      
      Upon error discover, every driver can report it to the devlink health
      mechanism via devlink_health_report function, using the appropriate
      reporter registered to it. Driver can pass error specific context which
      will be delivered to it as part of the dump / recovery callbacks.
      
      Once an error is reported, devlink health will do the following actions:
      * A log is being send to the kernel trace events buffer
      * Health status and statistics are being updated for the reporter instance
      * Object dump is being taken and stored at the reporter instance (as long
        as there is no other dump which is already stored)
      * Auto recovery attempt is being done. Depends on:
        - Auto Recovery configuration
        - Grace period vs. Time since last recover
      
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8e1da0b
    • Eran Ben Elisha's avatar
      devlink: Add health reporter create/destroy functionality · a0bdcc59
      Eran Ben Elisha authored
      
      
      Devlink health reporter is an instance for reporting, diagnosing and
      recovering from run time errors discovered by the reporters.
      Define it's data structure and supported operations.
      In addition, expose devlink API to create and destroy a reporter.
      Each devlink instance will hold it's own reporters list.
      
      As part of the allocation, driver shall provide a set of callbacks which
      will be used by devlink in order to handle health reports and user
      commands related to this reporter. In addition, driver is entitled to
      provide some priv pointer, which can be fetched from the reporter by
      devlink_health_reporter_priv function.
      
      For each reporter, devlink will hold a metadata of statistics,
      dump msg and status.
      
      For passing dumps and diagnose data to the user-space, it will use devlink
      fmsg API.
      
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0bdcc59
    • Eran Ben Elisha's avatar
      devlink: Add devlink formatted message (fmsg) API · 1db64e87
      Eran Ben Elisha authored
      
      
      Devlink fmsg is a mechanism to pass descriptors between drivers and
      devlink, in json-like format. The API allows the driver to add nested
      attributes such as object, object pair and value array, in addition to
      attributes such as name and value.
      
      Driver can use this API to fill the fmsg context in a format which will be
      translated by the devlink to the netlink message later.
      There is no memory allocation in advance (other than the initial list
      head), and it dynamically allocates messages descriptors and add them to
      the list on the fly.
      
      When it needs to send the data using SKBs to the netlink layer, it
      fragments the data between different SKBs. In order to do this
      fragmentation, it uses virtual nests attributes, to avoid actual
      nesting use which cannot be divided between different SKBs.
      
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: default avatarMoshe Shemesh <moshe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1db64e87
    • Moritz Fischer's avatar
      net: phy: fixed_phy: Fix fixed_phy not checking GPIO · 8f289805
      Moritz Fischer authored
      Fix fixed_phy not checking GPIO if no link_update callback
      is registered.
      
      In the original version all users registered a link_update
      callback so the issue was masked.
      
      Fixes: a5597008
      
       ("phy: fixed_phy: Add gpio to determine link up/down.")
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f289805
  2. Feb 07, 2019