Changeset db51a6a6 in mainline


Ignore:
Timestamp:
2018-01-22T12:20:14Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
998773d
Parents:
b3c39690
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-22 12:18:02)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-22 12:20:14)
Message:

typo: transferred is spelled with two r

Files:
21 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/ipc/ipc.h

    rb3c39690 rdb51a6a6  
    3636#define ABI_IPC_IPC_H_
    3737
    38 /** Length of data being transfered with IPC call
     38/** Length of data being transferred with IPC call
    3939 *
    4040 * The uspace may not be able to utilize full length
  • uspace/drv/bus/usb/ehci/ehci_batch.c

    rb3c39690 rdb51a6a6  
    179179
    180180        /* Assume all data got through */
    181         ehci_batch->base.transfered_size = ehci_batch->base.buffer_size;
     181        ehci_batch->base.transferred_size = ehci_batch->base.buffer_size;
    182182
    183183        /* Check all TDs */
     
    202202                         * we leave the very last(unused) TD behind.
    203203                         */
    204                         ehci_batch->base.transfered_size
     204                        ehci_batch->base.transferred_size
    205205                            -= td_remain_size(&ehci_batch->tds[i]);
    206206                } else {
     
    215215        }
    216216
    217         assert(ehci_batch->base.transfered_size <= ehci_batch->base.buffer_size);
     217        assert(ehci_batch->base.transferred_size <= ehci_batch->base.buffer_size);
    218218
    219219        if (ehci_batch->base.dir == USB_DIRECTION_IN)
    220220                memcpy(ehci_batch->base.buffer,
    221221                    ehci_batch->data_buffer,
    222                     ehci_batch->base.transfered_size);
     222                    ehci_batch->base.transferred_size);
    223223
    224224        /* Clear TD pointers */
  • uspace/drv/bus/usb/ehci/ehci_bus.c

    rb3c39690 rdb51a6a6  
    148148        if (batch) {
    149149                batch->error = EINTR;
    150                 batch->transfered_size = 0;
     150                batch->transferred_size = 0;
    151151                usb_transfer_batch_finish(batch);
    152152        }
  • uspace/drv/bus/usb/ehci/ehci_rh.c

    rb3c39690 rdb51a6a6  
    146146        batch->error = virthub_base_request(&instance->base, batch->target,
    147147            batch->dir, (void*) batch->setup.buffer,
    148             batch->buffer, batch->buffer_size, &batch->transfered_size);
     148            batch->buffer, batch->buffer_size, &batch->transferred_size);
    149149        if (batch->error == ENAK) {
    150150                usb_log_debug("RH(%p): BATCH(%p) adding as unfinished",
     
    180180                batch->error = virthub_base_request(&instance->base, batch->target,
    181181                    batch->dir, (void*) batch->setup.buffer,
    182                     batch->buffer, batch->buffer_size, &batch->transfered_size);
     182                    batch->buffer, batch->buffer_size, &batch->transferred_size);
    183183                usb_transfer_batch_finish(batch);
    184184        }
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    rb3c39690 rdb51a6a6  
    187187
    188188        /* Assume all data got through */
    189         ohci_batch->base.transfered_size = ohci_batch->base.buffer_size;
     189        ohci_batch->base.transferred_size = ohci_batch->base.buffer_size;
    190190
    191191        /* Assume we will leave the last(unused) TD behind */
     
    213213                         * we leave the very last(unused) TD behind.
    214214                         */
    215                         ohci_batch->base.transfered_size
     215                        ohci_batch->base.transferred_size
    216216                            -= td_remain_size(ohci_batch->tds[i]);
    217217                } else {
     
    244244                }
    245245        }
    246         assert(ohci_batch->base.transfered_size <=
     246        assert(ohci_batch->base.transferred_size <=
    247247            ohci_batch->base.buffer_size);
    248248
     
    254254                memcpy(ohci_batch->base.buffer,
    255255                    ohci_batch->device_buffer + setup_size,
    256                     ohci_batch->base.transfered_size);
     256                    ohci_batch->base.transferred_size);
    257257
    258258        /* Store the remaining TD */
  • uspace/drv/bus/usb/ohci/ohci_bus.c

    rb3c39690 rdb51a6a6  
    152152        if (batch) {
    153153                batch->error = EINTR;
    154                 batch->transfered_size = 0;
     154                batch->transferred_size = 0;
    155155                usb_transfer_batch_finish(batch);
    156156        }
  • uspace/drv/bus/usb/ohci/ohci_rh.c

    rb3c39690 rdb51a6a6  
    180180        batch->error = virthub_base_request(&instance->base, batch->target,
    181181            batch->dir, &batch->setup.packet,
    182             batch->buffer, batch->buffer_size, &batch->transfered_size);
     182            batch->buffer, batch->buffer_size, &batch->transferred_size);
    183183        if (batch->error == ENAK) {
    184184                /* This is safe because only status change interrupt transfers
     
    208208                batch->error = virthub_base_request(&instance->base, batch->target,
    209209                    batch->dir, &batch->setup.packet,
    210                     batch->buffer, batch->buffer_size, &batch->transfered_size);
     210                    batch->buffer, batch->buffer_size, &batch->transferred_size);
    211211                usb_transfer_batch_finish(batch);
    212212        }
  • uspace/drv/bus/usb/uhci/hc.c

    rb3c39690 rdb51a6a6  
    362362                async_usleep(2000);
    363363                batch->base.error = EINTR;
    364                 batch->base.transfered_size = 0;
     364                batch->base.transferred_size = 0;
    365365                usb_transfer_batch_finish(&batch->base);
    366366        }
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    rb3c39690 rdb51a6a6  
    163163            uhci_batch, USB_TRANSFER_BATCH_ARGS(*batch),
    164164            uhci_batch->td_count);
    165         batch->transfered_size = 0;
     165        batch->transferred_size = 0;
    166166
    167167        uhci_endpoint_t *uhci_ep = (uhci_endpoint_t *) batch->ep;
     
    185185                }
    186186
    187                 batch->transfered_size
     187                batch->transferred_size
    188188                    += td_act_size(&uhci_batch->tds[i]);
    189189                if (td_is_short(&uhci_batch->tds[i]))
     
    191191        }
    192192substract_ret:
    193         if (batch->transfered_size > 0 && batch->ep->transfer_type == USB_TRANSFER_CONTROL) {
    194                 assert(batch->transfered_size >= USB_SETUP_PACKET_SIZE);
    195                 batch->transfered_size -= USB_SETUP_PACKET_SIZE;
     193        if (batch->transferred_size > 0 && batch->ep->transfer_type == USB_TRANSFER_CONTROL) {
     194                assert(batch->transferred_size >= USB_SETUP_PACKET_SIZE);
     195                batch->transferred_size -= USB_SETUP_PACKET_SIZE;
    196196        }
    197197
    198198        if (batch->dir == USB_DIRECTION_IN) {
    199                 assert(batch->transfered_size <= batch->buffer_size);
     199                assert(batch->transferred_size <= batch->buffer_size);
    200200                memcpy(batch->buffer,
    201201                    uhci_transfer_batch_data_buffer(uhci_batch),
    202                     batch->transfered_size);
     202                    batch->transferred_size);
    203203        }
    204204
  • uspace/drv/bus/usb/uhci/uhci_rh.c

    rb3c39690 rdb51a6a6  
    107107                batch->error = virthub_base_request(&instance->base, batch->target,
    108108                    batch->dir, (void*) batch->setup.buffer,
    109                     batch->buffer, batch->buffer_size, &batch->transfered_size);
     109                    batch->buffer, batch->buffer_size, &batch->transferred_size);
    110110                if (batch->error == ENAK)
    111111                        async_usleep(instance->base.endpoint_descriptor.poll_interval * 1000);
  • uspace/drv/bus/usb/vhc/transfer.c

    rb3c39690 rdb51a6a6  
    151151        assert(transfer);
    152152        transfer->batch.error = outcome;
    153         transfer->batch.transfered_size = data_transfer_size;
     153        transfer->batch.transferred_size = data_transfer_size;
    154154        usb_transfer_batch_finish(&transfer->batch);
    155155}
  • uspace/drv/bus/usb/xhci/endpoint.c

    rb3c39690 rdb51a6a6  
    209209        if (batch) {
    210210                batch->error = EINTR;
    211                 batch->transfered_size = 0;
     211                batch->transferred_size = 0;
    212212                usb_transfer_batch_finish(batch);
    213213        }
  • uspace/drv/bus/usb/xhci/isoch.c

    rb3c39690 rdb51a6a6  
    483483
    484484        /* Withdraw results from previous transfers. */
    485         transfer->batch.transfered_size = 0;
     485        transfer->batch.transferred_size = 0;
    486486        xhci_isoch_transfer_t *res = &isoch->transfers[isoch->dequeue];
    487487        while (res->state == ISOCH_COMPLETE) {
     
    489489
    490490                res->state = ISOCH_EMPTY;
    491                 transfer->batch.transfered_size += res->size;
     491                transfer->batch.transferred_size += res->size;
    492492                transfer->batch.error = res->error;
    493493                if (res->error)
     
    555555        if (!it->error) {
    556556                memcpy(transfer->batch.buffer, it->data.virt, it->size);
    557                 transfer->batch.transfered_size = it->size;
     557                transfer->batch.transferred_size = it->size;
    558558                transfer->batch.error = it->error;
    559559        }
  • uspace/drv/bus/usb/xhci/transfers.c

    rb3c39690 rdb51a6a6  
    340340                case XHCI_TRBC_SUCCESS:
    341341                        batch->error = EOK;
    342                         batch->transfered_size = batch->buffer_size - TRB_TRANSFER_LENGTH(*trb);
     342                        batch->transferred_size = batch->buffer_size - TRB_TRANSFER_LENGTH(*trb);
    343343                        break;
    344344
     
    346346                        usb_log_warning("Transfer ended with data buffer error.");
    347347                        batch->error = EAGAIN;
    348                         batch->transfered_size = 0;
     348                        batch->transferred_size = 0;
    349349                        break;
    350350
     
    352352                        usb_log_warning("Babble detected during the transfer.");
    353353                        batch->error = EAGAIN;
    354                         batch->transfered_size = 0;
     354                        batch->transferred_size = 0;
    355355                        break;
    356356
     
    358358                        usb_log_warning("USB Transaction error.");
    359359                        batch->error = ESTALL;
    360                         batch->transfered_size = 0;
     360                        batch->transferred_size = 0;
    361361                        break;
    362362
     
    364364                        usb_log_error("Invalid transfer parameters.");
    365365                        batch->error = EINVAL;
    366                         batch->transfered_size = 0;
     366                        batch->transferred_size = 0;
    367367                        break;
    368368
     
    370370                        usb_log_warning("Stall condition detected.");
    371371                        batch->error = ESTALL;
    372                         batch->transfered_size = 0;
     372                        batch->transferred_size = 0;
    373373                        break;
    374374
     
    376376                        usb_log_error("Split transcation error detected.");
    377377                        batch->error = EAGAIN;
    378                         batch->transfered_size = 0;
     378                        batch->transferred_size = 0;
    379379                        break;
    380380
     
    386386        if (batch->dir == USB_DIRECTION_IN) {
    387387                assert(batch->buffer);
    388                 assert(batch->transfered_size <= batch->buffer_size);
    389                 memcpy(batch->buffer, transfer->hc_buffer.virt, batch->transfered_size);
     388                assert(batch->transferred_size <= batch->buffer_size);
     389                memcpy(batch->buffer, transfer->hc_buffer.virt, batch->transferred_size);
    390390        }
    391391
  • uspace/lib/drv/generic/remote_usbhc.c

    rb3c39690 rdb51a6a6  
    433433}
    434434
    435 static int callback_out(void *arg, int error, size_t transfered_size)
     435static int callback_out(void *arg, int error, size_t transferred_size)
    436436{
    437437        async_transaction_t *trans = arg;
     
    444444}
    445445
    446 static int callback_in(void *arg, int error, size_t transfered_size)
     446static int callback_in(void *arg, int error, size_t transferred_size)
    447447{
    448448        async_transaction_t *trans = arg;
     
    451451                if (error == EOK) {
    452452                        error = async_data_read_finalize(trans->data_caller,
    453                             trans->buffer, transfered_size);
     453                            trans->buffer, transferred_size);
    454454                } else {
    455455                        async_answer_0(trans->data_caller, EINTR);
  • uspace/lib/usbdev/src/pipes.c

    rb3c39690 rdb51a6a6  
    6969 * @param[out] data_buffer Buffer for incoming data.
    7070 * @param[in] data_buffer_size Size of the buffer for incoming data (in bytes).
    71  * @param[out] data_transfered_size Number of bytes that were actually
    72  *                                  transfered during the DATA stage.
     71 * @param[out] data_transferred_size Number of bytes that were actually
     72 *                                  transferred during the DATA stage.
    7373 * @return Error code.
    7474 */
    7575int usb_pipe_control_read(usb_pipe_t *pipe,
    7676    const void *setup_buffer, size_t setup_buffer_size,
    77     void *buffer, size_t buffer_size, size_t *transfered_size)
     77    void *buffer, size_t buffer_size, size_t *transferred_size)
    7878{
    7979        assert(pipe);
     
    105105        }
    106106
    107         if (rc == EOK && transfered_size != NULL) {
    108                 *transfered_size = act_size;
     107        if (rc == EOK && transferred_size != NULL) {
     108                *transferred_size = act_size;
    109109        }
    110110
     
    166166 * @param[out] buffer Buffer where to store the data.
    167167 * @param[in] size Size of the buffer (in bytes).
    168  * @param[out] size_transfered Number of bytes that were actually transfered.
     168 * @param[out] size_transferred Number of bytes that were actually transferred.
    169169 * @return Error code.
    170170 */
    171171int usb_pipe_read(usb_pipe_t *pipe,
    172     void *buffer, size_t size, size_t *size_transfered)
     172    void *buffer, size_t size, size_t *size_transferred)
    173173{
    174174        assert(pipe);
     
    200200        async_exchange_end(exch);
    201201
    202         if (rc == EOK && size_transfered != NULL) {
    203                 *size_transfered = act_size;
     202        if (rc == EOK && size_transferred != NULL) {
     203                *size_transferred = act_size;
    204204        }
    205205
  • uspace/lib/usbdev/src/request.c

    rb3c39690 rdb51a6a6  
    118118 * @param data_size        Size of the @p data buffer
    119119 *                         (in native endianness).
    120  * @param actual_data_size Actual size of transfered data
     120 * @param actual_data_size Actual size of transferred data
    121121 *                         (in native endianness).
    122122 *
     
    183183
    184184        uint16_t status_usb_endianess;
    185         size_t data_transfered_size;
     185        size_t data_transferred_size;
    186186        int rc = usb_control_request_get(pipe, USB_REQUEST_TYPE_STANDARD,
    187187            recipient, USB_DEVREQ_GET_STATUS, 0, uint16_host2usb(index),
    188             &status_usb_endianess, 2, &data_transfered_size);
    189         if (rc != EOK) {
    190                 return rc;
    191         }
    192         if (data_transfered_size != 2) {
     188            &status_usb_endianess, 2, &data_transferred_size);
     189        if (rc != EOK) {
     190                return rc;
     191        }
     192        if (data_transferred_size != 2) {
    193193                return ELIMIT;
    194194        }
     
    314314         */
    315315        uint8_t tmp_buffer;
    316         size_t bytes_transfered;
     316        size_t bytes_transferred;
    317317        rc = usb_request_get_descriptor(pipe, request_type, recipient,
    318318            descriptor_type, descriptor_index, language,
    319             &tmp_buffer, sizeof(tmp_buffer), &bytes_transfered);
    320         if (rc != EOK) {
    321                 return rc;
    322         }
    323         if (bytes_transfered != 1) {
     319            &tmp_buffer, sizeof(tmp_buffer), &bytes_transferred);
     320        if (rc != EOK) {
     321                return rc;
     322        }
     323        if (bytes_transferred != 1) {
    324324                return ELIMIT;
    325325        }
     
    340340        rc = usb_request_get_descriptor(pipe, request_type, recipient,
    341341            descriptor_type, descriptor_index, language,
    342             buffer, size, &bytes_transfered);
     342            buffer, size, &bytes_transferred);
    343343        if (rc != EOK) {
    344344                free(buffer);
    345345                return rc;
    346346        }
    347         if (bytes_transfered != size) {
     347        if (bytes_transferred != size) {
    348348                free(buffer);
    349349                return ELIMIT;
  • uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h

    rb3c39690 rdb51a6a6  
    8080        size_t buffer_size;
    8181        /** Actually used portion of the buffer */
    82         size_t transfered_size;
     82        size_t transferred_size;
    8383
    8484        /** Indicates success/failure of the communication */
  • uspace/lib/usbhost/src/bus.c

    rb3c39690 rdb51a6a6  
    572572        unsigned done;
    573573
    574         size_t transfered_size;
     574        size_t transferred_size;
    575575        int error;
    576576} sync_data_t;
     
    579579 * Callback for finishing the transfer. Wake the issuing thread.
    580580 */
    581 static int sync_transfer_complete(void *arg, int error, size_t transfered_size)
     581static int sync_transfer_complete(void *arg, int error, size_t transferred_size)
    582582{
    583583        sync_data_t *d = arg;
    584584        assert(d);
    585         d->transfered_size = transfered_size;
     585        d->transferred_size = transferred_size;
    586586        d->error = error;
    587587        fibril_mutex_lock(&d->done_mtx);
     
    624624
    625625        return (sd.error == EOK)
    626                 ? (ssize_t) sd.transfered_size
     626                ? (ssize_t) sd.transferred_size
    627627                : (ssize_t) sd.error;
    628628}
  • uspace/lib/usbhost/src/usb_transfer_batch.c

    rb3c39690 rdb51a6a6  
    118118
    119119        if (batch->on_complete) {
    120                 const int err = batch->on_complete(batch->on_complete_data, batch->error, batch->transfered_size);
     120                const int err = batch->on_complete(batch->on_complete_data, batch->error, batch->transferred_size);
    121121                if (err)
    122122                        usb_log_warning("batch %p failed to complete: %s",
  • uspace/lib/usbvirt/src/ipc_hc.c

    rb3c39690 rdb51a6a6  
    5050 * @param data_buffer Data buffer (DATA stage of control transfer).
    5151 * @param data_buffer_size Size of data buffer in bytes.
    52  * @param data_transfered_size Number of actually transferred bytes.
     52 * @param data_transferred_size Number of actually transferred bytes.
    5353 *
    5454 * @return Error code.
     
    5757int usbvirt_ipc_send_control_read(async_sess_t *sess, void *setup_buffer,
    5858    size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size,
    59     size_t *data_transfered_size)
     59    size_t *data_transferred_size)
    6060{
    6161        if (!sess)
     
    111111                return (int) opening_request_rc;
    112112       
    113         if (data_transfered_size != NULL)
    114                 *data_transfered_size = IPC_GET_ARG2(data_request_call);
     113        if (data_transferred_size != NULL)
     114                *data_transferred_size = IPC_GET_ARG2(data_request_call);
    115115       
    116116        return EOK;
Note: See TracChangeset for help on using the changeset viewer.