Changeset 888238e9 in mainline
- Timestamp:
- 2017-11-20T12:56:00Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d3086873
- Parents:
- ff14aede
- git-author:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:55:58)
- git-committer:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:56:00)
- Location:
- uspace
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
rff14aede r888238e9 64 64 return; 65 65 } 66 assert(ep-> speed < ARRAY_SIZE(speed));66 assert(ep->device->speed < ARRAY_SIZE(speed)); 67 67 EHCI_MEM32_WR(instance->ep_char, 68 68 QH_EP_CHAR_ADDR_SET(ep->device->address) | 69 69 QH_EP_CHAR_EP_SET(ep->endpoint) | 70 speed[ep-> speed] |70 speed[ep->device->speed] | 71 71 QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size) 72 72 ); 73 73 if (ep->transfer_type == USB_TRANSFER_CONTROL) { 74 if (ep-> speed != USB_SPEED_HIGH)74 if (ep->device->speed != USB_SPEED_HIGH) 75 75 EHCI_MEM32_SET(instance->ep_char, QH_EP_CHAR_C_FLAG); 76 76 /* Let BULK and INT use queue head managed toggle, … … 80 80 uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) | 81 81 QH_EP_CAP_MULTI_SET(ep->packets); 82 if (ep-> speed != USB_SPEED_HIGH) {82 if (ep->device->speed != USB_SPEED_HIGH) { 83 83 ep_cap |= 84 84 QH_EP_CAP_TT_PORT_SET(ep->device->tt.port) | -
uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
rff14aede r888238e9 88 88 89 89 /* Low speed flag */ 90 if (ep-> speed == USB_SPEED_LOW)90 if (ep->device->speed == USB_SPEED_LOW) 91 91 OHCI_MEM32_SET(instance->status, ED_STATUS_S_FLAG); 92 92 -
uspace/drv/bus/usb/uhci/hc.c
rff14aede r888238e9 475 475 476 476 transfer_list_t *list = 477 instance->transfers[batch->ep-> speed][batch->ep->transfer_type];477 instance->transfers[batch->ep->device->speed][batch->ep->transfer_type]; 478 478 assert(list); 479 479 transfer_list_add_batch(list, uhci_batch); -
uspace/drv/bus/usb/uhci/uhci_batch.c
rff14aede r888238e9 233 233 const usb_packet_id pid = direction_pids[dir]; 234 234 const bool low_speed = 235 uhci_batch->base.ep-> speed == USB_SPEED_LOW;235 uhci_batch->base.ep->device->speed == USB_SPEED_LOW; 236 236 const size_t mps = uhci_batch->base.ep->max_packet_size; 237 237 … … 295 295 const usb_packet_id status_stage_pid = status_stage_pids[dir]; 296 296 const bool low_speed = 297 uhci_batch->base.ep-> speed == USB_SPEED_LOW;297 uhci_batch->base.ep->device->speed == USB_SPEED_LOW; 298 298 const size_t mps = uhci_batch->base.ep->max_packet_size; 299 299 const usb_target_t target = uhci_batch->base.target; -
uspace/drv/bus/usb/xhci/endpoint.c
rff14aede r888238e9 141 141 int xhci_endpoint_request_streams(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *xhci_ep, unsigned count) { 142 142 if (xhci_ep->base.transfer_type != USB_TRANSFER_BULK 143 || xhci_ep->base.speed != USB_SPEED_SUPER) {143 || dev->base.speed != USB_SPEED_SUPER) { 144 144 usb_log_error("Streams are only supported by superspeed bulk endpoints."); 145 145 return EINVAL; -
uspace/lib/usbhost/include/usb/host/endpoint.h
rff14aede r888238e9 66 66 /** USB transfer type. */ 67 67 usb_transfer_type_t transfer_type; 68 /** Communication speed. */69 usb_speed_t speed;70 68 /** Maximum size of data packets. */ 71 69 size_t max_packet_size; -
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
rff14aede r888238e9 39 39 #include <usb/usb.h> 40 40 #include <usb/request.h> 41 #include <usb/host/bus.h> 41 42 #include <usbhc_iface.h> 42 43 … … 99 100 #define USB_TRANSFER_BATCH_ARGS(batch) \ 100 101 (batch).target.address, (batch).target.endpoint, \ 101 usb_str_speed((batch).ep-> speed), \102 usb_str_speed((batch).ep->device->speed), \ 102 103 usb_str_transfer_type_short((batch).ep->transfer_type), \ 103 104 usb_str_direction((batch).ep->direction), \ -
uspace/lib/usbhost/src/bandwidth.c
rff14aede r888238e9 36 36 #include <usb/host/bandwidth.h> 37 37 #include <usb/host/endpoint.h> 38 #include <usb/host/bus.h> 38 39 39 40 #include <assert.h> … … 42 43 /** Calculate bandwidth that needs to be reserved for communication with EP. 43 44 * Calculation follows USB 1.1 specification. 44 * @param speed Device's speed. 45 * @param type Type of the transfer. 46 * @param size Number of byte to transfer. 45 * @param ep Registered endpoint 46 * @param size Number of bytes to transfer. 47 47 * @param max_packet_size Maximum bytes in one packet. 48 48 */ … … 50 50 { 51 51 assert(ep); 52 assert(ep->device); 52 53 53 54 const usb_transfer_type_t type = ep->transfer_type; … … 66 67 * transaction, but I did not find text in USB spec to confirm this */ 67 68 /* NOTE: All data packets will be considered to be max_packet_size */ 68 switch (ep-> speed)69 switch (ep->device->speed) 69 70 { 70 71 case USB_SPEED_LOW:
Note:
See TracChangeset
for help on using the changeset viewer.