Changeset 831aa466 in mainline
- Timestamp:
- 2018-06-26T23:16:12Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2fc9bfd
- Parents:
- 70fae4e
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-26 23:06:11)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-26 23:16:12)
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/endpoint.c
r70fae4e r831aa466 102 102 if (dev->speed >= USB_SPEED_HIGH || 103 103 ep->transfer_type != USB_TRANSFER_INTERRUPT) { 104 xhci_ep->interval = 1 << (xhci_ep->interval - 1); 104 105 if (xhci_ep->interval > 0) 106 xhci_ep->interval = 1 << (xhci_ep->interval - 1); 105 107 } 106 108 -
uspace/lib/c/generic/ubsan.c
r70fae4e r831aa466 98 98 #endif 99 99 void __ubsan_handle_nonnull_return(struct nonnull_return_data *data); 100 void __ubsan_handle_builtin_unreachable(struct unreachable_data *data); 100 101 101 102 static void print_loc(const char *func, struct source_location *loc) … … 107 108 f += sizeof(func_prefix); 108 109 109 PRINTF(" Undefined behavior %s at %s:%" PRIu32 " col %" PRIu32 "\n",110 PRINTF("####### Undefined behavior %s at %s:%" PRIu32 " col %" PRIu32 "\n", 110 111 f, loc->file_name, loc->line, loc->column); 111 112 } … … 115 116 { 116 117 print_loc(__func__, &data->loc); 118 PRINTF("Type: %s, alignment: %lu, type_check_kind: %hhu\n", 119 data->type->type_name, data->alignment, data->type_check_kind); 117 120 ubsan_panic(); 118 121 } … … 219 222 ubsan_panic(); 220 223 } 224 225 void __ubsan_handle_builtin_unreachable(struct unreachable_data *data) 226 { 227 print_loc(__func__, &data->loc); 228 ubsan_panic(); 229 } 230 -
uspace/lib/drv/generic/remote_usb.c
r70fae4e r831aa466 77 77 return EBADMEM; 78 78 79 usb_device_desc_t tmp_desc;79 sysarg_t address, depth, speed, handle, iface; 80 80 81 81 const errno_t ret = async_req_1_5(exch, DEV_IFACE_ID(USB_DEV_IFACE), 82 IPC_M_USB_GET_MY_DESCRIPTION, 83 (sysarg_t *) &tmp_desc.address, 84 (sysarg_t *) &tmp_desc.depth, 85 (sysarg_t *) &tmp_desc.speed, 86 &tmp_desc.handle, 87 (sysarg_t *) &tmp_desc.iface); 88 if (ret == EOK && desc) 89 *desc = tmp_desc; 82 IPC_M_USB_GET_MY_DESCRIPTION, &address, &depth, &speed, &handle, 83 &iface); 84 if (ret == EOK && desc) { 85 *desc = (usb_device_desc_t) { 86 .address = address, 87 .depth = depth, 88 .speed = speed, 89 .handle = handle, 90 .iface = iface, 91 }; 92 } 93 90 94 return ret; 91 95 } -
uspace/lib/usb/include/usb/request.h
r70fae4e r831aa466 75 75 #define USB_SETUP_PACKET_SIZE 8 76 76 77 /** Device request setup packet.78 * The setup packet describes the request.79 */80 typedef struct {81 /** Request type.82 * The type combines transfer direction, request type and83 * intended recipient.84 */85 uint8_t request_type;86 77 #define SETUP_REQUEST_TYPE_DEVICE_TO_HOST (1 << 7) 87 78 #define SETUP_REQUEST_TYPE_HOST_TO_DEVICE (0 << 7) … … 94 85 (uint8_t)(((type & 0x3) << 5) | (recipient & 0x1f)) 95 86 96 /** Request identification. */ 97 uint8_t request; 98 /** Main parameter to the request. */ 99 union __attribute__((packed)) { 100 uint16_t value; 101 /* FIXME: add #ifdefs according to host endianness */ 102 struct __attribute__((packed)) { 103 uint8_t value_low; 104 uint8_t value_high; 87 /** Device request setup packet. 88 * The setup packet describes the request. 89 */ 90 typedef union { 91 struct __attribute__((packed)) { 92 /** Request type. 93 * The type combines transfer direction, request type and 94 * intended recipient. 95 */ 96 uint8_t request_type; 97 98 /** Request identification. */ 99 uint8_t request; 100 /** Main parameter to the request. */ 101 union __attribute__((packed)) { 102 uint16_t value; 103 /* FIXME: add #ifdefs according to host endianness */ 104 struct __attribute__((packed)) { 105 uint8_t value_low; 106 uint8_t value_high; 107 }; 105 108 }; 109 /** Auxiliary parameter to the request. 110 * Typically, it is offset to something. 111 */ 112 uint16_t index; 113 /** Length of extra data. */ 114 uint16_t length; 106 115 }; 107 /** Auxiliary parameter to the request. 108 * Typically, it is offset to something. 109 */ 110 uint16_t index; 111 /** Length of extra data. */ 112 uint16_t length; 116 uint64_t raw; 113 117 } __attribute__((packed)) usb_device_request_setup_packet_t; 114 118 -
uspace/lib/usbhost/src/usb2_bus.c
r70fae4e r831aa466 142 142 usb_log_debug("Device(%d): Setting USB address.", address); 143 143 err = bus_device_send_batch_sync(dev, usb2_default_target, USB_DIRECTION_OUT, 144 NULL, 0, *(uint64_t *)&set_address, "set address", NULL);144 NULL, 0, set_address.raw, "set address", NULL); 145 145 if (err) { 146 146 usb_log_error("Device(%d): Failed to set new address: %s.",
Note:
See TracChangeset
for help on using the changeset viewer.