Changeset c9ce62a in mainline for uspace/drv/bus/usb/xhci/commands.c
- Timestamp:
- 2017-07-13T18:42:42Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4fa5342
- Parents:
- 665bf3c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r665bf3c rc9ce62a 142 142 } 143 143 144 int xhci_send_evaluate_context_command(xhci_hc_t *hc, uint32_t slot_id, 145 xhci_input_ctx_t *ictx) 146 { 147 /** 148 * Note: All Drop Context flags of the input context shall be 0, 149 * all Add Context flags shall be initialize to indicate IDs 150 * of the contexts affected by the command. 151 * Refer to sections 6.2.2.3 and 6.3.3.3 for further info. 152 */ 153 xhci_trb_t trb; 154 memset(&trb, 0, sizeof(trb)); 155 156 uint64_t phys_addr = (uint64_t) addr_to_phys(ictx); 157 trb.parameter = host2xhci(32, phys_addr & 0xFFFFFFFFFFFFFFF0); 158 159 trb.control = host2xhci(32, XHCI_TRB_TYPE_EVALUATE_CONTEXT_CMD << 10); 160 trb.control |= host2xhci(32, hc->command_ring.pcs); 161 trb.control |= host2xhci(32, slot_id << 24); 162 163 return enqueue_trb(hc, &trb, 0, 0); 164 } 165 144 166 static int report_error(int code) 145 167 { … … 209 231 case XHCI_TRB_TYPE_CONFIGURE_ENDPOINT_CMD: 210 232 return EOK; 233 case XHCI_TRB_TYPE_EVALUATE_CONTEXT_CMD: 234 return EOK; 211 235 default: 212 236 usb_log_debug2("Unsupported command trb.");
Note:
See TracChangeset
for help on using the changeset viewer.