Lines Matching refs:xhci_TRB_t

43 static int xhci_send_command(int id, struct xhci_TRB_t *trb, const bool do_ring);
109 static __always_inline void xhci_get_trb(struct xhci_TRB_t *trb, const uint64_t address) in xhci_get_trb()
122 static __always_inline void xhci_set_trb(struct xhci_TRB_t *trb, const uint64_t address) in xhci_set_trb()
199 static __always_inline void __xhci_write_trb(struct xhci_ep_info_t *ep_info, struct xhci_TRB_t *trb) in __xhci_write_trb()
201 memcpy((void *)ep_info->current_ep_ring_vaddr, trb, sizeof(struct xhci_TRB_t)); in __xhci_write_trb()
203 ep_info->current_ep_ring_vaddr += sizeof(struct xhci_TRB_t); in __xhci_write_trb()
545 int total_size = trbs * sizeof(struct xhci_TRB_t); in xhci_create_ring()
551 xhci_TRB_set_link_cmd(vaddr + total_size - sizeof(struct xhci_TRB_t)); in xhci_create_ring()
572 const uint64_t seg_vaddr = (const uint64_t)kmalloc(trbs * sizeof(struct xhci_TRB_t), 0); in xhci_create_event_ring()
577 memset((void *)seg_vaddr, 0, trbs * sizeof(struct xhci_TRB_t)); in xhci_create_event_ring()
686 struct xhci_TRB_t event_trb, origin_trb; // event ring trb以及其对应的command trb in xhci_hc_irq_handler()
760 xhci_hc[cid].current_event_ring_vaddr += sizeof(struct xhci_TRB_t); in xhci_hc_irq_handler()
1034 retval = xhci_send_command(id, (struct xhci_TRB_t *)&trb, true); in xhci_set_address()
1084 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_setup_stage()
1126 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_data_stage()
1144 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_data_stage()
1171 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_status_stage()
1184 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_status_stage()
1544 if (xhci_send_command(id, (struct xhci_TRB_t *)&trb, true) != 0) in xhci_get_descriptor()
1766 retval = xhci_send_command(id, (struct xhci_TRB_t *)&trb, true); in xhci_configure_endpoint()
1970 static int xhci_send_command(int id, struct xhci_TRB_t *trb, const bool do_ring) in xhci_send_command()
1979 xhci_hc[id].cmd_trb_vaddr += sizeof(struct xhci_TRB_t); // 跳转到下一个trb in xhci_send_command()