Lines Matching refs:param

1075 	struct usbtest_param_32	*param;  member
1157 for (i = 1; i < ctx->param->sglen; i++) { in ctrl_complete()
1160 % ctx->param->sglen]; in ctrl_complete()
1201 test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param) in test_ctrl_queue() argument
1208 if (param->sglen == 0 || param->iterations > UINT_MAX / param->sglen) in test_ctrl_queue()
1214 context.count = param->sglen * param->iterations; in test_ctrl_queue()
1217 context.param = param; in test_ctrl_queue()
1224 urb = kcalloc(param->sglen, sizeof(struct urb *), GFP_KERNEL); in test_ctrl_queue()
1227 for (i = 0; i < param->sglen; i++) { in test_ctrl_queue()
1388 for (i = 0; i < param->sglen; i++) { in test_ctrl_queue()
1407 for (i = 0; i < param->sglen; i++) { in test_ctrl_queue()
2038 test_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param, in test_queue() argument
2048 if (!param->sglen || param->iterations > UINT_MAX / param->sglen) in test_queue()
2051 if (param->sglen > MAX_SGLEN) in test_queue()
2054 urbs = kcalloc(param->sglen, sizeof(*urbs), GFP_KERNEL); in test_queue()
2059 context.count = param->iterations * param->sglen; in test_queue()
2067 for (i = 0; i < param->sglen; i++) { in test_queue()
2070 param->length, offset); in test_queue()
2073 param->length, 0); in test_queue()
2082 packets *= param->iterations; in test_queue()
2107 for (i = 0; i < param->sglen; i++) { in test_queue()
2128 for (i = 0; i < param->sglen; i++) { in test_queue()
2149 for (i = 0; i < param->sglen; i++) { in test_queue()
2180 usbtest_do_ioctl(struct usb_interface *intf, struct usbtest_param_32 *param) in usbtest_do_ioctl() argument
2190 if (param->iterations <= 0) in usbtest_do_ioctl()
2192 if (param->sglen > MAX_SGLEN) in usbtest_do_ioctl()
2203 switch (param->test_num) { in usbtest_do_ioctl()
2216 param->length, param->iterations); in usbtest_do_ioctl()
2217 urb = simple_alloc_urb(udev, dev->out_pipe, param->length, 0); in usbtest_do_ioctl()
2223 retval = simple_io(dev, urb, param->iterations, 0, 0, "test1"); in usbtest_do_ioctl()
2231 param->length, param->iterations); in usbtest_do_ioctl()
2232 urb = simple_alloc_urb(udev, dev->in_pipe, param->length, 0); in usbtest_do_ioctl()
2238 retval = simple_io(dev, urb, param->iterations, 0, 0, "test2"); in usbtest_do_ioctl()
2242 if (dev->out_pipe == 0 || param->vary == 0) in usbtest_do_ioctl()
2246 param->vary, param->length, param->iterations); in usbtest_do_ioctl()
2247 urb = simple_alloc_urb(udev, dev->out_pipe, param->length, 0); in usbtest_do_ioctl()
2253 retval = simple_io(dev, urb, param->iterations, param->vary, in usbtest_do_ioctl()
2258 if (dev->in_pipe == 0 || param->vary == 0) in usbtest_do_ioctl()
2262 param->vary, param->length, param->iterations); in usbtest_do_ioctl()
2263 urb = simple_alloc_urb(udev, dev->in_pipe, param->length, 0); in usbtest_do_ioctl()
2269 retval = simple_io(dev, urb, param->iterations, param->vary, in usbtest_do_ioctl()
2276 if (dev->out_pipe == 0 || param->sglen == 0) in usbtest_do_ioctl()
2280 param->iterations, in usbtest_do_ioctl()
2281 param->sglen, param->length); in usbtest_do_ioctl()
2282 sg = alloc_sglist(param->sglen, param->length, in usbtest_do_ioctl()
2289 retval = perform_sglist(dev, param->iterations, dev->out_pipe, in usbtest_do_ioctl()
2290 &req, sg, param->sglen); in usbtest_do_ioctl()
2291 free_sglist(sg, param->sglen); in usbtest_do_ioctl()
2295 if (dev->in_pipe == 0 || param->sglen == 0) in usbtest_do_ioctl()
2299 param->iterations, in usbtest_do_ioctl()
2300 param->sglen, param->length); in usbtest_do_ioctl()
2301 sg = alloc_sglist(param->sglen, param->length, in usbtest_do_ioctl()
2308 retval = perform_sglist(dev, param->iterations, dev->in_pipe, in usbtest_do_ioctl()
2309 &req, sg, param->sglen); in usbtest_do_ioctl()
2310 free_sglist(sg, param->sglen); in usbtest_do_ioctl()
2313 if (dev->out_pipe == 0 || param->sglen == 0 || param->vary == 0) in usbtest_do_ioctl()
2317 param->vary, param->iterations, in usbtest_do_ioctl()
2318 param->sglen, param->length); in usbtest_do_ioctl()
2319 sg = alloc_sglist(param->sglen, param->length, in usbtest_do_ioctl()
2320 param->vary, dev, dev->out_pipe); in usbtest_do_ioctl()
2326 retval = perform_sglist(dev, param->iterations, dev->out_pipe, in usbtest_do_ioctl()
2327 &req, sg, param->sglen); in usbtest_do_ioctl()
2328 free_sglist(sg, param->sglen); in usbtest_do_ioctl()
2331 if (dev->in_pipe == 0 || param->sglen == 0 || param->vary == 0) in usbtest_do_ioctl()
2335 param->vary, param->iterations, in usbtest_do_ioctl()
2336 param->sglen, param->length); in usbtest_do_ioctl()
2337 sg = alloc_sglist(param->sglen, param->length, in usbtest_do_ioctl()
2338 param->vary, dev, dev->in_pipe); in usbtest_do_ioctl()
2344 retval = perform_sglist(dev, param->iterations, dev->in_pipe, in usbtest_do_ioctl()
2345 &req, sg, param->sglen); in usbtest_do_ioctl()
2346 free_sglist(sg, param->sglen); in usbtest_do_ioctl()
2354 param->iterations); in usbtest_do_ioctl()
2355 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_do_ioctl()
2367 param->sglen, in usbtest_do_ioctl()
2368 param->iterations); in usbtest_do_ioctl()
2369 retval = test_ctrl_queue(dev, param); in usbtest_do_ioctl()
2374 if (dev->in_pipe == 0 || !param->length) in usbtest_do_ioctl()
2378 param->iterations, param->length); in usbtest_do_ioctl()
2379 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_do_ioctl()
2381 param->length); in usbtest_do_ioctl()
2387 if (dev->out_pipe == 0 || !param->length) in usbtest_do_ioctl()
2391 param->iterations, param->length); in usbtest_do_ioctl()
2392 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_do_ioctl()
2394 param->length); in usbtest_do_ioctl()
2406 param->iterations); in usbtest_do_ioctl()
2407 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_do_ioctl()
2419 param->iterations, in usbtest_do_ioctl()
2420 realworld ? 1 : 0, param->length, in usbtest_do_ioctl()
2421 param->vary); in usbtest_do_ioctl()
2422 retval = ctrl_out(dev, param->iterations, in usbtest_do_ioctl()
2423 param->length, param->vary, 0); in usbtest_do_ioctl()
2428 if (dev->out_iso_pipe == 0 || param->sglen == 0) in usbtest_do_ioctl()
2432 param->iterations, in usbtest_do_ioctl()
2433 param->sglen, param->length); in usbtest_do_ioctl()
2435 retval = test_queue(dev, param, in usbtest_do_ioctl()
2441 if (dev->in_iso_pipe == 0 || param->sglen == 0) in usbtest_do_ioctl()
2445 param->iterations, in usbtest_do_ioctl()
2446 param->sglen, param->length); in usbtest_do_ioctl()
2448 retval = test_queue(dev, param, in usbtest_do_ioctl()
2460 param->length, param->iterations); in usbtest_do_ioctl()
2464 param->length, param->iterations, in usbtest_do_ioctl()
2473 param->length, param->iterations); in usbtest_do_ioctl()
2477 param->length, param->iterations, in usbtest_do_ioctl()
2487 param->length, param->iterations); in usbtest_do_ioctl()
2491 param->length, param->iterations, in usbtest_do_ioctl()
2500 param->length, param->iterations); in usbtest_do_ioctl()
2504 param->length, param->iterations, in usbtest_do_ioctl()
2514 param->iterations, in usbtest_do_ioctl()
2515 realworld ? 1 : 0, param->length, in usbtest_do_ioctl()
2516 param->vary); in usbtest_do_ioctl()
2517 retval = ctrl_out(dev, param->iterations, in usbtest_do_ioctl()
2518 param->length, param->vary, 1); in usbtest_do_ioctl()
2523 if (dev->out_iso_pipe == 0 || param->sglen == 0) in usbtest_do_ioctl()
2527 param->iterations, in usbtest_do_ioctl()
2528 param->sglen, param->length); in usbtest_do_ioctl()
2529 retval = test_queue(dev, param, in usbtest_do_ioctl()
2534 if (dev->in_iso_pipe == 0 || param->sglen == 0) in usbtest_do_ioctl()
2538 param->iterations, in usbtest_do_ioctl()
2539 param->sglen, param->length); in usbtest_do_ioctl()
2540 retval = test_queue(dev, param, in usbtest_do_ioctl()
2546 if (dev->out_pipe == 0 || !param->length || param->sglen < 4) in usbtest_do_ioctl()
2551 param->iterations, param->sglen, param->length); in usbtest_do_ioctl()
2552 for (i = param->iterations; retval == 0 && i > 0; --i) { in usbtest_do_ioctl()
2554 param->sglen, param->length); in usbtest_do_ioctl()
2570 param->length, param->iterations); in usbtest_do_ioctl()
2571 urb = simple_alloc_urb(udev, dev->out_int_pipe, param->length, in usbtest_do_ioctl()
2578 retval = simple_io(dev, urb, param->iterations, 0, 0, "test25"); in usbtest_do_ioctl()
2586 param->length, param->iterations); in usbtest_do_ioctl()
2587 urb = simple_alloc_urb(udev, dev->in_int_pipe, param->length, in usbtest_do_ioctl()
2594 retval = simple_io(dev, urb, param->iterations, 0, 0, "test26"); in usbtest_do_ioctl()
2599 if (dev->out_pipe == 0 || param->sglen == 0 || pattern != 0) in usbtest_do_ioctl()
2602 "TEST 27: bulk write %dMbytes\n", (param->iterations * in usbtest_do_ioctl()
2603 param->sglen * param->length) / (1024 * 1024)); in usbtest_do_ioctl()
2604 retval = test_queue(dev, param, in usbtest_do_ioctl()
2608 if (dev->in_pipe == 0 || param->sglen == 0 || pattern != 0) in usbtest_do_ioctl()
2611 "TEST 28: bulk read %dMbytes\n", (param->iterations * in usbtest_do_ioctl()
2612 param->sglen * param->length) / (1024 * 1024)); in usbtest_do_ioctl()
2613 retval = test_queue(dev, param, in usbtest_do_ioctl()
2622 param->iterations); in usbtest_do_ioctl()
2623 for (i = param->iterations; retval == 0 && i > 0; --i) in usbtest_do_ioctl()