Skip to content
  • Logan Gunthorpe's avatar
    ntb_tool: Add link status and files to debugfs · bfcaa396
    Logan Gunthorpe authored
    
    
    In order to more successfully script with ntb_tool it's useful to
    have a link file to check the link status so that the script
    doesn't use the other files until the link is up.
    
    This commit adds a 'link' file to the debugfs directory which reads
    boolean (Y or N) depending on the link status. Writing to the file
    change the link state using ntb_link_enable or ntb_link_disable.
    
    A 'link_event' file is also provided so an application can block until
    the link changes to the desired state. If the user writes a 1, it will
    block until the link is up. If the user writes a 0, it will block until
    the link is down.
    
    Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
    Acked-by: default avatarAllen Hubbe <Allen.Hubbe@emc.com>
    Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
    bfcaa396