Lines Matching refs:uinfo
1217 const struct qib_user_info *uinfo) in init_subctxts() argument
1227 if (uinfo->spu_subctxt_cnt <= 0) in init_subctxts()
1229 num_subctxts = uinfo->spu_subctxt_cnt; in init_subctxts()
1232 if (!qib_compatible_subctxts(uinfo->spu_userversion >> 16, in init_subctxts()
1233 uinfo->spu_userversion & 0xffff)) { in init_subctxts()
1236 (int) (uinfo->spu_userversion >> 16), in init_subctxts()
1237 (int) (uinfo->spu_userversion & 0xffff), in init_subctxts()
1268 rcd->subctxt_cnt = uinfo->spu_subctxt_cnt; in init_subctxts()
1269 rcd->subctxt_id = uinfo->spu_subctxt_id; in init_subctxts()
1285 struct file *fp, const struct qib_user_info *uinfo) in setup_ctxt() argument
1317 rcd->userversion = uinfo->spu_userversion; in setup_ctxt()
1318 ret = init_subctxts(dd, rcd, uinfo); in setup_ctxt()
1355 const struct qib_user_info *uinfo) in choose_port_ctxt() argument
1386 ret = ppd ? setup_ctxt(ppd, ctxt, fp, uinfo) : -ENETDOWN; in choose_port_ctxt()
1392 const struct qib_user_info *uinfo) in find_free_ctxt() argument
1397 if (!dd || (uinfo->spu_port && uinfo->spu_port > dd->num_pports)) in find_free_ctxt()
1400 ret = choose_port_ctxt(fp, dd, uinfo->spu_port, uinfo); in find_free_ctxt()
1405 static int get_a_ctxt(struct file *fp, const struct qib_user_info *uinfo, in get_a_ctxt() argument
1410 u32 port = uinfo->spu_port, ctxt; in get_a_ctxt()
1453 ret = choose_port_ctxt(fp, udd, port, uinfo); in get_a_ctxt()
1461 ret = choose_port_ctxt(fp, dd, port, uinfo); in get_a_ctxt()
1476 const struct qib_user_info *uinfo) in find_shared_ctxt() argument
1496 if (rcd->subctxt_id != uinfo->spu_subctxt_id) in find_shared_ctxt()
1499 if (rcd->subctxt_cnt != uinfo->spu_subctxt_cnt || in find_shared_ctxt()
1500 rcd->userversion != uinfo->spu_userversion || in find_shared_ctxt()
1584 static int qib_assign_ctxt(struct file *fp, const struct qib_user_info *uinfo) in qib_assign_ctxt() argument
1597 swmajor = uinfo->spu_userversion >> 16; in qib_assign_ctxt()
1603 swminor = uinfo->spu_userversion & 0xffff; in qib_assign_ctxt()
1605 if (swminor >= 11 && uinfo->spu_port_alg < QIB_PORT_ALG_COUNT) in qib_assign_ctxt()
1606 alg = uinfo->spu_port_alg; in qib_assign_ctxt()
1611 uinfo->spu_subctxt_cnt) { in qib_assign_ctxt()
1612 ret = find_shared_ctxt(fp, uinfo); in qib_assign_ctxt()
1623 ret = find_free_ctxt(i_minor - 1, fp, uinfo); in qib_assign_ctxt()
1631 if (!find_free_ctxt(unit, fp, uinfo)) { in qib_assign_ctxt()
1635 ret = get_a_ctxt(fp, uinfo, alg); in qib_assign_ctxt()
1650 const struct qib_user_info *uinfo) in qib_do_user_init() argument
1879 static int qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo) in qib_ctxt_info() argument
1900 if (copy_to_user(uinfo, &info, sz)) { in qib_ctxt_info()