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()
684 struct xhci_TRB_t event_trb, origin_trb; // event ring trb以及其对应的command trb in xhci_hc_irq_handler()
758 xhci_hc[cid].current_event_ring_vaddr += sizeof(struct xhci_TRB_t); in xhci_hc_irq_handler()
1032 retval = xhci_send_command(id, (struct xhci_TRB_t *)&trb, true); in xhci_set_address()
1082 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_setup_stage()
1124 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_data_stage()
1142 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_data_stage()
1169 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_status_stage()
1182 __xhci_write_trb(ep, (struct xhci_TRB_t *)&trb); in xhci_status_stage()
1542 if (xhci_send_command(id, (struct xhci_TRB_t *)&trb, true) != 0) in xhci_get_descriptor()
1764 retval = xhci_send_command(id, (struct xhci_TRB_t *)&trb, true); in xhci_configure_endpoint()
1968 static int xhci_send_command(int id, struct xhci_TRB_t *trb, const bool do_ring) in xhci_send_command()
1977 xhci_hc[id].cmd_trb_vaddr += sizeof(struct xhci_TRB_t); // 跳转到下一个trb in xhci_send_command()