Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Aug 2009 13:43:29 GMT
From:      Sylvestre Gallon <syl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 166929 for review
Message-ID:  <200908021343.n72DhTkJ005393@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166929

Change 166929 by syl@syl_rincewind on 2009/08/02 13:43:09

	 Factorise pipe methods for avr32dci.

Affected files ...

.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/avr32dci.c#7 edit

Differences ...

==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/avr32dci.c#7 (text+ko) ====

@@ -1307,58 +1307,29 @@
 	USB_BUS_UNLOCK(&sc->sc_bus);
 }
 
-/*------------------------------------------------------------------------*
- * at91dci bulk support
- * at91dci control support
- * at91dci interrupt support
- *------------------------------------------------------------------------*/
-static void
-avr32dci_device_non_isoc_open(struct usb_xfer *xfer)
-{
-	return;
-}
+/*
+ * atmegadci ctl/bulk/intr support
+ */
 
 static void
-avr32dci_device_non_isoc_close(struct usb_xfer *xfer)
+avr32dci_device_dummy(struct usb_xfer *xfer)
 {
-	avr32dci_device_done(xfer, USB_ERR_CANCELLED);
+	return ;
 }
 
 static void
-avr32dci_device_non_isoc_enter(struct usb_xfer *xfer)
+avr32dci_device_xxx_start(struct usb_xfer *xfer)
 {
-	return;
-}
-
-static void
-avr32dci_device_non_isoc_start(struct usb_xfer *xfer)
-{
-	/* setup TDs */
 	avr32dci_setup_standard_chain(xfer);
 	avr32dci_start_standard_chain(xfer);
+	return ;
 }
 
-struct usb_pipe_methods avr32dci_device_non_isoc_methods =
-{
-	.open = avr32dci_device_non_isoc_open,
-	.close = avr32dci_device_non_isoc_close,
-	.enter = avr32dci_device_non_isoc_enter,
-	.start = avr32dci_device_non_isoc_start,
-};
-
-/*------------------------------------------------------------------------*
- * at91dci full speed isochronous support
- *------------------------------------------------------------------------*/
 static void
-avr32dci_device_isoc_fs_open(struct usb_xfer *xfer)
+avr32dci_device_xxx_close(struct usb_xfer *xfer)
 {
-	return;
-}
-
-static void
-avr32dci_device_isoc_fs_close(struct usb_xfer *xfer)
-{
 	avr32dci_device_done(xfer, USB_ERR_CANCELLED);
+	return ;
 }
 
 static void
@@ -1423,10 +1394,18 @@
 	avr32dci_start_standard_chain(xfer);
 }
 
+struct usb_pipe_methods avr32dci_device_non_isoc_methods =
+{
+	.open = avr32dci_device_dummy,
+	.enter = avr32dci_device_dummy,
+	.start = avr32dci_device_xxx_start,
+	.close = avr32dci_device_xxx_close,
+};
+
 struct usb_pipe_methods avr32dci_device_isoc_fs_methods =
 {
-	.open = avr32dci_device_isoc_fs_open,
-	.close = avr32dci_device_isoc_fs_close,
+	.open = avr32dci_device_dummy,
+	.close = avr32dci_device_xxx_close,
 	.enter = avr32dci_device_isoc_fs_enter,
 	.start = avr32dci_device_isoc_fs_start,
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908021343.n72DhTkJ005393>