Changeset 913007f in mainline
- Timestamp:
- 2017-10-19T21:40:57Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fe1c48d
- Parents:
- 2896ff6
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r2896ff6 r913007f 76 76 } 77 77 78 int xhci_cmd_wait(xhci_cmd_t *cmd) 79 { 80 const suseconds_t timeout = 1000000; 78 int xhci_cmd_wait(xhci_cmd_t *cmd, suseconds_t timeout) 79 { 81 80 int rv = EOK; 82 81 -
uspace/drv/bus/usb/xhci/commands.h
r2896ff6 r913007f 42 42 #include "hw_struct/trb.h" 43 43 44 /* Useful timeouts for `xhci_cmd_wait()` */ 45 #define XHCI_DEFAULT_TIMEOUT 1000000 46 #define XHCI_BLOCK_INDEFINITELY 0 47 44 48 typedef struct xhci_hc xhci_hc_t; 45 49 typedef struct xhci_input_ctx xhci_input_ctx_t; … … 67 71 xhci_cmd_t *xhci_cmd_alloc(void); 68 72 void xhci_cmd_init(xhci_cmd_t *); 69 int xhci_cmd_wait(xhci_cmd_t * );73 int xhci_cmd_wait(xhci_cmd_t *, suseconds_t); 70 74 void xhci_cmd_fini(xhci_cmd_t *); 71 75 void xhci_cmd_free(xhci_cmd_t *); -
uspace/drv/bus/usb/xhci/endpoint.c
r2896ff6 r913007f 87 87 * 88 88 * For control endpoints >0, the IN endpoint index is used. 89 * 89 * 90 90 * The index returned must be usually offset by a number of contexts preceding 91 91 * the endpoint contexts themselves. … … 257 257 cmd.slot_id = dev->slot_id; 258 258 xhci_send_configure_endpoint_command(dev->hc, &cmd, ictx); 259 if ((err = xhci_cmd_wait(&cmd )) != EOK)259 if ((err = xhci_cmd_wait(&cmd, XHCI_DEFAULT_TIMEOUT)) != EOK) 260 260 goto err_cmd; 261 261 … … 324 324 cmd.slot_id = dev->slot_id; 325 325 xhci_send_configure_endpoint_command(hc, &cmd, ictx); 326 if ((err = xhci_cmd_wait(&cmd )) != EOK)326 if ((err = xhci_cmd_wait(&cmd, XHCI_DEFAULT_TIMEOUT)) != EOK) 327 327 goto err_cmd; 328 328 -
uspace/drv/bus/usb/xhci/rh.c
r2896ff6 r913007f 91 91 92 92 xhci_send_enable_slot_command(hc, &cmd); 93 if ((err = xhci_cmd_wait(&cmd )) != EOK)93 if ((err = xhci_cmd_wait(&cmd, XHCI_DEFAULT_TIMEOUT)) != EOK) 94 94 return err; 95 95 … … 155 155 cmd.slot_id = slot_id; 156 156 xhci_send_address_device_command(hc, &cmd, ictx); 157 if ((err = xhci_cmd_wait(&cmd )) != EOK)157 if ((err = xhci_cmd_wait(&cmd, XHCI_DEFAULT_TIMEOUT)) != EOK) 158 158 goto err_dctx; 159 159 … … 400 400 xhci_get_port_bandwidth_command(dev->hc, &cmd, ctx, speed); 401 401 402 int err = xhci_cmd_wait(&cmd );402 int err = xhci_cmd_wait(&cmd, XHCI_DEFAULT_TIMEOUT); 403 403 if(err != EOK) { 404 404 free(ctx);
Note:
See TracChangeset
for help on using the changeset viewer.