- Isochronous transfers should use the alternate next transfer

descriptor upon receiving a short packet, in host and device mode.
- Correct some comments.
This commit is contained in:
Hans Petter Selasky 2014-05-13 13:46:38 +00:00
parent afaa41f6b8
commit 40ba168d27
5 changed files with 35 additions and 25 deletions

View File

@ -898,7 +898,8 @@ at91dci_setup_standard_chain(struct usb_xfer *xfer)
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_xfer *xfer)
}
/* 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;

View File

@ -804,7 +804,8 @@ atmegadci_setup_standard_chain(struct usb_xfer *xfer)
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_xfer *xfer)
}
/* 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 atmegadci_device_non_isoc_methods =
};
/*------------------------------------------------------------------------*
* 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 atmegadci_device_isoc_fs_methods =
};
/*------------------------------------------------------------------------*
* at91dci root control support
* atmegadci root control support
*------------------------------------------------------------------------*
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/

View File

@ -771,7 +771,8 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
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_xfer *xfer)
}
/* 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 avr32dci_device_non_isoc_methods =
};
/*------------------------------------------------------------------------*
* 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 avr32dci_device_isoc_fs_methods =
};
/*------------------------------------------------------------------------*
* at91dci root control support
* avr32dci root control support
*------------------------------------------------------------------------*
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/

View File

@ -2403,7 +2403,8 @@ musbotg_setup_standard_chain(struct usb_xfer *xfer)
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_xfer *xfer)
}
/* 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;

View File

@ -875,7 +875,8 @@ uss820dci_setup_standard_chain(struct usb_xfer *xfer)
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_xfer *xfer)
}
/* 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 uss820dci_device_bulk_methods =
};
/*------------------------------------------------------------------------*
* 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 uss820dci_device_ctrl_methods =
};
/*------------------------------------------------------------------------*
* 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 uss820dci_device_intr_methods =
};
/*------------------------------------------------------------------------*
* 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 uss820dci_device_isoc_fs_methods =
};
/*------------------------------------------------------------------------*
* at91dci root control support
* uss820dci root control support
*------------------------------------------------------------------------*
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/