Changeset dc5c303 in mainline for uspace/drv
- Timestamp:
- 2023-12-28T13:59:23Z (2 years ago)
- Children:
- 6b66de6b
- Parents:
- 42c2e65 (diff), f87ff8e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- boba-buba <120932204+boba-buba@…> (2023-12-28 13:59:23)
- git-committer:
- GitHub <noreply@…> (2023-12-28 13:59:23)
- Location:
- uspace/drv
- Files:
-
- 18 edited
-
bus/usb/xhci/hw_struct/common.h (modified) (1 diff)
-
bus/usb/xhci/hw_struct/context.h (modified) (9 diffs)
-
hid/adb-kbd/adb-kbd.c (modified) (1 diff)
-
hid/adb-kbd/ctl.c (modified) (1 diff)
-
hid/adb-kbd/meson.build (modified) (1 diff)
-
hid/adb-mouse/meson.build (modified) (1 diff)
-
hid/atkbd/atkbd.c (modified) (1 diff)
-
hid/atkbd/meson.build (modified) (1 diff)
-
hid/ps2mouse/meson.build (modified) (1 diff)
-
hid/ps2mouse/ps2mouse.c (modified) (1 diff)
-
hid/usbhid/kbd/kbddev.c (modified) (1 diff)
-
hid/usbhid/kbd/kbdrepeat.c (modified) (1 diff)
-
hid/usbhid/meson.build (modified) (1 diff)
-
hid/usbhid/mouse/mousedev.c (modified) (1 diff)
-
hid/usbhid/multimedia/multimedia.c (modified) (1 diff)
-
hid/xtkbd/meson.build (modified) (1 diff)
-
hid/xtkbd/xtkbd.c (modified) (1 diff)
-
nic/ar9271/wmi.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/hw_struct/common.h
r42c2e65 rdc5c303 53 53 * 4 bytes, little-endian. 54 54 */ 55 typedef ioport32_t xhci_dword_t __attribute__((aligned(4)));55 typedef ioport32_t xhci_dword_t; 56 56 57 57 /** 58 58 * 8 bytes, little-endian. 59 59 */ 60 typedef volatile uint64_t xhci_qword_t __attribute__((aligned(8)));60 typedef volatile uint64_t xhci_qword_t; 61 61 62 62 #define XHCI_DWORD_EXTRACT(field, hi, lo) \ -
uspace/drv/bus/usb/xhci/hw_struct/context.h
r42c2e65 rdc5c303 53 53 xhci_dword_t data3; 54 54 xhci_dword_t reserved[3]; 55 } xhci_ep_ctx_t; 55 56 56 57 #define XHCI_EP_COUNT 31 … … 107 108 #define XHCI_EP_MAX_ESIT_PAYLOAD_HI(ctx) XHCI_DWORD_EXTRACT((ctx).data[0], 31, 24) 108 109 109 } __attribute__((packed)) xhci_ep_ctx_t;110 111 110 enum { 112 111 EP_STATE_DISABLED = 0, … … 123 122 xhci_dword_t data [4]; 124 123 xhci_dword_t reserved [4]; 124 } xhci_slot_ctx_t; 125 125 126 126 #define XHCI_SLOT_ROUTE_STRING_SET(ctx, val) \ … … 165 165 #define XHCI_SLOT_STATE(ctx) XHCI_DWORD_EXTRACT((ctx).data[3], 31, 27) 166 166 167 } __attribute__((packed)) xhci_slot_ctx_t;168 169 167 enum { 170 168 SLOT_STATE_DISABLED = 0, … … 213 211 typedef struct xhci_stream_ctx { 214 212 uint64_t data [2]; 213 } xhci_stream_ctx_t; 214 215 215 #define XHCI_STREAM_DCS(ctx) XHCI_QWORD_EXTRACT((ctx).data[0], 0, 0) 216 216 #define XHCI_STREAM_SCT(ctx) XHCI_QWORD_EXTRACT((ctx).data[0], 3, 1) … … 222 222 #define XHCI_STREAM_DEQ_PTR_SET(ctx, val) \ 223 223 xhci_qword_set_bits(&(ctx).data[0], (val >> 4), 63, 4) 224 } __attribute__((packed)) xhci_stream_ctx_t;225 224 226 225 /** … … 234 233 typedef struct xhci_input_ctrl_ctx { 235 234 uint32_t data [8]; 235 } __attribute__((packed)) xhci_input_ctrl_ctx_t; 236 236 237 #define XHCI_INPUT_CTRL_CTX_DROP(ctx, idx) \ 237 238 XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx)) … … 252 253 #define XHCI_INPUT_CTRL_CTX_ALTER_SETTING(ctx) \ 253 254 XHCI_DWORD_EXTRACT((ctx).data[7], 23, 16) 254 } __attribute__((packed)) xhci_input_ctrl_ctx_t;255 255 256 256 /** … … 281 281 uint8_t reserved; 282 282 uint8_t ports []; 283 } __attribute__((packed))xhci_port_bandwidth_ctx_t;283 } xhci_port_bandwidth_ctx_t; 284 284 285 285 #endif -
uspace/drv/hid/adb-kbd/adb-kbd.c
r42c2e65 rdc5c303 34 34 #include <ddf/log.h> 35 35 #include <errno.h> 36 #include <io/ console.h>36 #include <io/kbd_event.h> 37 37 #include <ipc/adb.h> 38 38 #include <ipc/kbdev.h> -
uspace/drv/hid/adb-kbd/ctl.c
r42c2e65 rdc5c303 33 33 34 34 #include <errno.h> 35 #include <io/ console.h>35 #include <io/kbd_event.h> 36 36 #include <io/keycode.h> 37 37 -
uspace/drv/hid/adb-kbd/meson.build
r42c2e65 rdc5c303 27 27 # 28 28 29 deps = [ 'input' ] 29 30 src = files( 30 31 'main.c', -
uspace/drv/hid/adb-mouse/meson.build
r42c2e65 rdc5c303 27 27 # 28 28 29 deps = [ 'input' ] 29 30 src = files('main.c', 'adb-mouse.c') -
uspace/drv/hid/atkbd/atkbd.c
r42c2e65 rdc5c303 38 38 #include <errno.h> 39 39 #include <ddf/log.h> 40 #include <io/kbd_event.h> 40 41 #include <io/keycode.h> 41 42 #include <io/chardev.h> 42 #include <io/console.h>43 43 #include <ipc/kbdev.h> 44 44 #include <abi/ipc/methods.h> -
uspace/drv/hid/atkbd/meson.build
r42c2e65 rdc5c303 27 27 # 28 28 29 deps = [ 'input' ] 29 30 src = files('main.c', 'atkbd.c') -
uspace/drv/hid/ps2mouse/meson.build
r42c2e65 rdc5c303 27 27 # 28 28 29 deps = [ 'input' ] 29 30 src = files('main.c', 'ps2mouse.c') -
uspace/drv/hid/ps2mouse/ps2mouse.c
r42c2e65 rdc5c303 40 40 #include <io/keycode.h> 41 41 #include <io/chardev.h> 42 #include <io/console.h>43 42 #include <ipc/mouseev.h> 44 43 #include <abi/ipc/methods.h> -
uspace/drv/hid/usbhid/kbd/kbddev.c
r42c2e65 rdc5c303 41 41 42 42 #include <io/keycode.h> 43 #include <io/ console.h>43 #include <io/kbd_event.h> 44 44 #include <abi/ipc/methods.h> 45 45 #include <ipc/kbdev.h> -
uspace/drv/hid/usbhid/kbd/kbdrepeat.c
r42c2e65 rdc5c303 36 36 37 37 #include <fibril_synch.h> 38 #include <io/kbd_event.h> 38 39 #include <io/keycode.h> 39 #include <io/console.h>40 40 #include <errno.h> 41 41 -
uspace/drv/hid/usbhid/meson.build
r42c2e65 rdc5c303 27 27 # 28 28 29 deps = [ 'usbhid', 'usbdev', 'usb' ]29 deps = [ 'usbhid', 'usbdev', 'usb', 'input' ] 30 30 includes += [ include_directories('.') ] 31 31 src = files( -
uspace/drv/hid/usbhid/mouse/mousedev.c
r42c2e65 rdc5c303 46 46 #include <str_error.h> 47 47 #include <ipc/mouseev.h> 48 #include <io/console.h>49 48 50 49 #include <ipc/kbdev.h> -
uspace/drv/hid/usbhid/multimedia/multimedia.c
r42c2e65 rdc5c303 51 51 52 52 #include <ipc/kbdev.h> 53 #include <io/ console.h>53 #include <io/kbd_event.h> 54 54 55 55 #define NAME "multimedia-keys" -
uspace/drv/hid/xtkbd/meson.build
r42c2e65 rdc5c303 27 27 # 28 28 29 deps = [ 'input' ] 29 30 src = files('main.c', 'xtkbd.c') -
uspace/drv/hid/xtkbd/xtkbd.c
r42c2e65 rdc5c303 39 39 #include <io/keycode.h> 40 40 #include <io/chardev.h> 41 #include <io/ console.h>41 #include <io/kbd_event.h> 42 42 #include <ipc/kbdev.h> 43 43 #include <abi/ipc/methods.h> -
uspace/drv/nic/ar9271/wmi.c
r42c2e65 rdc5c303 230 230 size_t buffer_size = header_size + command_length; 231 231 void *buffer = malloc(buffer_size); 232 if (buffer == NULL) { 233 usb_log_error("Failed to allocate WMI message buffer (out of memory).\n"); 234 return ENOMEM; 235 } 232 236 233 237 if (command_buffer != NULL) … … 241 245 host2uint16_t_be(++htc_device->sequence_number); 242 246 243 /* Send message . */247 /* Send message (buffer will not be needed afterwards regardless of result). */ 244 248 errno_t rc = htc_send_control_message(htc_device, buffer, buffer_size, 245 249 htc_device->endpoints.wmi_endpoint); 246 if (rc != EOK) {247 free(buffer);250 free(buffer); 251 if (rc != EOK) { 248 252 usb_log_error("Failed to send WMI message. Error: %s\n", str_error_name(rc)); 249 253 return rc; 250 254 } 251 252 free(buffer);253 255 254 256 bool clean_resp_buffer = false; … … 267 269 response_buffer_size, NULL); 268 270 if (rc != EOK) { 269 free(buffer);270 271 usb_log_error("Failed to receive WMI message response. " 271 272 "Error: %s\n", str_error_name(rc)); … … 275 276 if (response_buffer_size < sizeof(htc_frame_header_t) + 276 277 sizeof(wmi_command_header_t)) { 277 free(buffer);278 278 usb_log_error("Corrupted response received.\n"); 279 279 return EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.
