+ /* dynamic context requested */
+ if (id == VX_DYNAMIC_ID) {
+ id = __vx_dynamic_id();
+ if (!id) {
+ printk(KERN_ERR "no dynamic context available.\n");
+ vxi = ERR_PTR(-EAGAIN);
+ goto out_unlock;
+ }
+ new->vx_id = id;
+ }
+ /* static context requested */
+ else if ((vxi = __lookup_vx_info(id))) {
+ vxdprintk(VXD_CBIT(xid, 0),
+ "create_vx_info(%d) = %p (already there)", id, vxi);
+ if (vx_info_flags(vxi, VXF_STATE_SETUP, 0))
+ vxi = ERR_PTR(-EBUSY);
+ else
+ vxi = ERR_PTR(-EEXIST);
+ goto out_unlock;
+ }
+ /* dynamic xid creation blocker */
+ else if (id >= MIN_D_CONTEXT) {
+ vxdprintk(VXD_CBIT(xid, 0),
+ "create_vx_info(%d) (dynamic rejected)", id);
+ vxi = ERR_PTR(-EINVAL);
+ goto out_unlock;
+ }