Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2014 13:46:38 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265949 - head/sys/dev/usb/controller
Message-ID:  <201405131346.s4DDkcqS096010@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue May 13 13:46:38 2014
New Revision: 265949
URL: http://svnweb.freebsd.org/changeset/base/265949

Log:
  - Isochronous transfers should use the alternate next transfer
  descriptor upon receiving a short packet, in host and device mode.
  - Correct some comments.

Modified:
  head/sys/dev/usb/controller/at91dci.c
  head/sys/dev/usb/controller/atmegadci.c
  head/sys/dev/usb/controller/avr32dci.c
  head/sys/dev/usb/controller/musb_otg.c
  head/sys/dev/usb/controller/uss820dci.c

Modified: head/sys/dev/usb/controller/at91dci.c
==============================================================================
--- head/sys/dev/usb/controller/at91dci.c	Tue May 13 13:20:23 2014	(r265948)
+++ head/sys/dev/usb/controller/at91dci.c	Tue May 13 13:46:38 2014	(r265949)
@@ -898,7 +898,8 @@ at91dci_setup_standard_chain(struct usb_
 	temp.td = NULL;
 	temp.td_next = xfer->td_start[0];
 	temp.offset = 0;
-	temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+	temp.setup_alt_next = xfer->flags_int.short_frames_ok ||
+	    xfer->flags_int.isochronous_xfr;
 	temp.did_stall = !xfer->flags_int.control_stall;
 
 	sc = AT9100_DCI_BUS2SC(xfer->xroot->bus);
@@ -1124,7 +1125,8 @@ at91dci_standard_done_sub(struct usb_xfe
 		}
 		/* Check for short transfer */
 		if (len > 0) {
-			if (xfer->flags_int.short_frames_ok) {
+			if (xfer->flags_int.short_frames_ok ||
+			    xfer->flags_int.isochronous_xfr) {
 				/* follow alt next */
 				if (td->alt_next) {
 					td = td->obj_next;

Modified: head/sys/dev/usb/controller/atmegadci.c
==============================================================================
--- head/sys/dev/usb/controller/atmegadci.c	Tue May 13 13:20:23 2014	(r265948)
+++ head/sys/dev/usb/controller/atmegadci.c	Tue May 13 13:46:38 2014	(r265949)
@@ -804,7 +804,8 @@ atmegadci_setup_standard_chain(struct us
 	temp.td = NULL;
 	temp.td_next = xfer->td_start[0];
 	temp.offset = 0;
-	temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+	temp.setup_alt_next = xfer->flags_int.short_frames_ok ||
+	    xfer->flags_int.isochronous_xfr;
 	temp.did_stall = !xfer->flags_int.control_stall;
 
 	sc = ATMEGA_BUS2SC(xfer->xroot->bus);
@@ -1010,7 +1011,8 @@ atmegadci_standard_done_sub(struct usb_x
 		}
 		/* Check for short transfer */
 		if (len > 0) {
-			if (xfer->flags_int.short_frames_ok) {
+			if (xfer->flags_int.short_frames_ok ||
+			    xfer->flags_int.isochronous_xfr) {
 				/* follow alt next */
 				if (td->alt_next) {
 					td = td->obj_next;
@@ -1380,9 +1382,9 @@ atmegadci_do_poll(struct usb_bus *bus)
 }
 
 /*------------------------------------------------------------------------*
- * at91dci bulk support
- * at91dci control support
- * at91dci interrupt support
+ * atmegadci bulk support
+ * atmegadci control support
+ * atmegadci interrupt support
  *------------------------------------------------------------------------*/
 static void
 atmegadci_device_non_isoc_open(struct usb_xfer *xfer)
@@ -1419,7 +1421,7 @@ static const struct usb_pipe_methods atm
 };
 
 /*------------------------------------------------------------------------*
- * at91dci full speed isochronous support
+ * atmegadci full speed isochronous support
  *------------------------------------------------------------------------*/
 static void
 atmegadci_device_isoc_fs_open(struct usb_xfer *xfer)
@@ -1505,7 +1507,7 @@ static const struct usb_pipe_methods atm
 };
 
 /*------------------------------------------------------------------------*
- * at91dci root control support
+ * atmegadci root control support
  *------------------------------------------------------------------------*
  * Simulate a hardware HUB by handling all the necessary requests.
  *------------------------------------------------------------------------*/

Modified: head/sys/dev/usb/controller/avr32dci.c
==============================================================================
--- head/sys/dev/usb/controller/avr32dci.c	Tue May 13 13:20:23 2014	(r265948)
+++ head/sys/dev/usb/controller/avr32dci.c	Tue May 13 13:46:38 2014	(r265949)
@@ -771,7 +771,8 @@ avr32dci_setup_standard_chain(struct usb
 	temp.td = NULL;
 	temp.td_next = xfer->td_start[0];
 	temp.offset = 0;
-	temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+	temp.setup_alt_next = xfer->flags_int.short_frames_ok ||
+	    xfer->flags_int.isochronous_xfr;
 	temp.did_stall = !xfer->flags_int.control_stall;
 
 	sc = AVR32_BUS2SC(xfer->xroot->bus);
@@ -979,7 +980,8 @@ avr32dci_standard_done_sub(struct usb_xf
 		}
 		/* Check for short transfer */
 		if (len > 0) {
-			if (xfer->flags_int.short_frames_ok) {
+			if (xfer->flags_int.short_frames_ok ||
+			    xfer->flags_int.isochronous_xfr) {
 				/* follow alt next */
 				if (td->alt_next) {
 					td = td->obj_next;
@@ -1310,9 +1312,9 @@ avr32dci_do_poll(struct usb_bus *bus)
 }
 
 /*------------------------------------------------------------------------*
- * at91dci bulk support
- * at91dci control support
- * at91dci interrupt support
+ * avr32dci bulk support
+ * avr32dci control support
+ * avr32dci interrupt support
  *------------------------------------------------------------------------*/
 static void
 avr32dci_device_non_isoc_open(struct usb_xfer *xfer)
@@ -1349,7 +1351,7 @@ static const struct usb_pipe_methods avr
 };
 
 /*------------------------------------------------------------------------*
- * at91dci full speed isochronous support
+ * avr32dci full speed isochronous support
  *------------------------------------------------------------------------*/
 static void
 avr32dci_device_isoc_fs_open(struct usb_xfer *xfer)
@@ -1434,7 +1436,7 @@ static const struct usb_pipe_methods avr
 };
 
 /*------------------------------------------------------------------------*
- * at91dci root control support
+ * avr32dci root control support
  *------------------------------------------------------------------------*
  * Simulate a hardware HUB by handling all the necessary requests.
  *------------------------------------------------------------------------*/

Modified: head/sys/dev/usb/controller/musb_otg.c
==============================================================================
--- head/sys/dev/usb/controller/musb_otg.c	Tue May 13 13:20:23 2014	(r265948)
+++ head/sys/dev/usb/controller/musb_otg.c	Tue May 13 13:46:38 2014	(r265949)
@@ -2403,7 +2403,8 @@ musbotg_setup_standard_chain(struct usb_
 	temp.td = NULL;
 	temp.td_next = xfer->td_start[0];
 	temp.offset = 0;
-	temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+	temp.setup_alt_next = xfer->flags_int.short_frames_ok ||
+	    xfer->flags_int.isochronous_xfr;
 	temp.did_stall = !xfer->flags_int.control_stall;
 	temp.channel = -1;
 	temp.dev_addr = dev_addr;
@@ -2714,7 +2715,8 @@ musbotg_standard_done_sub(struct usb_xfe
 		}
 		/* Check for short transfer */
 		if (len > 0) {
-			if (xfer->flags_int.short_frames_ok) {
+			if (xfer->flags_int.short_frames_ok ||
+			    xfer->flags_int.isochronous_xfr) {
 				/* follow alt next */
 				if (td->alt_next) {
 					td = td->obj_next;

Modified: head/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- head/sys/dev/usb/controller/uss820dci.c	Tue May 13 13:20:23 2014	(r265948)
+++ head/sys/dev/usb/controller/uss820dci.c	Tue May 13 13:46:38 2014	(r265949)
@@ -875,7 +875,8 @@ uss820dci_setup_standard_chain(struct us
 	temp.td = NULL;
 	temp.td_next = xfer->td_start[0];
 	temp.offset = 0;
-	temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+	temp.setup_alt_next = xfer->flags_int.short_frames_ok ||
+	    xfer->flags_int.isochronous_xfr;
 	temp.did_stall = !xfer->flags_int.control_stall;
 
 	sc = USS820_DCI_BUS2SC(xfer->xroot->bus);
@@ -1120,7 +1121,8 @@ uss820dci_standard_done_sub(struct usb_x
 		}
 		/* Check for short transfer */
 		if (len > 0) {
-			if (xfer->flags_int.short_frames_ok) {
+			if (xfer->flags_int.short_frames_ok ||
+			    xfer->flags_int.isochronous_xfr) {
 				/* follow alt next */
 				if (td->alt_next) {
 					td = td->obj_next;
@@ -1543,7 +1545,7 @@ uss820dci_do_poll(struct usb_bus *bus)
 }
 
 /*------------------------------------------------------------------------*
- * at91dci bulk support
+ * uss820dci bulk support
  *------------------------------------------------------------------------*/
 static void
 uss820dci_device_bulk_open(struct usb_xfer *xfer)
@@ -1580,7 +1582,7 @@ static const struct usb_pipe_methods uss
 };
 
 /*------------------------------------------------------------------------*
- * at91dci control support
+ * uss820dci control support
  *------------------------------------------------------------------------*/
 static void
 uss820dci_device_ctrl_open(struct usb_xfer *xfer)
@@ -1617,7 +1619,7 @@ static const struct usb_pipe_methods uss
 };
 
 /*------------------------------------------------------------------------*
- * at91dci interrupt support
+ * uss820dci interrupt support
  *------------------------------------------------------------------------*/
 static void
 uss820dci_device_intr_open(struct usb_xfer *xfer)
@@ -1654,7 +1656,7 @@ static const struct usb_pipe_methods uss
 };
 
 /*------------------------------------------------------------------------*
- * at91dci full speed isochronous support
+ * uss820dci full speed isochronous support
  *------------------------------------------------------------------------*/
 static void
 uss820dci_device_isoc_fs_open(struct usb_xfer *xfer)
@@ -1736,7 +1738,7 @@ static const struct usb_pipe_methods uss
 };
 
 /*------------------------------------------------------------------------*
- * at91dci root control support
+ * uss820dci root control support
  *------------------------------------------------------------------------*
  * Simulate a hardware HUB by handling all the necessary requests.
  *------------------------------------------------------------------------*/



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