PERFORCE change 166926 for review

Sylvestre Gallon syl at FreeBSD.org
Sun Aug 2 13:36:23 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=166926

Change 166926 by syl at syl_rincewind on 2009/08/02 13:35:53

	Factorise pipe methods for at91dci. 

Affected files ...

.. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/at91dci.c#8 edit

Differences ...

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

@@ -1483,130 +1483,29 @@
 	USB_BUS_UNLOCK(&sc->sc_bus);
 }
 
-/*------------------------------------------------------------------------*
- * at91dci bulk support
- *------------------------------------------------------------------------*/
-static void
-at91dci_device_bulk_open(struct usb_xfer *xfer)
-{
-	return;
-}
+/*
+ * at91dci ctl/bulk/intr support
+ */
 
 static void
-at91dci_device_bulk_close(struct usb_xfer *xfer)
+at91dci_device_dummy(struct usb_xfer *xfer)
 {
-	at91dci_device_done(xfer, USB_ERR_CANCELLED);
+	return ;
 }
 
 static void
-at91dci_device_bulk_enter(struct usb_xfer *xfer)
+at91dci_device_xxx_start(struct usb_xfer *xfer)
 {
-	return;
-}
-
-static void
-at91dci_device_bulk_start(struct usb_xfer *xfer)
-{
-	/* setup TDs */
 	at91dci_setup_standard_chain(xfer);
 	at91dci_start_standard_chain(xfer);
+	return ;
 }
 
-struct usb_pipe_methods at91dci_device_bulk_methods =
-{
-	.open = at91dci_device_bulk_open,
-	.close = at91dci_device_bulk_close,
-	.enter = at91dci_device_bulk_enter,
-	.start = at91dci_device_bulk_start,
-};
-
-/*------------------------------------------------------------------------*
- * at91dci control support
- *------------------------------------------------------------------------*/
 static void
-at91dci_device_ctrl_open(struct usb_xfer *xfer)
-{
-	return;
-}
-
-static void
-at91dci_device_ctrl_close(struct usb_xfer *xfer)
+at91dci_device_xxx_close(struct usb_xfer *xfer)
 {
 	at91dci_device_done(xfer, USB_ERR_CANCELLED);
-}
-
-static void
-at91dci_device_ctrl_enter(struct usb_xfer *xfer)
-{
-	return;
-}
-
-static void
-at91dci_device_ctrl_start(struct usb_xfer *xfer)
-{
-	/* setup TDs */
-	at91dci_setup_standard_chain(xfer);
-	at91dci_start_standard_chain(xfer);
-}
-
-struct usb_pipe_methods at91dci_device_ctrl_methods =
-{
-	.open = at91dci_device_ctrl_open,
-	.close = at91dci_device_ctrl_close,
-	.enter = at91dci_device_ctrl_enter,
-	.start = at91dci_device_ctrl_start,
-};
-
-/*------------------------------------------------------------------------*
- * at91dci interrupt support
- *------------------------------------------------------------------------*/
-static void
-at91dci_device_intr_open(struct usb_xfer *xfer)
-{
-	return;
-}
-
-static void
-at91dci_device_intr_close(struct usb_xfer *xfer)
-{
-	at91dci_device_done(xfer, USB_ERR_CANCELLED);
-}
-
-static void
-at91dci_device_intr_enter(struct usb_xfer *xfer)
-{
-	return;
-}
-
-static void
-at91dci_device_intr_start(struct usb_xfer *xfer)
-{
-	/* setup TDs */
-	at91dci_setup_standard_chain(xfer);
-	at91dci_start_standard_chain(xfer);
-}
-
-struct usb_pipe_methods at91dci_device_intr_methods =
-{
-	.open = at91dci_device_intr_open,
-	.close = at91dci_device_intr_close,
-	.enter = at91dci_device_intr_enter,
-	.start = at91dci_device_intr_start,
-};
-
-/*------------------------------------------------------------------------*
- * at91dci full speed isochronous support
- *------------------------------------------------------------------------*/
-static void
-at91dci_device_isoc_fs_open(struct usb_xfer *xfer)
-{
-	return;
-}
-
-static void
-at91dci_device_isoc_fs_close(struct usb_xfer *xfer)
-{
-	at91dci_device_done(xfer, USB_ERR_CANCELLED);
+	return ;
 }
 
 static void
@@ -1668,10 +1567,35 @@
 	at91dci_start_standard_chain(xfer);
 }
 
+struct usb_pipe_methods at91dci_device_bulk_methods =
+{
+	.open = at91dci_device_dummy,
+	.enter = at91dci_device_dummy,
+	.close = at91dci_device_xxx_close,
+	.start = at91dci_device_xxx_start,
+};
+
+struct usb_pipe_methods at91dci_device_ctrl_methods =
+{
+	.open = at91dci_device_dummy,
+	.enter = at91dci_device_dummy,
+	.close = at91dci_device_xxx_close,
+	.start = at91dci_device_xxx_start,
+};
+
+struct usb_pipe_methods at91dci_device_intr_methods =
+{
+	.open = at91dci_device_dummy,
+	.enter = at91dci_device_dummy,
+	.close = at91dci_device_xxx_close,
+	.start = at91dci_device_xxx_start,
+};
+
+
 struct usb_pipe_methods at91dci_device_isoc_fs_methods =
 {
-	.open = at91dci_device_isoc_fs_open,
-	.close = at91dci_device_isoc_fs_close,
+	.open = at91dci_device_dummy,
+	.close = at91dci_device_dummy,
 	.enter = at91dci_device_isoc_fs_enter,
 	.start = at91dci_device_isoc_fs_start,
 };


More information about the p4-projects mailing list