Changeset e76c0ea in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2017-11-18T22:27:12Z (6 years ago)
Author:
Petr Mánek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
306a36d
Parents:
b80c1ab
git-author:
Petr Mánek <petr.manek@…> (2017-11-18 22:26:12)
git-committer:
Petr Mánek <petr.manek@…> (2017-11-18 22:27:12)
Message:

Renamed and simplified static method for input context allocation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hc.c

    rb80c1ab re76c0ea  
    636636}
    637637
    638 static int create_valid_input_ctx(dma_buffer_t *dma_buf)
     638static int create_configure_ep_input_ctx(dma_buffer_t *dma_buf)
    639639{
    640640        const int err = dma_buffer_alloc(dma_buf, sizeof(xhci_input_ctx_t));
     
    645645        memset(ictx, 0, sizeof(xhci_input_ctx_t));
    646646
    647         // Quoting sec. 4.6.6: A1, D0, D1 are down, A0 is up.
    648         XHCI_INPUT_CTRL_CTX_ADD_CLEAR(ictx->ctrl_ctx, 1);
    649         XHCI_INPUT_CTRL_CTX_DROP_CLEAR(ictx->ctrl_ctx, 0);
    650         XHCI_INPUT_CTRL_CTX_DROP_CLEAR(ictx->ctrl_ctx, 1);
     647        // Quoting sec. 4.6.5 and 4.6.6: A1, D0, D1 are down (already zeroed), A0 is up.
    651648        XHCI_INPUT_CTRL_CTX_ADD_SET(ictx->ctrl_ctx, 0);
    652649
     
    676673        /* Issue configure endpoint command (sec 4.3.5). */
    677674        dma_buffer_t ictx_dma_buf;
    678         if ((err = create_valid_input_ctx(&ictx_dma_buf))) {
     675        if ((err = create_configure_ep_input_ctx(&ictx_dma_buf))) {
    679676                goto err_dev_ctx;
    680677        }
     
    724721        /* Issue configure endpoint command (sec 4.3.5). */
    725722        dma_buffer_t ictx_dma_buf;
    726         const int err = create_valid_input_ctx(&ictx_dma_buf);
     723        const int err = create_configure_ep_input_ctx(&ictx_dma_buf);
    727724        if (err)
    728725                return err;
     
    743740        /* Issue configure endpoint command (sec 4.3.5). */
    744741        dma_buffer_t ictx_dma_buf;
    745         const int err = create_valid_input_ctx(&ictx_dma_buf);
     742        const int err = create_configure_ep_input_ctx(&ictx_dma_buf);
    746743        if (err)
    747744                return err;
     
    759756        /* Issue configure endpoint command (sec 4.3.5). */
    760757        dma_buffer_t ictx_dma_buf;
    761         const int err = create_valid_input_ctx(&ictx_dma_buf);
     758        const int err = create_configure_ep_input_ctx(&ictx_dma_buf);
    762759        if (err)
    763760                return err;
Note: See TracChangeset for help on using the changeset viewer.