Changeset 19f0048 in mainline for uspace/drv/bus/usb/xhci/commands.c
- Timestamp:
- 2018-02-01T02:13:34Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 17d34a8
- Parents:
- 53fdf8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r53fdf8c r19f0048 86 86 list_initialize(&cr->cmd_list); 87 87 88 cr->state = XHCI_CR_STATE_OPEN;89 90 88 return EOK; 91 89 } … … 251 249 fibril_condvar_wait(&cr->stopped_cv, &cr->guard); 252 250 251 fibril_mutex_unlock(&cr->guard); 252 } 253 254 /** 255 * Mark the command ring as stopped. NAK new commands, abort running, do not 256 * touch the HC as it's probably broken. 257 */ 258 void xhci_nuke_command_ring(xhci_hc_t *hc) 259 { 260 xhci_cmd_ring_t *cr = get_cmd_ring(hc); 261 fibril_mutex_lock(&cr->guard); 262 // Prevent others from starting CR again. 263 cr_set_state(cr, XHCI_CR_STATE_CLOSED); 264 fibril_mutex_unlock(&cr->guard); 265 } 266 267 /** 268 * Mark the command ring as working again. 269 */ 270 void xhci_start_command_ring(xhci_hc_t *hc) 271 { 272 xhci_cmd_ring_t *cr = get_cmd_ring(hc); 273 fibril_mutex_lock(&cr->guard); 274 // Prevent others from starting CR again. 275 cr_set_state(cr, XHCI_CR_STATE_OPEN); 253 276 fibril_mutex_unlock(&cr->guard); 254 277 }
Note:
See TracChangeset
for help on using the changeset viewer.