Changeset 1433ecda in mainline for uspace/lib/usbhost
- Timestamp:
- 2018-04-04T15:42:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- Location:
- uspace/lib/usbhost
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
r47b2d7e3 r1433ecda 133 133 static inline bus_t *endpoint_get_bus(endpoint_t *ep) 134 134 { 135 device_t * 135 device_t *const device = ep->device; 136 136 return device ? device->bus : NULL; 137 137 } -
uspace/lib/usbhost/include/usb/host/utils/malloc32.h
r47b2d7e3 r1433ecda 72 72 * @return Address of the aligned and big enough memory place, NULL on failure. 73 73 */ 74 static inline void * 74 static inline void *malloc32(size_t size) 75 75 { 76 76 uintptr_t phys; -
uspace/lib/usbhost/src/bus.c
r47b2d7e3 r1433ecda 114 114 dev->tt.dev = dev->hub; 115 115 dev->tt.port = dev->port; 116 } 117 else { 116 } else { 118 117 /* Inherit hub's TT */ 119 118 dev->tt = dev->hub->tt; … … 172 171 ddf_fun_get_name(dev->fun), i, op); 173 172 174 endpoint_t * 173 endpoint_t *const ep = dev->endpoints[i]; 175 174 endpoint_add_ref(ep); 176 175 … … 190 189 /* Remove also orphaned children. */ 191 190 while (!list_empty(&dev->devices)) { 192 device_t * 191 device_t *const child = list_get_instance(list_first(&dev->devices), device_t, link); 193 192 194 193 /* … … 405 404 if (ep->max_transfer_size == 0) { 406 405 usb_log_warning("Invalid endpoint description (mps %zu, " 407 406 "%u packets)", ep->max_packet_size, ep->packets_per_uframe); 408 407 goto drop; 409 408 } -
uspace/lib/usbhost/src/usb_transfer_batch.c
r47b2d7e3 r1433ecda 93 93 batch, USB_TRANSFER_BATCH_ARGS(*batch)); 94 94 bus->ops->batch_destroy(batch); 95 } 96 else { 95 } else { 97 96 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " disposing.", 98 97 batch, USB_TRANSFER_BATCH_ARGS(*batch)); … … 118 117 size_t chunk_mask = dma_policy_chunk_mask(batch->dma_buffer.policy); 119 118 size_t required_chunk_mask = 120 119 dma_policy_chunk_mask(batch->ep->required_transfer_buffer_policy); 121 120 122 121 /* If the chunks are at least as large as required, we're good */ … … 180 179 /* We we're forced to use bounce buffer, copy it back */ 181 180 if (batch->dir == USB_DIRECTION_IN) 182 memcpy(batch->original_buffer,183 batch->dma_buffer.virt,184 batch->transferred_size);181 memcpy(batch->original_buffer, 182 batch->dma_buffer.virt, 183 batch->transferred_size); 185 184 186 185 dma_buffer_free(&batch->dma_buffer); 187 } 188 else { 186 } else { 189 187 dma_buffer_release(&batch->dma_buffer); 190 188 }
Note:
See TracChangeset
for help on using the changeset viewer.