Lines Matching refs:p

226     DWC2Packet *p;  in dwc2_handle_packet()  local
248 p = &s->packet[chan]; in dwc2_handle_packet()
250 trace_usb_dwc2_handle_packet(chan, dev, &p->packet, epnum, types[eptype], in dwc2_handle_packet()
267 if (p->small) { in dwc2_handle_packet()
282 usb_packet_init(&p->packet); in dwc2_handle_packet()
283 usb_packet_setup(&p->packet, pid, ep, 0, hcdma, in dwc2_handle_packet()
285 usb_packet_addbuf(&p->packet, s->usb_buf[chan], tlen); in dwc2_handle_packet()
286 p->async = DWC2_ASYNC_NONE; in dwc2_handle_packet()
287 usb_handle_packet(dev, &p->packet); in dwc2_handle_packet()
289 tlen = p->len; in dwc2_handle_packet()
292 stsidx = -p->packet.status; in dwc2_handle_packet()
294 actual = p->packet.actual_length; in dwc2_handle_packet()
298 if (p->packet.status != USB_RET_SUCCESS && in dwc2_handle_packet()
299 p->packet.status != USB_RET_NAK && in dwc2_handle_packet()
300 p->packet.status != USB_RET_STALL && in dwc2_handle_packet()
301 p->packet.status != USB_RET_ASYNC) { in dwc2_handle_packet()
305 if (p->packet.status == USB_RET_ASYNC) { in dwc2_handle_packet()
306 trace_usb_dwc2_async_packet(&p->packet, chan, dev, epnum, in dwc2_handle_packet()
309 assert(p->async != DWC2_ASYNC_INFLIGHT); in dwc2_handle_packet()
310 p->devadr = devadr; in dwc2_handle_packet()
311 p->epnum = epnum; in dwc2_handle_packet()
312 p->epdir = epdir; in dwc2_handle_packet()
313 p->mps = mps; in dwc2_handle_packet()
314 p->pid = pid; in dwc2_handle_packet()
315 p->index = index; in dwc2_handle_packet()
316 p->pcnt = pcnt; in dwc2_handle_packet()
317 p->len = tlen; in dwc2_handle_packet()
318 p->async = DWC2_ASYNC_INFLIGHT; in dwc2_handle_packet()
319 p->needs_service = false; in dwc2_handle_packet()
323 if (p->packet.status == USB_RET_SUCCESS) { in dwc2_handle_packet()
325 p->packet.status = USB_RET_BABBLE; in dwc2_handle_packet()
359 if (p->packet.status == USB_RET_NAK && in dwc2_handle_packet()
375 usb_packet_cleanup(&p->packet); in dwc2_handle_packet()
385 p->needs_service = false; in dwc2_handle_packet()
391 p->devadr = devadr; in dwc2_handle_packet()
392 p->epnum = epnum; in dwc2_handle_packet()
393 p->epdir = epdir; in dwc2_handle_packet()
394 p->mps = mps; in dwc2_handle_packet()
395 p->pid = pid; in dwc2_handle_packet()
396 p->index = index; in dwc2_handle_packet()
397 p->pcnt = pcnt; in dwc2_handle_packet()
398 p->len = len; in dwc2_handle_packet()
399 p->needs_service = true; in dwc2_handle_packet()
503 DWC2Packet *p; in dwc2_async_packet_complete() local
508 p = container_of(packet, DWC2Packet, packet); in dwc2_async_packet_complete()
509 dev = dwc2_find_device(s, p->devadr); in dwc2_async_packet_complete()
510 ep = usb_ep_get(dev, p->pid, p->epnum); in dwc2_async_packet_complete()
511 trace_usb_dwc2_async_packet_complete(port, packet, p->index >> 3, dev, in dwc2_async_packet_complete()
512 p->epnum, dirs[p->epdir], p->len); in dwc2_async_packet_complete()
513 assert(p->async == DWC2_ASYNC_INFLIGHT); in dwc2_async_packet_complete()
521 dwc2_handle_packet(s, p->devadr, dev, ep, p->index, false); in dwc2_async_packet_complete()
523 p->async = DWC2_ASYNC_FINISHED; in dwc2_async_packet_complete()
570 DWC2Packet *p; in dwc2_work_bh() local
587 p = &s->packet[chan]; in dwc2_work_bh()
588 if (p->needs_service) { in dwc2_work_bh()
589 dev = dwc2_find_device(s, p->devadr); in dwc2_work_bh()
590 ep = usb_ep_get(dev, p->pid, p->epnum); in dwc2_work_bh()
591 trace_usb_dwc2_work_bh_service(s->next_chan, chan, dev, p->epnum); in dwc2_work_bh()
592 dwc2_handle_packet(s, p->devadr, dev, ep, p->index, true); in dwc2_work_bh()
618 DWC2Packet *p; in dwc2_enable_chan() local
621 p = &s->packet[index >> 3]; in dwc2_enable_chan()
633 trace_usb_dwc2_enable_chan(index >> 3, dev, &p->packet, epnum); in dwc2_enable_chan()
653 p->small = false; in dwc2_enable_chan()
655 p->small = true; in dwc2_enable_chan()