Lines Matching refs:context
234 complete(urb->context); in simple_callback()
438 urb->context = &completion; in simple_io()
1049 struct ctrl_ctx *ctx = urb->context; in ctrl_complete()
1164 struct ctrl_ctx context; in test_ctrl_queue() local
1170 spin_lock_init(&context.lock); in test_ctrl_queue()
1171 context.dev = dev; in test_ctrl_queue()
1172 init_completion(&context.complete); in test_ctrl_queue()
1173 context.count = param->sglen * param->iterations; in test_ctrl_queue()
1174 context.pending = 0; in test_ctrl_queue()
1175 context.status = -ENOMEM; in test_ctrl_queue()
1176 context.param = param; in test_ctrl_queue()
1177 context.last = -1; in test_ctrl_queue()
1324 context.status = -EINVAL; in test_ctrl_queue()
1340 u->context = &context; in test_ctrl_queue()
1345 context.urb = urb; in test_ctrl_queue()
1346 spin_lock_irq(&context.lock); in test_ctrl_queue()
1348 context.status = usb_submit_urb(urb[i], GFP_ATOMIC); in test_ctrl_queue()
1349 if (context.status != 0) { in test_ctrl_queue()
1351 i, context.status); in test_ctrl_queue()
1352 context.count = context.pending; in test_ctrl_queue()
1355 context.pending++; in test_ctrl_queue()
1357 spin_unlock_irq(&context.lock); in test_ctrl_queue()
1362 if (context.pending > 0) in test_ctrl_queue()
1363 wait_for_completion(&context.complete); in test_ctrl_queue()
1374 return context.status; in test_ctrl_queue()
1390 complete(urb->context); in unlink1_callback()
1404 urb->context = &completion; in unlink1()
1496 struct queued_ctx *ctx = urb->context; in unlink_queued_callback()
1831 struct transfer_context *ctx = urb->context; in complicated_callback()
1938 struct transfer_context context; in test_queue() local
1945 memset(&context, 0, sizeof(context)); in test_queue()
1946 context.count = param->iterations * param->sglen; in test_queue()
1947 context.dev = dev; in test_queue()
1948 context.is_iso = !!desc; in test_queue()
1949 init_completion(&context.done); in test_queue()
1950 spin_lock_init(&context.lock); in test_queue()
1955 if (context.is_iso) in test_queue()
1967 urbs[i]->context = &context; in test_queue()
1971 if (context.is_iso) { in test_queue()
1986 spin_lock_irq(&context.lock); in test_queue()
1988 ++context.pending; in test_queue()
1993 spin_unlock_irq(&context.lock); in test_queue()
1999 context.pending--; in test_queue()
2000 context.submit_error = 1; in test_queue()
2004 spin_unlock_irq(&context.lock); in test_queue()
2006 wait_for_completion(&context.done); in test_queue()
2019 else if (context.submit_error) in test_queue()
2021 else if (context.errors > in test_queue()
2022 (context.is_iso ? context.packet_count / 10 : 0)) in test_queue()