Lines Matching refs:ps
195 struct ehci_per_sched *ps)
197 dev_dbg(&ps->udev->dev,
199 ps->ep->desc.bEndpointAddress,
201 (ps->bw_phase << 3) + ps->phase_uf, ps->bw_uperiod,
202 ps->phase, ps->phase_uf, ps->period,
203 ps->usecs, ps->c_usecs, ps->cs_mask);
211 int usecs = qh->ps.usecs;
212 int c_usecs = qh->ps.c_usecs;
213 int tt_usecs = qh->ps.tt_usecs;
216 if (qh->ps.phase == NO_FRAME) /* Bandwidth wasn't reserved */
218 start_uf = qh->ps.bw_phase << 3;
220 bandwidth_dbg(ehci, sign, "intr", &qh->ps);
229 for (i = start_uf + qh->ps.phase_uf; i < EHCI_BANDWIDTH_SIZE;
230 i += qh->ps.bw_uperiod)
234 if (qh->ps.c_usecs) {
237 i += qh->ps.bw_uperiod) {
239 if (qh->ps.cs_mask & m)
247 tt = find_tt(qh->ps.udev);
249 list_add_tail(&qh->ps.ps_list, &tt->ps_list);
251 list_del(&qh->ps.ps_list);
254 i += qh->ps.bw_period)
264 struct ehci_per_sched *ps;
273 list_for_each_entry(ps, &tt->ps_list, ps_list) {
274 for (uframe = ps->bw_phase << 3; uframe < EHCI_BANDWIDTH_SIZE;
275 uframe += ps->bw_uperiod) {
277 x = ps->tt_usecs;
280 for (uf = ps->phase_uf; uf < 8; ++uf) {
349 struct ehci_per_sched *ps,
355 unsigned period = ps->bw_period;
356 unsigned usecs = ps->tt_usecs;
437 if (same_tt(dev, here.qh->ps.udev)) {
517 unsigned period = qh->ps.period;
519 dev_dbg(&qh->ps.udev->dev,
523 qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs);
529 for (i = qh->ps.phase; i < ehci->periodic_size; i += period) {
549 if (qh->ps.period > here.qh->ps.period)
570 ehci_to_hcd(ehci)->self.bandwidth_allocated += qh->ps.bw_period
571 ? ((qh->ps.usecs + qh->ps.c_usecs) / qh->ps.bw_period)
572 : (qh->ps.usecs * 8);
602 period = qh->ps.period ? : 1;
604 for (i = qh->ps.phase; i < ehci->periodic_size; i += period)
608 ehci_to_hcd(ehci)->self.bandwidth_allocated -= qh->ps.bw_period
609 ? ((qh->ps.usecs + qh->ps.c_usecs) / qh->ps.bw_period)
610 : (qh->ps.usecs * 8);
612 dev_dbg(&qh->ps.udev->dev,
614 qh->ps.period,
616 qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs);
773 if (qh->ps.c_usecs && uframe >= 6) /* FSTN territory? */
776 if (!check_period(ehci, frame, uframe, qh->ps.bw_uperiod, qh->ps.usecs))
778 if (!qh->ps.c_usecs) {
785 if (tt_available(ehci, &qh->ps, tt, frame, uframe)) {
791 qh->ps.bw_uperiod, qh->ps.c_usecs))
812 if (tt_no_collision(ehci, qh->ps.bw_period, qh->ps.udev, frame, mask)) {
814 qh->ps.bw_uperiod, qh->ps.c_usecs))
817 qh->ps.bw_uperiod, qh->ps.c_usecs))
840 if (qh->ps.phase != NO_FRAME) {
847 tt = find_tt(qh->ps.udev);
858 if (qh->ps.bw_period) {
862 for (i = qh->ps.bw_period; i > 0; --i) {
863 frame = ++ehci->random_frame & (qh->ps.bw_period - 1);
872 /* qh->ps.bw_period == 0 means every uframe */
880 qh->ps.phase = (qh->ps.period ? ehci->random_frame &
881 (qh->ps.period - 1) : 0);
882 qh->ps.bw_phase = qh->ps.phase & (qh->ps.bw_period - 1);
883 qh->ps.phase_uf = uframe;
884 qh->ps.cs_mask = qh->ps.period ?
890 hw->hw_info2 |= cpu_to_hc32(ehci, qh->ps.cs_mask);
1004 stream->ps.phase = NO_FRAME;
1049 stream->ps.usecs = HS_USECS_ISO(maxp);
1056 stream->ps.bw_uperiod = min_t(unsigned, tmp, urb->interval);
1059 stream->ps.period = urb->interval >> 3;
1060 stream->bandwidth = stream->ps.usecs * 8 /
1061 stream->ps.bw_uperiod;
1075 stream->ps.usecs = HS_USECS_ISO(maxp);
1077 stream->ps.tt_usecs = NS_TO_US(think_time + usb_calc_bus_time(
1084 stream->ps.c_usecs = stream->ps.usecs;
1085 stream->ps.usecs = HS_USECS_ISO(1);
1086 stream->ps.cs_mask = 1;
1090 stream->ps.cs_mask |= tmp << (8 + 2);
1092 stream->ps.cs_mask = smask_out[hs_transfers - 1];
1099 stream->ps.bw_period = min_t(unsigned, tmp, urb->interval);
1100 stream->ps.bw_uperiod = stream->ps.bw_period << 3;
1102 stream->ps.period = urb->interval;
1104 stream->bandwidth = (stream->ps.usecs + stream->ps.c_usecs) /
1105 stream->ps.bw_period;
1111 stream->ps.udev = dev;
1112 stream->ps.ep = urb->ep;
1302 int usecs = stream->ps.usecs;
1303 int c_usecs = stream->ps.c_usecs;
1304 int tt_usecs = stream->ps.tt_usecs;
1307 if (stream->ps.phase == NO_FRAME) /* Bandwidth wasn't reserved */
1309 uframe = stream->ps.bw_phase << 3;
1311 bandwidth_dbg(ehci, sign, "iso", &stream->ps);
1320 for (i = uframe + stream->ps.phase_uf; i < EHCI_BANDWIDTH_SIZE;
1321 i += stream->ps.bw_uperiod)
1325 s_mask = stream->ps.cs_mask;
1330 i += stream->ps.bw_uperiod) {
1331 for ((j = stream->ps.phase_uf, m = 1 << j); j < 8;
1340 tt = find_tt(stream->ps.udev);
1342 list_add_tail(&stream->ps.ps_list, &tt->ps_list);
1344 list_del(&stream->ps.ps_list);
1347 i += stream->ps.bw_period)
1362 usecs = ehci->uframe_periodic_max - stream->ps.usecs;
1364 for (uframe &= stream->ps.bw_uperiod - 1; uframe < EHCI_BANDWIDTH_SIZE;
1365 uframe += stream->ps.bw_uperiod) {
1384 mask = stream->ps.cs_mask << (uframe & 7);
1387 if (((stream->ps.cs_mask & 0xff) << (uframe & 7)) >= (1 << 7))
1395 uframe &= stream->ps.bw_uperiod - 1;
1403 if (!tt_available(ehci, &stream->ps, tt, frame, uf))
1409 if (!tt_no_collision(ehci, stream->ps.bw_period,
1410 stream->ps.udev, frame, mask))
1420 max_used = ehci->uframe_periodic_max - stream->ps.usecs;
1421 for (tmp = stream->ps.cs_mask & 0xff; tmp; tmp >>= 1, uf++) {
1427 if (stream->ps.c_usecs) {
1429 stream->ps.c_usecs;
1433 if ((stream->ps.cs_mask & tmp) == 0)
1440 uframe += stream->ps.bw_uperiod;
1443 stream->ps.cs_mask <<= uframe & 7;
1444 stream->splits = cpu_to_hc32(ehci, stream->ps.cs_mask);
1484 if (stream->ps.phase == NO_FRAME) {
1486 struct ehci_tt *tt = find_tt(stream->ps.udev);
1524 stream->ps.phase = (start >> 3) &
1525 (stream->ps.period - 1);
1526 stream->ps.bw_phase = stream->ps.phase &
1527 (stream->ps.bw_period - 1);
1528 stream->ps.phase_uf = start & 7;
1534 start = (stream->ps.phase << 3) + stream->ps.phase_uf;
1983 iso_sched->span = urb->number_of_packets * stream->ps.period;
2295 if (urb->interval != stream->ps.period) {
2297 stream->ps.period, urb->interval);