Changeset db51a6a6 in mainline for uspace/drv/bus/usb/uhci/uhci_batch.c
- Timestamp:
- 2018-01-22T12:20:14Z (7 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.