Date: Sun, 30 Dec 2007 14:24:50 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 132098 for review Message-ID: <200712301424.lBUEOoVf086999@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132098 Change 132098 by hselasky@hselasky_laptop001 on 2007/12/30 14:24:09 "usb_control_msg" should return the actual transfer length in case of success. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#21 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#21 (text+ko) ==== @@ -577,12 +577,20 @@ return (err); } -/* The following function performs a control transfer sequence one any +/*------------------------------------------------------------------------* + * usb_control_msg + * + * The following function performs a control transfer sequence one any * control, bulk or interrupt endpoint, specified by "uhe". A control * transfer means that you transfer an 8-byte header first followed by * a data-phase as indicated by the 8-byte header. The "timeout" is * given in milliseconds. - */ + * + * Return values: + * 0: Success + * < 0: Failure + * > 0: Acutal length + *------------------------------------------------------------------------*/ int32_t usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *uhe, uint8_t request, uint8_t requesttype, @@ -696,6 +704,9 @@ } usb_free_urb(urb); + if (err == 0) { + err = actlen; + } return (err); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712301424.lBUEOoVf086999>