Lines Matching defs:slot_id

54 static zx_status_t xhci_address_device(xhci_t* xhci, uint32_t slot_id, uint32_t hub_address,
56 zxlogf(TRACE, "xhci_address_device slot_id: %d port: %d hub_address: %d speed: %d\n",
57 slot_id, port, hub_address, speed);
67 xhci_slot_t* slot = &xhci->slots[slot_id];
173 xhci_set_dbcaa(xhci, slot_id, io_buffer_phys(&slot->buffer));
178 (slot_id << TRB_SLOT_ID_START));
184 ((slot_id << TRB_SLOT_ID_START) | TRB_ADDRESS_DEVICE_BSR));
191 status = xhci_get_descriptor(xhci, slot_id, USB_TYPE_STANDARD, USB_DT_DEVICE << 8, 0,
219 (slot_id << TRB_SLOT_ID_START));
273 static void xhci_disable_slot(xhci_t* xhci, uint32_t slot_id) {
274 xhci_send_command(xhci, TRB_CMD_DISABLE_SLOT, 0, (slot_id << TRB_SLOT_ID_START));
276 zxlogf(TRACE, "cleaning up slot %d\n", slot_id);
277 xhci_slot_t* slot = &xhci->slots[slot_id];
297 uint32_t slot_id = 0;
304 slot_id = xhci_sync_command_slot_id(&command);
310 result = xhci_address_device(xhci, slot_id, hub_address, port, speed);
319 result = xhci_get_descriptor(xhci, slot_id, USB_TYPE_STANDARD, USB_DT_DEVICE << 8, 0,
322 xhci_reset_endpoint(xhci, slot_id, 0);
367 (slot_id << TRB_SLOT_ID_START));
374 xhci_add_device(xhci, slot_id, hub_address, speed);
378 xhci_disable_slot(xhci, slot_id);
383 static zx_status_t xhci_stop_endpoint(xhci_t* xhci, uint32_t slot_id, int ep_index,
385 xhci_slot_t* slot = &xhci->slots[slot_id];
405 uint32_t control = (slot_id << TRB_SLOT_ID_START) | ((ep_index + 1) << TRB_ENDPOINT_ID_START);
434 uint32_t slot_id;
444 for (slot_id = 1; slot_id <= xhci->max_slots; slot_id++) {
445 xhci_slot_t* test_slot = &xhci->slots[slot_id];
459 zx_status_t status = xhci_stop_endpoint(xhci, slot_id, i, EP_STATE_DEAD,
469 xhci_remove_device(xhci, slot_id);
478 (slot_id << TRB_SLOT_ID_START));
484 xhci_disable_slot(xhci, slot_id);
586 static zx_status_t xhci_update_input_context(xhci_t* xhci, uint32_t slot_id, int ep_index) {
589 return xhci_send_command(xhci, TRB_CMD_CONFIGURE_EP, icc_phys, (slot_id << TRB_SLOT_ID_START));
592 zx_status_t xhci_enable_endpoint(xhci_t* xhci, uint32_t slot_id, usb_endpoint_descriptor_t* ep_desc,
594 if (xhci_is_root_hub(xhci, slot_id)) {
599 xhci_slot_t* slot = &xhci->slots[slot_id];
689 status = xhci_update_input_context(xhci, slot_id, index);
708 xhci_stop_endpoint(xhci, slot_id, index, EP_STATE_DISABLED, ZX_ERR_BAD_STATE);
710 zx_status_t status = xhci_update_input_context(xhci, slot_id, index);
716 zx_status_t xhci_configure_hub(xhci_t* xhci, uint32_t slot_id, usb_speed_t speed,
718 zxlogf(TRACE, "xhci_configure_hub slot_id: %d speed: %d\n", slot_id, speed);
719 if (xhci_is_root_hub(xhci, slot_id)) {
723 if (slot_id > xhci->max_slots) return ZX_ERR_INVALID_ARGS;
725 xhci_slot_t* slot = &xhci->slots[slot_id];
750 (slot_id << TRB_SLOT_ID_START));
767 zx_status_t result = xhci_control_request(xhci, slot_id,