Changeset 04df063 in mainline for uspace/drv/bus/usb/xhci/commands.h


Ignore:
Timestamp:
2017-10-02T19:16:29Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f76b7d
Parents:
370a1c8
Message:

xhci commands: enable (and encourage) keeping commands on the stack

It is now not necessary to use the heap for simple commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/commands.h

    r370a1c8 r04df063  
    5050        xhci_trb_t trb;
    5151        uintptr_t trb_phys;
    52         xhci_input_ctx_t *ictx;
     52
    5353        uint32_t slot_id;
    5454        uint32_t status;
    5555
    5656        bool completed;
    57         bool has_owner;
    58         bool owns_trb;
    5957
    60         /* Will be unlocked after command completes */
     58        /* Will broadcast after command completes. */
    6159        fibril_mutex_t completed_mtx;
    6260        fibril_condvar_t completed_cv;
     
    6563int xhci_init_commands(xhci_hc_t *);
    6664void xhci_fini_commands(xhci_hc_t *);
    67 int xhci_wait_for_command(xhci_cmd_t *, uint32_t);
    68 xhci_cmd_t *xhci_alloc_command(void);
     65
     66xhci_cmd_t *xhci_cmd_alloc(void);
    6967void xhci_cmd_init(xhci_cmd_t *);
    70 void xhci_free_command(xhci_cmd_t *);
     68int xhci_cmd_wait(xhci_cmd_t *, suseconds_t);
     69void xhci_cmd_fini(xhci_cmd_t *);
     70void xhci_cmd_free(xhci_cmd_t *);
    7171
    7272void xhci_stop_command_ring(xhci_hc_t *);
     
    7777int xhci_send_enable_slot_command(xhci_hc_t *, xhci_cmd_t *);
    7878int xhci_send_disable_slot_command(xhci_hc_t *, xhci_cmd_t *);
    79 int xhci_send_address_device_command(xhci_hc_t *, xhci_cmd_t *);
    80 int xhci_send_configure_endpoint_command(xhci_hc_t *, xhci_cmd_t *);
    81 int xhci_send_evaluate_context_command(xhci_hc_t *, xhci_cmd_t *);
     79int xhci_send_address_device_command(xhci_hc_t *, xhci_cmd_t *, xhci_input_ctx_t *);
     80int xhci_send_configure_endpoint_command(xhci_hc_t *, xhci_cmd_t *, xhci_input_ctx_t *);
     81int xhci_send_evaluate_context_command(xhci_hc_t *, xhci_cmd_t *, xhci_input_ctx_t *);
    8282int xhci_send_reset_endpoint_command(xhci_hc_t *, xhci_cmd_t *, uint32_t, uint8_t);
    8383int xhci_send_stop_endpoint_command(xhci_hc_t *, xhci_cmd_t *, uint32_t, uint8_t);
Note: See TracChangeset for help on using the changeset viewer.