Lines Matching refs:context
232 complete(urb->context); in simple_callback()
425 urb->context = &completion; in simple_io()
1036 struct ctrl_ctx *ctx = urb->context; in ctrl_complete()
1151 struct ctrl_ctx context; in test_ctrl_queue() local
1157 spin_lock_init(&context.lock); in test_ctrl_queue()
1158 context.dev = dev; in test_ctrl_queue()
1159 init_completion(&context.complete); in test_ctrl_queue()
1160 context.count = param->sglen * param->iterations; in test_ctrl_queue()
1161 context.pending = 0; in test_ctrl_queue()
1162 context.status = -ENOMEM; in test_ctrl_queue()
1163 context.param = param; in test_ctrl_queue()
1164 context.last = -1; in test_ctrl_queue()
1311 context.status = -EINVAL; in test_ctrl_queue()
1327 u->context = &context; in test_ctrl_queue()
1332 context.urb = urb; in test_ctrl_queue()
1333 spin_lock_irq(&context.lock); in test_ctrl_queue()
1335 context.status = usb_submit_urb(urb[i], GFP_ATOMIC); in test_ctrl_queue()
1336 if (context.status != 0) { in test_ctrl_queue()
1338 i, context.status); in test_ctrl_queue()
1339 context.count = context.pending; in test_ctrl_queue()
1342 context.pending++; in test_ctrl_queue()
1344 spin_unlock_irq(&context.lock); in test_ctrl_queue()
1349 if (context.pending > 0) in test_ctrl_queue()
1350 wait_for_completion(&context.complete); in test_ctrl_queue()
1361 return context.status; in test_ctrl_queue()
1377 complete(urb->context); in unlink1_callback()
1391 urb->context = &completion; in unlink1()
1483 struct queued_ctx *ctx = urb->context; in unlink_queued_callback()
1817 struct iso_context *ctx = urb->context; in iso_callback()
1924 struct iso_context context; in test_iso_queue() local
1934 memset(&context, 0, sizeof(context)); in test_iso_queue()
1935 context.count = param->iterations * param->sglen; in test_iso_queue()
1936 context.dev = dev; in test_iso_queue()
1937 init_completion(&context.done); in test_iso_queue()
1938 spin_lock_init(&context.lock); in test_iso_queue()
1956 urbs[i]->context = &context; in test_iso_queue()
1965 spin_lock_irq(&context.lock); in test_iso_queue()
1967 ++context.pending; in test_iso_queue()
1972 spin_unlock_irq(&context.lock); in test_iso_queue()
1978 context.pending--; in test_iso_queue()
1979 context.submit_error = 1; in test_iso_queue()
1983 spin_unlock_irq(&context.lock); in test_iso_queue()
1985 wait_for_completion(&context.done); in test_iso_queue()
1998 else if (context.submit_error) in test_iso_queue()
2000 else if (context.errors > context.packet_count / 10) in test_iso_queue()