]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: Add check and comment for link up to mw_count() and mw_get_align()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 3 Aug 2017 18:19:45 +0000 (12:19 -0600)
committerJon Mason <jdmason@kudzu.us>
Sun, 19 Nov 2017 01:37:11 +0000 (20:37 -0500)
commita85018c72bea197098b53c6e9c677a3fccab32cb
tree7239deea35b4e92edd76ce65f7970b3ca077f248
parent04859df7be1d713c982990dbb33a4978554b3ce4
NTB: Add check and comment for link up to mw_count() and mw_get_align()

Adds a comment and a check to ntb_mw_get_align() so that it always fails
if the function is called before the link is up.

Also adds a comment to ntb_mw_count() to note that it may return 0 if
it is called before the link is up.

This is to prevent accidental mis-use in clients that are testing
on hardware that this doesn't matter for.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
include/linux/ntb.h