27 int ret, actual_length;
29 if (!d || !wbuf || !wlen || !d->
props->generic_bulk_ctrl_endpoint ||
30 !d->
props->generic_bulk_ctrl_endpoint_response) {
37 dev_dbg(&d->
udev->dev,
"%s: >>> %*ph\n", __func__, wlen, wbuf);
40 d->
props->generic_bulk_ctrl_endpoint), wbuf, wlen,
41 &actual_length, 2000);
43 dev_err(&d->
udev->dev,
"%s: usb_bulk_msg() failed=%d\n",
46 ret = actual_length != wlen ? -
EIO : 0;
49 if (!ret && rbuf && rlen) {
50 if (d->
props->generic_bulk_ctrl_delay)
52 d->
props->generic_bulk_ctrl_delay
56 d->
props->generic_bulk_ctrl_endpoint_response),
57 rbuf, rlen, &actual_length, 2000);
60 "failed=%d\n", KBUILD_MODNAME, ret);