Lines Matching refs:param

1022 	struct usbtest_param	*param;  member
1103 for (i = 1; i < ctx->param->sglen; i++) { in ctrl_complete()
1106 % ctx->param->sglen]; in ctrl_complete()
1147 test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param) in test_ctrl_queue() argument
1154 if (param->sglen == 0 || param->iterations > UINT_MAX / param->sglen) in test_ctrl_queue()
1160 context.count = param->sglen * param->iterations; in test_ctrl_queue()
1163 context.param = param; in test_ctrl_queue()
1170 urb = kcalloc(param->sglen, sizeof(struct urb *), GFP_KERNEL); in test_ctrl_queue()
1173 for (i = 0; i < param->sglen; i++) { in test_ctrl_queue()
1334 for (i = 0; i < param->sglen; i++) { in test_ctrl_queue()
1353 for (i = 0; i < param->sglen; i++) { in test_ctrl_queue()
1921 test_iso_queue(struct usbtest_dev *dev, struct usbtest_param *param, in test_iso_queue() argument
1931 if (param->sglen > 10) in test_iso_queue()
1935 context.count = param->iterations * param->sglen; in test_iso_queue()
1948 for (i = 0; i < param->sglen; i++) { in test_iso_queue()
1950 param->length, offset); in test_iso_queue()
1958 packets *= param->iterations; in test_iso_queue()
1966 for (i = 0; i < param->sglen; i++) { in test_iso_queue()
1987 for (i = 0; i < param->sglen; i++) { in test_iso_queue()
2005 for (i = 0; i < param->sglen; i++) { in test_iso_queue()
2060 struct usbtest_param *param = buf; in usbtest_ioctl() local
2075 if (param->iterations <= 0) in usbtest_ioctl()
2114 switch (param->test_num) { in usbtest_ioctl()
2127 param->length, param->iterations); in usbtest_ioctl()
2128 urb = simple_alloc_urb(udev, dev->out_pipe, param->length, 0); in usbtest_ioctl()
2134 retval = simple_io(dev, urb, param->iterations, 0, 0, "test1"); in usbtest_ioctl()
2142 param->length, param->iterations); in usbtest_ioctl()
2143 urb = simple_alloc_urb(udev, dev->in_pipe, param->length, 0); in usbtest_ioctl()
2149 retval = simple_io(dev, urb, param->iterations, 0, 0, "test2"); in usbtest_ioctl()
2153 if (dev->out_pipe == 0 || param->vary == 0) in usbtest_ioctl()
2157 param->vary, param->length, param->iterations); in usbtest_ioctl()
2158 urb = simple_alloc_urb(udev, dev->out_pipe, param->length, 0); in usbtest_ioctl()
2164 retval = simple_io(dev, urb, param->iterations, param->vary, in usbtest_ioctl()
2169 if (dev->in_pipe == 0 || param->vary == 0) in usbtest_ioctl()
2173 param->vary, param->length, param->iterations); in usbtest_ioctl()
2174 urb = simple_alloc_urb(udev, dev->in_pipe, param->length, 0); in usbtest_ioctl()
2180 retval = simple_io(dev, urb, param->iterations, param->vary, in usbtest_ioctl()
2187 if (dev->out_pipe == 0 || param->sglen == 0) in usbtest_ioctl()
2191 param->iterations, in usbtest_ioctl()
2192 param->sglen, param->length); in usbtest_ioctl()
2193 sg = alloc_sglist(param->sglen, param->length, in usbtest_ioctl()
2200 retval = perform_sglist(dev, param->iterations, dev->out_pipe, in usbtest_ioctl()
2201 &req, sg, param->sglen); in usbtest_ioctl()
2202 free_sglist(sg, param->sglen); in usbtest_ioctl()
2206 if (dev->in_pipe == 0 || param->sglen == 0) in usbtest_ioctl()
2210 param->iterations, in usbtest_ioctl()
2211 param->sglen, param->length); in usbtest_ioctl()
2212 sg = alloc_sglist(param->sglen, param->length, in usbtest_ioctl()
2219 retval = perform_sglist(dev, param->iterations, dev->in_pipe, in usbtest_ioctl()
2220 &req, sg, param->sglen); in usbtest_ioctl()
2221 free_sglist(sg, param->sglen); in usbtest_ioctl()
2224 if (dev->out_pipe == 0 || param->sglen == 0 || param->vary == 0) in usbtest_ioctl()
2228 param->vary, param->iterations, in usbtest_ioctl()
2229 param->sglen, param->length); in usbtest_ioctl()
2230 sg = alloc_sglist(param->sglen, param->length, in usbtest_ioctl()
2231 param->vary, dev, dev->out_pipe); in usbtest_ioctl()
2237 retval = perform_sglist(dev, param->iterations, dev->out_pipe, in usbtest_ioctl()
2238 &req, sg, param->sglen); in usbtest_ioctl()
2239 free_sglist(sg, param->sglen); in usbtest_ioctl()
2242 if (dev->in_pipe == 0 || param->sglen == 0 || param->vary == 0) in usbtest_ioctl()
2246 param->vary, param->iterations, in usbtest_ioctl()
2247 param->sglen, param->length); in usbtest_ioctl()
2248 sg = alloc_sglist(param->sglen, param->length, in usbtest_ioctl()
2249 param->vary, dev, dev->in_pipe); in usbtest_ioctl()
2255 retval = perform_sglist(dev, param->iterations, dev->in_pipe, in usbtest_ioctl()
2256 &req, sg, param->sglen); in usbtest_ioctl()
2257 free_sglist(sg, param->sglen); in usbtest_ioctl()
2265 param->iterations); in usbtest_ioctl()
2266 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_ioctl()
2278 param->sglen, in usbtest_ioctl()
2279 param->iterations); in usbtest_ioctl()
2280 retval = test_ctrl_queue(dev, param); in usbtest_ioctl()
2285 if (dev->in_pipe == 0 || !param->length) in usbtest_ioctl()
2289 param->iterations, param->length); in usbtest_ioctl()
2290 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_ioctl()
2292 param->length); in usbtest_ioctl()
2298 if (dev->out_pipe == 0 || !param->length) in usbtest_ioctl()
2302 param->iterations, param->length); in usbtest_ioctl()
2303 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_ioctl()
2305 param->length); in usbtest_ioctl()
2317 param->iterations); in usbtest_ioctl()
2318 for (i = param->iterations; retval == 0 && i--; /* NOP */) in usbtest_ioctl()
2330 param->iterations, in usbtest_ioctl()
2331 realworld ? 1 : 0, param->length, in usbtest_ioctl()
2332 param->vary); in usbtest_ioctl()
2333 retval = ctrl_out(dev, param->iterations, in usbtest_ioctl()
2334 param->length, param->vary, 0); in usbtest_ioctl()
2339 if (dev->out_iso_pipe == 0 || param->sglen == 0) in usbtest_ioctl()
2343 param->iterations, in usbtest_ioctl()
2344 param->sglen, param->length); in usbtest_ioctl()
2346 retval = test_iso_queue(dev, param, in usbtest_ioctl()
2352 if (dev->in_iso_pipe == 0 || param->sglen == 0) in usbtest_ioctl()
2356 param->iterations, in usbtest_ioctl()
2357 param->sglen, param->length); in usbtest_ioctl()
2359 retval = test_iso_queue(dev, param, in usbtest_ioctl()
2371 param->length, param->iterations); in usbtest_ioctl()
2375 param->length, param->iterations, in usbtest_ioctl()
2384 param->length, param->iterations); in usbtest_ioctl()
2388 param->length, param->iterations, in usbtest_ioctl()
2398 param->length, param->iterations); in usbtest_ioctl()
2402 param->length, param->iterations, in usbtest_ioctl()
2411 param->length, param->iterations); in usbtest_ioctl()
2415 param->length, param->iterations, in usbtest_ioctl()
2425 param->iterations, in usbtest_ioctl()
2426 realworld ? 1 : 0, param->length, in usbtest_ioctl()
2427 param->vary); in usbtest_ioctl()
2428 retval = ctrl_out(dev, param->iterations, in usbtest_ioctl()
2429 param->length, param->vary, 1); in usbtest_ioctl()
2434 if (dev->out_iso_pipe == 0 || param->sglen == 0) in usbtest_ioctl()
2438 param->iterations, in usbtest_ioctl()
2439 param->sglen, param->length); in usbtest_ioctl()
2440 retval = test_iso_queue(dev, param, in usbtest_ioctl()
2445 if (dev->in_iso_pipe == 0 || param->sglen == 0) in usbtest_ioctl()
2449 param->iterations, in usbtest_ioctl()
2450 param->sglen, param->length); in usbtest_ioctl()
2451 retval = test_iso_queue(dev, param, in usbtest_ioctl()
2457 if (dev->out_pipe == 0 || !param->length || param->sglen < 4) in usbtest_ioctl()
2462 param->iterations, param->sglen, param->length); in usbtest_ioctl()
2463 for (i = param->iterations; retval == 0 && i > 0; --i) { in usbtest_ioctl()
2465 param->sglen, param->length); in usbtest_ioctl()
2481 param->length, param->iterations); in usbtest_ioctl()
2482 urb = simple_alloc_urb(udev, dev->out_int_pipe, param->length, in usbtest_ioctl()
2489 retval = simple_io(dev, urb, param->iterations, 0, 0, "test25"); in usbtest_ioctl()
2497 param->length, param->iterations); in usbtest_ioctl()
2498 urb = simple_alloc_urb(udev, dev->in_int_pipe, param->length, in usbtest_ioctl()
2505 retval = simple_io(dev, urb, param->iterations, 0, 0, "test26"); in usbtest_ioctl()
2509 do_gettimeofday(&param->duration); in usbtest_ioctl()
2510 param->duration.tv_sec -= start.tv_sec; in usbtest_ioctl()
2511 param->duration.tv_usec -= start.tv_usec; in usbtest_ioctl()
2512 if (param->duration.tv_usec < 0) { in usbtest_ioctl()
2513 param->duration.tv_usec += 1000 * 1000; in usbtest_ioctl()
2514 param->duration.tv_sec -= 1; in usbtest_ioctl()