Changeset 41ebc36 in mainline


Ignore:
Timestamp:
2017-12-18T12:32:07Z (6 years ago)
Author:
Petr Mánek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7faf0f0
Parents:
fc338e0
Message:

usbdiag: move contents of libusbdiag to libdrv, registered usbdiag interface into the master routing table, repaired broken references

Location:
uspace
Files:
4 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile

    rfc338e0 r41ebc36  
    241241        lib/usbhost \
    242242        lib/usbdev \
    243         lib/usbdiag \
    244243        lib/usbhid \
    245244        lib/usbvirt \
  • uspace/app/tmon/Makefile

    rfc338e0 r41ebc36  
    3030BINARY = tmon
    3131
    32 LIBS = drv usbdiag
     32LIBS = drv
    3333
    3434SOURCES = \
  • uspace/app/tmon/list.c

    rfc338e0 r41ebc36  
    3838#include <devman.h>
    3939#include <loc.h>
    40 #include <usb/diag/diag.h>
     40#include <usbdiag_iface.h>
    4141#include "commands.h"
    4242
     
    7070        int rc;
    7171
    72         if ((rc = loc_category_get_id(USB_DIAG_CATEGORY, &diag_cat, 0))) {
    73                 printf(NAME ": Error resolving category '%s'", USB_DIAG_CATEGORY);
     72        if ((rc = loc_category_get_id(USBDIAG_CATEGORY, &diag_cat, 0))) {
     73                printf(NAME ": Error resolving category '%s'", USBDIAG_CATEGORY);
    7474                return 1;
    7575        }
  • uspace/app/tmon/test.c

    rfc338e0 r41ebc36  
    4040#include <errno.h>
    4141#include <str_error.h>
    42 #include <usb/diag/diag.h>
    43 #include <usb/diag/iface.h>
     42#include <usbdiag_iface.h>
    4443#include "commands.h"
    4544
     
    5352        int rc;
    5453
    55         if ((rc = loc_category_get_id(USB_DIAG_CATEGORY, &diag_cat, 0))) {
    56                 printf(NAME ": Error resolving category '%s'", USB_DIAG_CATEGORY);
     54        if ((rc = loc_category_get_id(USBDIAG_CATEGORY, &diag_cat, 0))) {
     55                printf(NAME ": Error resolving category '%s'", USBDIAG_CATEGORY);
    5756                return rc;
    5857        }
     
    116115
    117116static int bulk_worker(devman_handle_t fun) {
    118         async_sess_t *sess = usb_diag_connect(fun);
     117        async_sess_t *sess = usbdiag_connect(fun);
    119118        async_exch_t *exch = async_exchange_begin(sess);
    120119
    121120        // TODO: do some testing
    122121        int y;
    123         int rc = usb_diag_test(exch, 4200, &y);
     122        int rc = usbdiag_test(exch, 4200, &y);
    124123
    125124        if (rc) {
     
    130129
    131130        async_exchange_end(exch);
    132         usb_diag_disconnect(sess);
     131        usbdiag_disconnect(sess);
    133132        return 0;
    134133}
  • uspace/drv/bus/usb/usbdiag/Makefile

    rfc338e0 r41ebc36  
    2929USPACE_PREFIX = ../../../..
    3030
    31 LIBS = usbdiag usbdev usb drv
     31LIBS = usbdev usb drv
    3232
    3333BINARY = usbdiag
  • uspace/drv/bus/usb/usbdiag/device.c

    rfc338e0 r41ebc36  
    3636#include <errno.h>
    3737#include <usb/debug.h>
    38 #include <usb/diag/iface.h>
     38#include <usbdiag_iface.h>
    3939
    4040#include "device.h"
     
    4848}
    4949
    50 static usb_diag_iface_t diag_interface = {
     50static usbdiag_iface_t diag_interface = {
    5151        .test = some_test,
    5252};
  • uspace/drv/bus/usb/usbdiag/main.c

    rfc338e0 r41ebc36  
    3737#include <usb/debug.h>
    3838#include <usb/dev/driver.h>
    39 #include <usb/diag/diag.h>
     39#include <usbdiag_iface.h>
    4040#include <str_error.h>
    4141
     
    6161        }
    6262
    63         if ((rc = ddf_fun_add_to_category(diag_dev->fun, USB_DIAG_CATEGORY))) {
     63        if ((rc = ddf_fun_add_to_category(diag_dev->fun, USBDIAG_CATEGORY))) {
    6464                usb_log_error("Failed add DDF to category '"
    65                     USB_DIAG_CATEGORY "': %s.\n", str_error(rc));
     65                    USBDIAG_CATEGORY "': %s.\n", str_error(rc));
    6666                goto err_bind;
    6767        }
  • uspace/lib/drv/Makefile

    rfc338e0 r41ebc36  
    4848        generic/remote_usb.c \
    4949        generic/remote_pci.c \
     50        generic/remote_usbdiag.c \
    5051        generic/remote_usbhc.c \
    5152        generic/remote_usbhid.c \
  • uspace/lib/drv/generic/dev_iface.c

    rfc338e0 r41ebc36  
    4949#include "remote_ieee80211.h"
    5050#include "remote_usb.h"
     51#include "remote_usbdiag.h"
    5152#include "remote_usbhc.h"
    5253#include "remote_usbhid.h"
     
    6768                [PCI_DEV_IFACE] = &remote_pci_iface,
    6869                [USB_DEV_IFACE] = &remote_usb_iface,
     70                [USBDIAG_DEV_IFACE] = &remote_usbdiag_iface,
    6971                [USBHC_DEV_IFACE] = &remote_usbhc_iface,
    7072                [USBHID_DEV_IFACE] = &remote_usbhid_iface,
     
    8789        if (iface_method_idx >= rem_iface->method_count)
    8890                return NULL;
    89        
     91
    9092        return rem_iface->methods[iface_method_idx];
    9193}
Note: See TracChangeset for help on using the changeset viewer.