• Johan Hovold's avatar
    greybus: core: avoid I/O to disconnected interfaces · 7aefe791
    Johan Hovold authored
    Add new helper to disable connections to interfaces that have already
    been disconnected (e.g. forcibly removed).
    
    The connection tear-down procedure differs enough depending on whether
    the interface is still present or already gone to warrant a dedicated
    helper. This will become more obvious with the new tear-down procedure,
    which involves I/O on the connection being tore down.
    
    This also simplifies handling of the legacy bootrom, which does not
    support the new tear-down operations.
    
    Specifically, this allows us to remove the early control-connection
    tear down during interface disable, and also avoids some error messages
    currently printed during legacy mode switch (i.e. bootrom
    boot-over-UniPro) and forcible removal.
    Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
    7aefe791
connection.c 17.8 KB