diff options
Diffstat (limited to 'drivers/usb/host/uhci-q.c')
| -rw-r--r-- | drivers/usb/host/uhci-q.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 041c6ddb695c..da6f56d996ce 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
| @@ -1303,7 +1303,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, | |||
| 1303 | } | 1303 | } |
| 1304 | 1304 | ||
| 1305 | /* Fell behind? */ | 1305 | /* Fell behind? */ |
| 1306 | if (uhci_frame_before_eq(frame, next)) { | 1306 | if (!uhci_frame_before_eq(next, frame)) { |
| 1307 | 1307 | ||
| 1308 | /* USB_ISO_ASAP: Round up to the first available slot */ | 1308 | /* USB_ISO_ASAP: Round up to the first available slot */ |
| 1309 | if (urb->transfer_flags & URB_ISO_ASAP) | 1309 | if (urb->transfer_flags & URB_ISO_ASAP) |
| @@ -1311,13 +1311,17 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, | |||
| 1311 | -qh->period; | 1311 | -qh->period; |
| 1312 | 1312 | ||
| 1313 | /* | 1313 | /* |
| 1314 | * Not ASAP: Use the next slot in the stream. If | 1314 | * Not ASAP: Use the next slot in the stream, |
| 1315 | * the entire URB falls before the threshold, fail. | 1315 | * no matter what. |
| 1316 | */ | 1316 | */ |
| 1317 | else if (!uhci_frame_before_eq(next, | 1317 | else if (!uhci_frame_before_eq(next, |
| 1318 | frame + (urb->number_of_packets - 1) * | 1318 | frame + (urb->number_of_packets - 1) * |
| 1319 | qh->period)) | 1319 | qh->period)) |
| 1320 | return -EXDEV; | 1320 | dev_dbg(uhci_dev(uhci), "iso underrun %p (%u+%u < %u)\n", |
| 1321 | urb, frame, | ||
| 1322 | (urb->number_of_packets - 1) * | ||
| 1323 | qh->period, | ||
| 1324 | next); | ||
| 1321 | } | 1325 | } |
| 1322 | } | 1326 | } |
| 1323 | 1327 | ||
