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)
253 tt = find_tt(qh->ps.udev);
255 list_add_tail(&qh->ps.ps_list, &tt->ps_list);
257 list_del(&qh->ps.ps_list);
260 i += qh->ps.bw_period)
270 struct ehci_per_sched *ps;
279 list_for_each_entry(ps, &tt->ps_list, ps_list) {
280 for (uframe = ps->bw_phase << 3; uframe < EHCI_BANDWIDTH_SIZE;
281 uframe += ps->bw_uperiod) {
283 x = ps->tt_usecs;
286 for (uf = ps->phase_uf; uf < 8; ++uf) {
355 struct ehci_per_sched *ps,
361 unsigned period = ps->bw_period;
362 unsigned usecs = ps->tt_usecs;
443 if (same_tt(dev, here.qh->ps.udev)) {
524 unsigned period = qh->ps.period;
526 dev_dbg(&qh->ps.udev->dev,
530 qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs);
536 for (i = qh->ps.phase; i < ehci->periodic_size; i += period) {
556 if (qh->ps.period > here.qh->ps.period)
577 ehci_to_hcd(ehci)->self.bandwidth_allocated += qh->ps.bw_period
578 ? ((qh->ps.usecs + qh->ps.c_usecs) / qh->ps.bw_period)
579 : (qh->ps.usecs * 8);
609 period = qh->ps.period ? : 1;
611 for (i = qh->ps.phase; i < ehci->periodic_size; i += period)
615 ehci_to_hcd(ehci)->self.bandwidth_allocated -= qh->ps.bw_period
616 ? ((qh->ps.usecs + qh->ps.c_usecs) / qh->ps.bw_period)
617 : (qh->ps.usecs * 8);
619 dev_dbg(&qh->ps.udev->dev,
621 qh->ps.period,
623 qh, qh->ps.phase, qh->ps.usecs, qh->ps.c_usecs);
780 if (qh->ps.c_usecs && uframe >= 6) /* FSTN territory? */
783 if (!check_period(ehci, frame, uframe, qh->ps.bw_uperiod, qh->ps.usecs))
785 if (!qh->ps.c_usecs) {
792 if (tt_available(ehci, &qh->ps, tt, frame, uframe)) {
798 qh->ps.bw_uperiod, qh->ps.c_usecs))
819 if (tt_no_collision(ehci, qh->ps.bw_period, qh->ps.udev, frame, mask)) {
821 qh->ps.bw_uperiod, qh->ps.c_usecs))
824 qh->ps.bw_uperiod, qh->ps.c_usecs))
847 if (qh->ps.phase != NO_FRAME) {
854 tt = find_tt(qh->ps.udev);
865 if (qh->ps.bw_period) {
869 for (i = qh->ps.bw_period; i > 0; --i) {
870 frame = ++ehci->random_frame & (qh->ps.bw_period - 1);
879 /* qh->ps.bw_period == 0 means every uframe */
887 qh->ps.phase = (qh->ps.period ? ehci->random_frame &
888 (qh->ps.period - 1) : 0);
889 qh->ps.bw_phase = qh->ps.phase & (qh->ps.bw_period - 1);
890 qh->ps.phase_uf = uframe;
891 qh->ps.cs_mask = qh->ps.period ?
897 hw->hw_info2 |= cpu_to_hc32(ehci, qh->ps.cs_mask);
1011 stream->ps.phase = NO_FRAME;
1056 stream->ps.usecs = HS_USECS_ISO(maxp);
1063 stream->ps.bw_uperiod = min_t(unsigned, tmp, urb->interval);
1066 stream->ps.period = urb->interval >> 3;
1067 stream->bandwidth = stream->ps.usecs * 8 /
1068 stream->ps.bw_uperiod;
1082 stream->ps.usecs = HS_USECS_ISO(maxp);
1084 stream->ps.tt_usecs = NS_TO_US(think_time + usb_calc_bus_time(
1091 stream->ps.c_usecs = stream->ps.usecs;
1092 stream->ps.usecs = HS_USECS_ISO(1);
1093 stream->ps.cs_mask = 1;
1097 stream->ps.cs_mask |= tmp << (8 + 2);
1099 stream->ps.cs_mask = smask_out[hs_transfers - 1];
1106 stream->ps.bw_period = min_t(unsigned, tmp, urb->interval);
1107 stream->ps.bw_uperiod = stream->ps.bw_period << 3;
1109 stream->ps.period = urb->interval;
1111 stream->bandwidth = (stream->ps.usecs + stream->ps.c_usecs) /
1112 stream->ps.bw_period;
1118 stream->ps.udev = dev;
1119 stream->ps.ep = urb->ep;
1307 int usecs = stream->ps.usecs;
1308 int c_usecs = stream->ps.c_usecs;
1309 int tt_usecs = stream->ps.tt_usecs;
1312 if (stream->ps.phase == NO_FRAME) /* Bandwidth wasn't reserved */
1314 uframe = stream->ps.bw_phase << 3;
1316 bandwidth_dbg(ehci, sign, "iso", &stream->ps);
1325 for (i = uframe + stream->ps.phase_uf; i < EHCI_BANDWIDTH_SIZE;
1326 i += stream->ps.bw_uperiod)
1330 s_mask = stream->ps.cs_mask;
1335 i += stream->ps.bw_uperiod) {
1336 for ((j = stream->ps.phase_uf, m = 1 << j); j < 8;
1351 tt = find_tt(stream->ps.udev);
1353 list_add_tail(&stream->ps.ps_list, &tt->ps_list);
1355 list_del(&stream->ps.ps_list);
1358 i += stream->ps.bw_period)
1373 usecs = ehci->uframe_periodic_max - stream->ps.usecs;
1375 for (uframe &= stream->ps.bw_uperiod - 1; uframe < EHCI_BANDWIDTH_SIZE;
1376 uframe += stream->ps.bw_uperiod) {
1395 mask = stream->ps.cs_mask << (uframe & 7);
1398 if (((stream->ps.cs_mask & 0xff) << (uframe & 7)) >= (1 << 7))
1406 uframe &= stream->ps.bw_uperiod - 1;
1414 if (!tt_available(ehci, &stream->ps, tt, frame, uf))
1420 if (!tt_no_collision(ehci, stream->ps.bw_period,
1421 stream->ps.udev, frame, mask))
1431 max_used = ehci->uframe_periodic_max - stream->ps.usecs;
1432 for (tmp = stream->ps.cs_mask & 0xff; tmp; tmp >>= 1, uf++) {
1438 if (stream->ps.c_usecs) {
1440 stream->ps.c_usecs;
1444 if ((stream->ps.cs_mask & tmp) == 0)
1451 uframe += stream->ps.bw_uperiod;
1454 stream->ps.cs_mask <<= uframe & 7;
1455 stream->splits = cpu_to_hc32(ehci, stream->ps.cs_mask);
1495 if (stream->ps.phase == NO_FRAME) {
1497 struct ehci_tt *tt = find_tt(stream->ps.udev);
1535 stream->ps.phase = (start >> 3) &
1536 (stream->ps.period - 1);
1537 stream->ps.bw_phase = stream->ps.phase &
1538 (stream->ps.bw_period - 1);
1539 stream->ps.phase_uf = start & 7;
1545 start = (stream->ps.phase << 3) + stream->ps.phase_uf;
1994 iso_sched->span = urb->number_of_packets * stream->ps.period;
2306 if (urb->interval != stream->ps.period) {
2308 stream->ps.period, urb->interval);