提交 bacf4013 编写于 作者: M Mark Debbage 提交者: Roland Dreier

IB/ipath: Make handling of one subport consistent

Previously the driver and userspace code handled the case of 1 subport
somewhat inconsistently.  The new interpretation of this situation is
that if one subport is requested, the driver turns on the subport
mechanism and arranges for the port to be "shared" by one process.  In
normal use the userspace library does not use this configuration and
instead arranges for the port not to be shared at all.  This
particular idiom can be useful for testing purposes.
Signed-off-by: NMark Debbage <mark.debbage@qlogic.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 0df6291c
...@@ -1444,10 +1444,10 @@ static int init_subports(struct ipath_devdata *dd, ...@@ -1444,10 +1444,10 @@ static int init_subports(struct ipath_devdata *dd,
size_t size; size_t size;
/* /*
* If the user is requesting zero or one port, * If the user is requesting zero subports,
* skip the subport allocation. * skip the subport allocation.
*/ */
if (uinfo->spu_subport_cnt <= 1) if (uinfo->spu_subport_cnt <= 0)
goto bail; goto bail;
/* Self-consistency check for ipath_compatible_subports() */ /* Self-consistency check for ipath_compatible_subports() */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册