]> git.baikalelectronics.ru Git - kernel.git/commit
ntb_tool: Add link status and files to debugfs
authorLogan Gunthorpe <logang@deltatee.com>
Mon, 20 Jun 2016 19:15:10 +0000 (13:15 -0600)
committerJon Mason <jdmason@kudzu.us>
Fri, 5 Aug 2016 14:21:07 +0000 (10:21 -0400)
commita7bf356554a9a96674ae6c797e30d60de54a4f87
tree7bfc6fd71823bdf697dc64d3ed51e76c3eae7fea
parent18280b52d7813451756e131a31becc8b68ac0641
ntb_tool: Add link status and files to debugfs

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: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <Allen.Hubbe@emc.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/test/ntb_tool.c