From owner-p4-projects@FreeBSD.ORG Sun Dec 30 14:24:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B59216A46B; Sun, 30 Dec 2007 14:24:51 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D154516A468 for ; Sun, 30 Dec 2007 14:24:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C0BD613C46E for ; Sun, 30 Dec 2007 14:24:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lBUEOoYx087007 for ; Sun, 30 Dec 2007 14:24:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBUEOoVf086999 for perforce@freebsd.org; Sun, 30 Dec 2007 14:24:50 GMT (envelope-from hselasky@FreeBSD.org) Date: Sun, 30 Dec 2007 14:24:50 GMT Message-Id: <200712301424.lBUEOoVf086999@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132098 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2007 14:24:51 -0000 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); }