Changeset dc5c303 in mainline for uspace/drv


Ignore:
Timestamp:
2023-12-28T13:59:23Z (2 years ago)
Author:
GitHub <noreply@…>
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)
Message:

Merge branch 'master' into topic/packet-capture

Location:
uspace/drv
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hw_struct/common.h

    r42c2e65 rdc5c303  
    5353 * 4 bytes, little-endian.
    5454 */
    55 typedef ioport32_t xhci_dword_t __attribute__((aligned(4)));
     55typedef ioport32_t xhci_dword_t;
    5656
    5757/**
    5858 * 8 bytes, little-endian.
    5959 */
    60 typedef volatile uint64_t xhci_qword_t __attribute__((aligned(8)));
     60typedef volatile uint64_t xhci_qword_t;
    6161
    6262#define XHCI_DWORD_EXTRACT(field, hi, lo) \
  • uspace/drv/bus/usb/xhci/hw_struct/context.h

    r42c2e65 rdc5c303  
    5353        xhci_dword_t data3;
    5454        xhci_dword_t reserved[3];
     55} xhci_ep_ctx_t;
    5556
    5657#define XHCI_EP_COUNT 31
     
    107108#define XHCI_EP_MAX_ESIT_PAYLOAD_HI(ctx) XHCI_DWORD_EXTRACT((ctx).data[0], 31, 24)
    108109
    109 } __attribute__((packed)) xhci_ep_ctx_t;
    110 
    111110enum {
    112111        EP_STATE_DISABLED = 0,
     
    123122        xhci_dword_t data [4];
    124123        xhci_dword_t reserved [4];
     124} xhci_slot_ctx_t;
    125125
    126126#define XHCI_SLOT_ROUTE_STRING_SET(ctx, val) \
     
    165165#define XHCI_SLOT_STATE(ctx)            XHCI_DWORD_EXTRACT((ctx).data[3], 31, 27)
    166166
    167 } __attribute__((packed)) xhci_slot_ctx_t;
    168 
    169167enum {
    170168        SLOT_STATE_DISABLED = 0,
     
    213211typedef struct xhci_stream_ctx {
    214212        uint64_t data [2];
     213} xhci_stream_ctx_t;
     214
    215215#define XHCI_STREAM_DCS(ctx)     XHCI_QWORD_EXTRACT((ctx).data[0],  0, 0)
    216216#define XHCI_STREAM_SCT(ctx)     XHCI_QWORD_EXTRACT((ctx).data[0],  3, 1)
     
    222222#define XHCI_STREAM_DEQ_PTR_SET(ctx, val) \
    223223        xhci_qword_set_bits(&(ctx).data[0], (val >> 4), 63, 4)
    224 } __attribute__((packed)) xhci_stream_ctx_t;
    225224
    226225/**
     
    234233typedef struct xhci_input_ctrl_ctx {
    235234        uint32_t data [8];
     235} __attribute__((packed)) xhci_input_ctrl_ctx_t;
     236
    236237#define XHCI_INPUT_CTRL_CTX_DROP(ctx, idx) \
    237238    XHCI_DWORD_EXTRACT((ctx).data[0], (idx), (idx))
     
    252253#define XHCI_INPUT_CTRL_CTX_ALTER_SETTING(ctx) \
    253254    XHCI_DWORD_EXTRACT((ctx).data[7], 23, 16)
    254 } __attribute__((packed)) xhci_input_ctrl_ctx_t;
    255255
    256256/**
     
    281281        uint8_t reserved;
    282282        uint8_t ports [];
    283 } __attribute__((packed)) xhci_port_bandwidth_ctx_t;
     283} xhci_port_bandwidth_ctx_t;
    284284
    285285#endif
  • uspace/drv/hid/adb-kbd/adb-kbd.c

    r42c2e65 rdc5c303  
    3434#include <ddf/log.h>
    3535#include <errno.h>
    36 #include <io/console.h>
     36#include <io/kbd_event.h>
    3737#include <ipc/adb.h>
    3838#include <ipc/kbdev.h>
  • uspace/drv/hid/adb-kbd/ctl.c

    r42c2e65 rdc5c303  
    3333
    3434#include <errno.h>
    35 #include <io/console.h>
     35#include <io/kbd_event.h>
    3636#include <io/keycode.h>
    3737
  • uspace/drv/hid/adb-kbd/meson.build

    r42c2e65 rdc5c303  
    2727#
    2828
     29deps = [ 'input' ]
    2930src = files(
    3031        'main.c',
  • uspace/drv/hid/adb-mouse/meson.build

    r42c2e65 rdc5c303  
    2727#
    2828
     29deps = [ 'input' ]
    2930src = files('main.c', 'adb-mouse.c')
  • uspace/drv/hid/atkbd/atkbd.c

    r42c2e65 rdc5c303  
    3838#include <errno.h>
    3939#include <ddf/log.h>
     40#include <io/kbd_event.h>
    4041#include <io/keycode.h>
    4142#include <io/chardev.h>
    42 #include <io/console.h>
    4343#include <ipc/kbdev.h>
    4444#include <abi/ipc/methods.h>
  • uspace/drv/hid/atkbd/meson.build

    r42c2e65 rdc5c303  
    2727#
    2828
     29deps = [ 'input' ]
    2930src = files('main.c', 'atkbd.c')
  • uspace/drv/hid/ps2mouse/meson.build

    r42c2e65 rdc5c303  
    2727#
    2828
     29deps = [ 'input' ]
    2930src = files('main.c', 'ps2mouse.c')
  • uspace/drv/hid/ps2mouse/ps2mouse.c

    r42c2e65 rdc5c303  
    4040#include <io/keycode.h>
    4141#include <io/chardev.h>
    42 #include <io/console.h>
    4342#include <ipc/mouseev.h>
    4443#include <abi/ipc/methods.h>
  • uspace/drv/hid/usbhid/kbd/kbddev.c

    r42c2e65 rdc5c303  
    4141
    4242#include <io/keycode.h>
    43 #include <io/console.h>
     43#include <io/kbd_event.h>
    4444#include <abi/ipc/methods.h>
    4545#include <ipc/kbdev.h>
  • uspace/drv/hid/usbhid/kbd/kbdrepeat.c

    r42c2e65 rdc5c303  
    3636
    3737#include <fibril_synch.h>
     38#include <io/kbd_event.h>
    3839#include <io/keycode.h>
    39 #include <io/console.h>
    4040#include <errno.h>
    4141
  • uspace/drv/hid/usbhid/meson.build

    r42c2e65 rdc5c303  
    2727#
    2828
    29 deps = [ 'usbhid', 'usbdev', 'usb' ]
     29deps = [ 'usbhid', 'usbdev', 'usb', 'input' ]
    3030includes += [ include_directories('.') ]
    3131src = files(
  • uspace/drv/hid/usbhid/mouse/mousedev.c

    r42c2e65 rdc5c303  
    4646#include <str_error.h>
    4747#include <ipc/mouseev.h>
    48 #include <io/console.h>
    4948
    5049#include <ipc/kbdev.h>
  • uspace/drv/hid/usbhid/multimedia/multimedia.c

    r42c2e65 rdc5c303  
    5151
    5252#include <ipc/kbdev.h>
    53 #include <io/console.h>
     53#include <io/kbd_event.h>
    5454
    5555#define NAME  "multimedia-keys"
  • uspace/drv/hid/xtkbd/meson.build

    r42c2e65 rdc5c303  
    2727#
    2828
     29deps = [ 'input' ]
    2930src = files('main.c', 'xtkbd.c')
  • uspace/drv/hid/xtkbd/xtkbd.c

    r42c2e65 rdc5c303  
    3939#include <io/keycode.h>
    4040#include <io/chardev.h>
    41 #include <io/console.h>
     41#include <io/kbd_event.h>
    4242#include <ipc/kbdev.h>
    4343#include <abi/ipc/methods.h>
  • uspace/drv/nic/ar9271/wmi.c

    r42c2e65 rdc5c303  
    230230        size_t buffer_size = header_size + command_length;
    231231        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        }
    232236
    233237        if (command_buffer != NULL)
     
    241245            host2uint16_t_be(++htc_device->sequence_number);
    242246
    243         /* Send message. */
     247        /* Send message (buffer will not be needed afterwards regardless of result). */
    244248        errno_t rc = htc_send_control_message(htc_device, buffer, buffer_size,
    245249            htc_device->endpoints.wmi_endpoint);
    246         if (rc != EOK) {
    247                 free(buffer);
     250        free(buffer);
     251        if (rc != EOK) {
    248252                usb_log_error("Failed to send WMI message. Error: %s\n", str_error_name(rc));
    249253                return rc;
    250254        }
    251 
    252         free(buffer);
    253255
    254256        bool clean_resp_buffer = false;
     
    267269                    response_buffer_size, NULL);
    268270                if (rc != EOK) {
    269                         free(buffer);
    270271                        usb_log_error("Failed to receive WMI message response. "
    271272                            "Error: %s\n", str_error_name(rc));
     
    275276                if (response_buffer_size < sizeof(htc_frame_header_t) +
    276277                    sizeof(wmi_command_header_t)) {
    277                         free(buffer);
    278278                        usb_log_error("Corrupted response received.\n");
    279279                        return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.