Changeset 1433ecda in mainline for uspace/drv/bus/usb
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- Location:
- uspace/drv/bus/usb
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_bus.c
r47b2d7e3 r1433ecda 145 145 endpoint_set_offline_locked(ep); 146 146 list_remove(&ehci_ep->pending_link); 147 usb_transfer_batch_t * 147 usb_transfer_batch_t *const batch = ep->active_batch; 148 148 endpoint_deactivate_locked(ep); 149 149 fibril_mutex_unlock(&hc->guard); -
uspace/drv/bus/usb/ehci/endpoint_list.c
r47b2d7e3 r1433ecda 66 66 fibril_mutex_initialize(&instance->guard); 67 67 68 usb_log_debug2("EPL(%p-%s): Transfer list setup with ED: %p(%" PRIxn").",68 usb_log_debug2("EPL(%p-%s): Transfer list setup with ED: %p(%" PRIxn ").", 69 69 instance, name, instance->list_head, 70 70 addr_to_phys(instance->list_head)); … … 133 133 instance, instance->name, ep, first, first->qh); 134 134 if (last_qh == instance->list_head) { 135 usb_log_debug2("EPL(%p-%s): head EP(%p-%" PRIxn"): %x:%x.",135 usb_log_debug2("EPL(%p-%s): head EP(%p-%" PRIxn "): %x:%x.", 136 136 instance, instance->name, last_qh, 137 137 addr_to_phys(instance->list_head), -
uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.h
r47b2d7e3 r1433ecda 77 77 volatile uint32_t extended_bp[5]; 78 78 79 } __attribute__((packed, aligned(32))) td_t;79 } __attribute__((packed, aligned(32))) td_t; 80 80 81 81 static_assert(sizeof(td_t) % 32 == 0); -
uspace/drv/bus/usb/ohci/endpoint_list.c
r47b2d7e3 r1433ecda 128 128 list_first(&instance->endpoint_list), ohci_endpoint_t, eplist_link); 129 129 usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).", 130 130 ep, instance->name, first, first->ed); 131 131 if (last_ed == instance->list_head) { 132 132 usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.", -
uspace/drv/bus/usb/ohci/hw_struct/hcca.h
r47b2d7e3 r1433ecda 69 69 * @return Usable HCCA memory structure. 70 70 */ 71 static inline hcca_t * 71 static inline hcca_t *hcca_get(void) 72 72 { 73 73 hcca_t *hcca = memalign(sizeof(hcca_t), sizeof(hcca_t)); -
uspace/drv/bus/usb/ohci/ohci_bus.h
r47b2d7e3 r1433ecda 84 84 * @return Pointer to assigned hcd endpoint structure 85 85 */ 86 static inline ohci_endpoint_t * 86 static inline ohci_endpoint_t *ohci_endpoint_get(const endpoint_t *ep) 87 87 { 88 88 assert(ep); -
uspace/drv/bus/usb/usbmid/usbmid.h
r47b2d7e3 r1433ecda 69 69 extern errno_t usbmid_interface_destroy(usbmid_interface_t *mid_iface); 70 70 71 static inline usbmid_interface_t * 71 static inline usbmid_interface_t *usbmid_interface_from_link(link_t *item) 72 72 { 73 73 return list_get_instance(item, usbmid_interface_t, link); -
uspace/drv/bus/usb/vhc/conndev.c
r47b2d7e3 r1433ecda 66 66 ipc_call_t data_request_call; 67 67 aid_t data_request = async_data_read(exch, plugged_device_name, 68 68 PLUGGED_DEVICE_NAME_MAXLEN, &data_request_call); 69 69 70 70 async_exchange_end(exch); -
uspace/drv/bus/usb/vhc/hub/virthub.h
r47b2d7e3 r1433ecda 70 70 uint8_t max_current; 71 71 /** Whether device at given port is removable. */ 72 uint8_t removable_device[BITS2BYTES(HUB_PORT_COUNT +1)];72 uint8_t removable_device[BITS2BYTES(HUB_PORT_COUNT + 1)]; 73 73 /** Port power control. 74 74 * This is USB1.0 compatibility field, all bits must be 1. 75 75 */ 76 uint8_t port_power[BITS2BYTES(HUB_PORT_COUNT +1)];77 } __attribute__ 76 uint8_t port_power[BITS2BYTES(HUB_PORT_COUNT + 1)]; 77 } __attribute__((packed)) hub_descriptor_t; 78 78 79 79 extern usbvirt_device_ops_t hub_ops; -
uspace/drv/bus/usb/vhc/main.c
r47b2d7e3 r1433ecda 80 80 if (ret != EOK) { 81 81 usb_log_error("Failed to init HCD structures: %s.", 82 str_error(ret));82 str_error(ret)); 83 83 return ret; 84 84 } … … 111 111 if (ret != EOK) { 112 112 usb_log_error("Failed to init VHC root hub: %s", 113 113 str_error(ret)); 114 114 // TODO do something here... 115 115 } … … 127 127 }; 128 128 129 int main(int argc, char * 129 int main(int argc, char *argv[]) 130 130 { 131 131 log_init(NAME); -
uspace/drv/bus/usb/xhci/device.c
r47b2d7e3 r1433ecda 159 159 if (dev->base.speed == USB_SPEED_HIGH) { 160 160 dev->tt_think_time = 8 + 161 162 161 8 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_8) + 162 16 * !!(hub_desc.characteristics & HUB_CHAR_TT_THINK_16); 163 163 } 164 164 … … 222 222 if ((err = hc_get_device_desc(dev, &desc))) { 223 223 usb_log_error("Device(%d): failed to get device " 224 "descriptor: %s", dev->address, str_error(err));224 "descriptor: %s", dev->address, str_error(err)); 225 225 goto err_address; 226 226 } -
uspace/drv/bus/usb/xhci/hw_struct/common.h
r47b2d7e3 r1433ecda 70 70 */ 71 71 static inline void xhci_dword_set_bits(xhci_dword_t *storage, uint32_t value, 72 72 unsigned hi, unsigned lo) 73 73 { 74 74 const uint32_t mask = host2xhci(32, BIT_RANGE(uint32_t, hi, lo)); … … 86 86 87 87 static inline void xhci_qword_set_bits(xhci_qword_t *storage, uint64_t value, 88 88 unsigned hi, unsigned lo) 89 89 { 90 90 const uint64_t mask = host2xhci(64, BIT_RANGE(uint64_t, hi, lo)); … … 94 94 95 95 static inline int xhci_reg_wait(xhci_dword_t *reg, uint32_t mask, 96 96 uint32_t expected) 97 97 { 98 98 mask = host2xhci(32, mask); -
uspace/drv/bus/usb/xhci/scratchpad.c
r47b2d7e3 r1433ecda 77 77 for (unsigned i = 0; i < num_bufs; ++i) { 78 78 array[i] = host2xhci(64, dma_buffer_phys(&hc->scratchpad_array, 79 79 base + i * PAGE_SIZE)); 80 80 } 81 81 -
uspace/drv/bus/usb/xhci/transfers.h
r47b2d7e3 r1433ecda 53 53 } xhci_transfer_t; 54 54 55 extern usb_transfer_batch_t *xhci_transfer_create(endpoint_t *);55 extern usb_transfer_batch_t *xhci_transfer_create(endpoint_t *); 56 56 extern errno_t xhci_transfer_schedule(usb_transfer_batch_t *); 57 57
Note:
See TracChangeset
for help on using the changeset viewer.