aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/uhci-q.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 1f0c2cf26e5d..5631d89c8730 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -1065,13 +1065,18 @@ static int uhci_submit_interrupt(struct uhci_hcd *uhci, struct urb *urb,
1065 } 1065 }
1066 if (exponent < 0) 1066 if (exponent < 0)
1067 return -EINVAL; 1067 return -EINVAL;
1068 qh->period = 1 << exponent;
1069 qh->skel = SKEL_INDEX(exponent);
1070 1068
1071 /* For now, interrupt phase is fixed by the layout 1069 /* If the slot is full, try a lower period */
1072 * of the QH lists. */ 1070 do {
1073 qh->phase = (qh->period / 2) & (MAX_PHASE - 1); 1071 qh->period = 1 << exponent;
1074 ret = uhci_check_bandwidth(uhci, qh); 1072 qh->skel = SKEL_INDEX(exponent);
1073
1074 /* For now, interrupt phase is fixed by the layout
1075 * of the QH lists.
1076 */
1077 qh->phase = (qh->period / 2) & (MAX_PHASE - 1);
1078 ret = uhci_check_bandwidth(uhci, qh);
1079 } while (ret != 0 && --exponent >= 0);
1075 if (ret) 1080 if (ret)
1076 return ret; 1081 return ret;
1077 } else if (qh->period > urb->interval) 1082 } else if (qh->period > urb->interval)