From owner-p4-projects@FreeBSD.ORG Sun Aug 2 13:56:45 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D31F41065673; Sun, 2 Aug 2009 13:56:44 +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 7885A106566B for ; Sun, 2 Aug 2009 13:56:44 +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 66D6B8FC12 for ; Sun, 2 Aug 2009 13:56:44 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n72DuiBN006350 for ; Sun, 2 Aug 2009 13:56:44 GMT (envelope-from syl@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n72Duicp006348 for perforce@freebsd.org; Sun, 2 Aug 2009 13:56:44 GMT (envelope-from syl@FreeBSD.org) Date: Sun, 2 Aug 2009 13:56:44 GMT Message-Id: <200908021356.n72Duicp006348@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 166931 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, 02 Aug 2009 13:56:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=166931 Change 166931 by syl@syl_rincewind on 2009/08/02 13:56:11 Factorise pipe methods for uss820dci. Fix a typo in comment. Affected files ... .. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/uss820dci.c#8 edit Differences ... ==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/uss820dci.c#8 (text+ko) ==== @@ -1526,133 +1526,32 @@ USB_BUS_UNLOCK(&sc->sc_bus); } -/*------------------------------------------------------------------------* - * at91dci bulk support - *------------------------------------------------------------------------*/ -static void -uss820dci_device_bulk_open(struct usb_xfer *xfer) -{ - return; -} +/* + * uss820dci ctl/bulk/intr support + */ static void -uss820dci_device_bulk_close(struct usb_xfer *xfer) +uss820dci_device_dummy(struct usb_xfer *xfer) { - uss820dci_device_done(xfer, USB_ERR_CANCELLED); + return ; } static void -uss820dci_device_bulk_enter(struct usb_xfer *xfer) -{ - return; -} - -static void -uss820dci_device_bulk_start(struct usb_xfer *xfer) +uss820dci_device_xxx_start(struct usb_xfer *xfer) { - /* setup TDs */ uss820dci_setup_standard_chain(xfer); uss820dci_start_standard_chain(xfer); + return ; } -struct usb_pipe_methods uss820dci_device_bulk_methods = -{ - .open = uss820dci_device_bulk_open, - .close = uss820dci_device_bulk_close, - .enter = uss820dci_device_bulk_enter, - .start = uss820dci_device_bulk_start, -}; - -/*------------------------------------------------------------------------* - * at91dci control support - *------------------------------------------------------------------------*/ static void -uss820dci_device_ctrl_open(struct usb_xfer *xfer) +uss820dci_device_xxx_close(struct usb_xfer *xfer) { - return; -} - -static void -uss820dci_device_ctrl_close(struct usb_xfer *xfer) -{ uss820dci_device_done(xfer, USB_ERR_CANCELLED); + return ; } static void -uss820dci_device_ctrl_enter(struct usb_xfer *xfer) -{ - return; -} - -static void -uss820dci_device_ctrl_start(struct usb_xfer *xfer) -{ - /* setup TDs */ - uss820dci_setup_standard_chain(xfer); - uss820dci_start_standard_chain(xfer); -} - -struct usb_pipe_methods uss820dci_device_ctrl_methods = -{ - .open = uss820dci_device_ctrl_open, - .close = uss820dci_device_ctrl_close, - .enter = uss820dci_device_ctrl_enter, - .start = uss820dci_device_ctrl_start, -}; - -/*------------------------------------------------------------------------* - * at91dci interrupt support - *------------------------------------------------------------------------*/ -static void -uss820dci_device_intr_open(struct usb_xfer *xfer) -{ - return; -} - -static void -uss820dci_device_intr_close(struct usb_xfer *xfer) -{ - uss820dci_device_done(xfer, USB_ERR_CANCELLED); -} - -static void -uss820dci_device_intr_enter(struct usb_xfer *xfer) -{ - return; -} - -static void -uss820dci_device_intr_start(struct usb_xfer *xfer) -{ - /* setup TDs */ - uss820dci_setup_standard_chain(xfer); - uss820dci_start_standard_chain(xfer); -} - -struct usb_pipe_methods uss820dci_device_intr_methods = -{ - .open = uss820dci_device_intr_open, - .close = uss820dci_device_intr_close, - .enter = uss820dci_device_intr_enter, - .start = uss820dci_device_intr_start, -}; - -/*------------------------------------------------------------------------* - * at91dci full speed isochronous support - *------------------------------------------------------------------------*/ -static void -uss820dci_device_isoc_fs_open(struct usb_xfer *xfer) -{ - return; -} - -static void -uss820dci_device_isoc_fs_close(struct usb_xfer *xfer) -{ - uss820dci_device_done(xfer, USB_ERR_CANCELLED); -} - -static void uss820dci_device_isoc_fs_enter(struct usb_xfer *xfer) { struct uss820dci_softc *sc = USS820_DCI_BUS2SC(xfer->xroot->bus); @@ -1711,16 +1610,40 @@ uss820dci_start_standard_chain(xfer); } +struct usb_pipe_methods uss820dci_device_bulk_methods = +{ + .open = uss820dci_device_dummy, + .enter = uss820dci_device_dummy, + .close = uss820dci_device_xxx_close, + .start = uss820dci_device_xxx_start, +}; + +struct usb_pipe_methods uss820dci_device_ctrl_methods = +{ + .open = uss820dci_device_dummy, + .enter = uss820dci_device_dummy, + .close = uss820dci_device_xxx_close, + .start = uss820dci_device_xxx_start, +}; + +struct usb_pipe_methods uss820dci_device_intr_methods = +{ + .open = uss820dci_device_dummy, + .enter = uss820dci_device_dummy, + .close = uss820dci_device_xxx_close, + .start = uss820dci_device_xxx_start, +}; + struct usb_pipe_methods uss820dci_device_isoc_fs_methods = { - .open = uss820dci_device_isoc_fs_open, - .close = uss820dci_device_isoc_fs_close, + .open = uss820dci_device_dummy, + .close = uss820dci_device_xxx_close, .enter = uss820dci_device_isoc_fs_enter, .start = uss820dci_device_isoc_fs_start, }; /*------------------------------------------------------------------------* - * at91dci root control support + * uss820dci root control support *------------------------------------------------------------------------* * Simulate a hardware HUB by handling all the necessary requests. *------------------------------------------------------------------------*/