From owner-p4-projects@FreeBSD.ORG Thu Aug 6 19:06:57 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 64D9A1065673; Thu, 6 Aug 2009 19:06:57 +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 2217D1065672 for ; Thu, 6 Aug 2009 19:06:57 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 05C098FC0A for ; Thu, 6 Aug 2009 19:06:57 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n76J6uEm085408 for ; Thu, 6 Aug 2009 19:06:56 GMT (envelope-from syl@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n76J6uDF085406 for perforce@freebsd.org; Thu, 6 Aug 2009 19:06:56 GMT (envelope-from syl@FreeBSD.org) Date: Thu, 6 Aug 2009 19:06:56 GMT Message-Id: <200908061906.n76J6uDF085406@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to syl@FreeBSD.org using -f From: Sylvestre Gallon To: Perforce Change Reviews Cc: Subject: PERFORCE change 167072 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: Thu, 06 Aug 2009 19:06:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=167072 Change 167072 by syl@syl_atuin on 2009/08/06 19:06:40 Start the roothub_exec factorisation. Affected files ... .. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/usb_roothub_exec.c#2 edit Differences ... ==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/usb_roothub_exec.c#2 (text+ko) ==== @@ -1,0 +1,91 @@ +/*- + * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define USB_DEBUG_VAR s3c24dcidebug + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +struct usb_generic_flags { + +}; + +struct usb_generic_hub_temp { + uWord wValue; + struct usb_port_status ps; +}; + +struct usb_generic_softc { + struct usb_bus sc_bus; + struct usb_generic_hub_temp sc_hub_temp; + + uint8_t sc_rt_addr; + uint8_t sc_conf; + + struct usb_generic_flags sc_flags; +}; + +static usb_error_t +genric_roothub_exec(struct usb_device *udev, + struct usb_device_request *req, const void **pptr, uint16_t *plength) +{ + const void *ptr; + uint16_t len; + uint16_t value; + uint16_t index; + usb_error_t err; +}