]> 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)
commite28e7a57c6e042f6c52ec5c69679f218b8a1ebf2
tree7bfc6fd71823bdf697dc64d3ed51e76c3eae7fea
parent79d1c646da12710d32bf6dc80023ce59dbd4ebd5
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