Changeset db51a6a6 in mainline for uspace/drv/bus/usb/uhci
- Timestamp:
- 2018-01-22T12:20:14Z (8 years ago)
- 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)
- Location:
- uspace/drv/bus/usb/uhci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
rb3c39690 rdb51a6a6 362 362 async_usleep(2000); 363 363 batch->base.error = EINTR; 364 batch->base.transfer ed_size = 0;364 batch->base.transferred_size = 0; 365 365 usb_transfer_batch_finish(&batch->base); 366 366 } -
uspace/drv/bus/usb/uhci/uhci_batch.c
rb3c39690 rdb51a6a6 163 163 uhci_batch, USB_TRANSFER_BATCH_ARGS(*batch), 164 164 uhci_batch->td_count); 165 batch->transfer ed_size = 0;165 batch->transferred_size = 0; 166 166 167 167 uhci_endpoint_t *uhci_ep = (uhci_endpoint_t *) batch->ep; … … 185 185 } 186 186 187 batch->transfer ed_size187 batch->transferred_size 188 188 += td_act_size(&uhci_batch->tds[i]); 189 189 if (td_is_short(&uhci_batch->tds[i])) … … 191 191 } 192 192 substract_ret: 193 if (batch->transfer ed_size > 0 && batch->ep->transfer_type == USB_TRANSFER_CONTROL) {194 assert(batch->transfer ed_size >= USB_SETUP_PACKET_SIZE);195 batch->transfer ed_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; 196 196 } 197 197 198 198 if (batch->dir == USB_DIRECTION_IN) { 199 assert(batch->transfer ed_size <= batch->buffer_size);199 assert(batch->transferred_size <= batch->buffer_size); 200 200 memcpy(batch->buffer, 201 201 uhci_transfer_batch_data_buffer(uhci_batch), 202 batch->transfer ed_size);202 batch->transferred_size); 203 203 } 204 204 -
uspace/drv/bus/usb/uhci/uhci_rh.c
rb3c39690 rdb51a6a6 107 107 batch->error = virthub_base_request(&instance->base, batch->target, 108 108 batch->dir, (void*) batch->setup.buffer, 109 batch->buffer, batch->buffer_size, &batch->transfer ed_size);109 batch->buffer, batch->buffer_size, &batch->transferred_size); 110 110 if (batch->error == ENAK) 111 111 async_usleep(instance->base.endpoint_descriptor.poll_interval * 1000);
Note:
See TracChangeset
for help on using the changeset viewer.
