From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:57:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A65716A421; Tue, 19 Feb 2008 18:57:00 +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 DAFC116A418 for ; Tue, 19 Feb 2008 18:56:59 +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 CA3AA13C455 for ; Tue, 19 Feb 2008 18:56:59 +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 m1JIuxSY090890 for ; Tue, 19 Feb 2008 18:56:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIuxkE090887 for perforce@freebsd.org; Tue, 19 Feb 2008 18:56:59 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:56:59 GMT Message-Id: <200802191856.m1JIuxkE090887@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 135738 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: Tue, 19 Feb 2008 18:57:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135738 Change 135738 by hselasky@hselasky_laptop001 on 2008/02/19 18:56:05 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template.c#15 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template.c#15 (text+ko) ==== @@ -48,6 +48,9 @@ /*------------------------------------------------------------------------* * usbd_make_raw_desc + * + * This function will insert a raw USB descriptor into the generated + * USB configuration. *------------------------------------------------------------------------*/ static void usbd_make_raw_desc(struct usbd_temp_setup *temp, @@ -87,6 +90,10 @@ /*------------------------------------------------------------------------* * usbd_make_endpoint_desc + * + * This function will generate an USB endpoint descriptor from the + * given USB template endpoint descriptor, which will be inserted into + * the USB configuration. *------------------------------------------------------------------------*/ static void usbd_make_endpoint_desc(struct usbd_temp_setup *temp, @@ -184,6 +191,10 @@ /*------------------------------------------------------------------------* * usbd_make_interface_desc + * + * This function will generate an USB interface descriptor from the + * given USB template interface descriptor, which will be inserted + * into the USB configuration. *------------------------------------------------------------------------*/ static void usbd_make_interface_desc(struct usbd_temp_setup *temp, @@ -252,6 +263,10 @@ /*------------------------------------------------------------------------* * usbd_make_config_desc + * + * This function will generate an USB config descriptor from the given + * USB template config descriptor, which will be inserted into the USB + * configuration. *------------------------------------------------------------------------*/ static void usbd_make_config_desc(struct usbd_temp_setup *temp, @@ -311,6 +326,9 @@ /*------------------------------------------------------------------------* * usbd_make_device_desc + * + * This function will generate an USB device descriptor from the + * given USB template device descriptor. *------------------------------------------------------------------------*/ static void usbd_make_device_desc(struct usbd_temp_setup *temp, @@ -404,6 +422,10 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_match + * + * Return values: + * 0: The endpoint profile does not match the criterias + * Else: The endpoint profile matches the criterias *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_match(const struct usbd_hw_ep_profile *pf, @@ -426,6 +448,13 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_find_match + * + * This function is used to find the best matching endpoint profile + * for and endpoint belonging to an USB descriptor. + * + * Return values: + * 0: Success. Got a match. + * Else: Failure. No match. *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_find_match(struct usbd_hw_ep_scratch *ues, @@ -540,6 +569,13 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_get_needs + * + * This function will figure out the type and number of endpoints + * which are needed for an USB configuration. + * + * Return values: + * 0: Success. + * Else: Failure. *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_get_needs(struct usbd_hw_ep_scratch *ues, @@ -692,6 +728,9 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_resolve * + * This function will try to resolve endpoint requirements by the + * given endpoint profiles that the USB hardware reports. + * * Return values: * 0: Success * Else: Failure @@ -962,7 +1001,8 @@ /*------------------------------------------------------------------------* * usbd_temp_get_desc * - * This function is a demultiplexer for USB device requests. + * This function is a demultiplexer for local USB device side control + * endpoint requests. *------------------------------------------------------------------------*/ void usbd_temp_get_desc(struct usbd_device *udev, usb_device_request_t *req,