Changeset 3dc519f in mainline
- Timestamp:
- 2017-07-24T01:46:36Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2fa43d1
- Parents:
- 60f7c590
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r60f7c590 r3dc519f 155 155 156 156 return cmd; 157 } 158 159 void xhci_stop_command_ring(xhci_hc_t *hc) 160 { 161 assert(hc); 162 163 XHCI_REG_SET(hc->op_regs, XHCI_OP_CS, 1); 164 165 /** 166 * Note: There is a bug in qemu that checks CS only when CRCR_HI 167 * is written, this (and the read/write in abort) ensures 168 * the command rings stops. 169 */ 170 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR_HI, XHCI_REG_RD(hc->op_regs, XHCI_OP_CRCR_HI)); 171 } 172 173 void xhci_abort_command_ring(xhci_hc_t *hc) 174 { 175 assert(hc); 176 177 XHCI_REG_WR(hc->op_regs, XHCI_OP_CA, 1); 178 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRCR_HI, XHCI_REG_RD(hc->op_regs, XHCI_OP_CRCR_HI)); 179 } 180 181 void xhci_start_command_ring(xhci_hc_t *hc) 182 { 183 assert(hc); 184 185 XHCI_REG_WR(hc->op_regs, XHCI_OP_CRR, 1); 186 ring_doorbell(hc, 0, 0); 157 187 } 158 188 … … 390 420 assert(trb); 391 421 422 // TODO: STOP & ABORT may not have command structs in the list! 423 392 424 usb_log_debug("HC(%p) Command completed.", hc); 393 425 -
uspace/drv/bus/usb/xhci/commands.h
r60f7c590 r3dc519f 62 62 void xhci_free_command(xhci_cmd_t *); 63 63 64 void xhci_stop_command_ring(xhci_hc_t *); 65 void xhci_abort_command_ring(xhci_hc_t *); 66 void xhci_start_command_ring(xhci_hc_t *); 67 64 68 int xhci_send_no_op_command(xhci_hc_t *, xhci_cmd_t *); 65 69 int xhci_send_enable_slot_command(xhci_hc_t *, xhci_cmd_t *);
Note:
See TracChangeset
for help on using the changeset viewer.