Changeset a1347a7 in mainline for uspace/srv


Ignore:
Timestamp:
2012-01-15T13:51:09Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bd79281
Parents:
03e0a244 (diff), f302586 (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.
Message:

Merge mainline changes

Location:
uspace/srv
Files:
3 deleted
22 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    r03e0a244 ra1347a7  
    245245        void *vaddr;
    246246        int rc;
    247 
    248         rc = loc_server_register(NAME, ata_bd_connection);
     247       
     248        async_set_client_connection(ata_bd_connection);
     249        rc = loc_server_register(NAME);
    249250        if (rc < 0) {
    250251                printf(NAME ": Unable to register driver.\n");
  • uspace/srv/bd/file_bd/file_bd.c

    r03e0a244 ra1347a7  
    141141        int rc;
    142142        long img_size;
    143 
    144         rc = loc_server_register(NAME, file_bd_connection);
     143       
     144        async_set_client_connection(file_bd_connection);
     145        rc = loc_server_register(NAME);
    145146        if (rc < 0) {
    146147                printf(NAME ": Unable to register driver.\n");
  • uspace/srv/bd/gxe_bd/gxe_bd.c

    r03e0a244 ra1347a7  
    125125        int rc, i;
    126126        char name[16];
    127 
    128         rc = loc_server_register(NAME, gxe_bd_connection);
     127       
     128        async_set_client_connection(gxe_bd_connection);
     129        rc = loc_server_register(NAME);
    129130        if (rc < 0) {
    130131                printf(NAME ": Unable to register driver.\n");
  • uspace/srv/bd/part/guid_part/guid_part.c

    r03e0a244 ra1347a7  
    164164
    165165        /* Register server with location service. */
    166         rc = loc_server_register(NAME, gpt_connection);
     166        async_set_client_connection(gpt_connection);
     167        rc = loc_server_register(NAME);
    167168        if (rc != EOK) {
    168169                printf(NAME ": Unable to register server.\n");
  • uspace/srv/bd/part/mbr_part/mbr_part.c

    r03e0a244 ra1347a7  
    214214
    215215        /* Register server with location service. */
    216         rc = loc_server_register(NAME, mbr_connection);
     216        async_set_client_connection(mbr_connection);
     217        rc = loc_server_register(NAME);
    217218        if (rc != EOK) {
    218219                printf(NAME ": Unable to register server.\n");
  • uspace/srv/bd/rd/rd.c

    r03e0a244 ra1347a7  
    235235            (void *) addr_phys, size);
    236236       
    237         ret = loc_server_register(NAME, rd_connection);
     237        async_set_client_connection(rd_connection);
     238        ret = loc_server_register(NAME);
    238239        if (ret < 0) {
    239240                printf("%s: Unable to register driver (%d)\n", NAME, ret);
  • uspace/srv/devman/main.c

    r03e0a244 ra1347a7  
    13091309
    13101310        /*
    1311          * !!! devman_connection ... as the device manager is not a real loc
    1312          * driver (it uses a completely different ipc protocol than an ordinary
    1313          * loc driver) forwarding a connection from client to the devman by
    1314          * location service would not work.
     1311         * Caution: As the device manager is not a real loc
     1312         * driver (it uses a completely different IPC protocol
     1313         * than an ordinary loc driver), forwarding a connection
     1314         * from client to the devman by location service will
     1315         * not work.
    13151316         */
    1316         loc_server_register(NAME, devman_connection);
     1317        loc_server_register(NAME);
    13171318       
    13181319        return true;
     
    13251326        if (log_init(NAME, LVL_WARN) != EOK) {
    13261327                printf(NAME ": Error initializing logging subsystem.\n");
    1327                 return -1;
    1328         }
    1329 
    1330         if (!devman_init()) {
    1331                 log_msg(LVL_ERROR, "Error while initializing service.");
    13321328                return -1;
    13331329        }
     
    13381334        async_set_client_connection(devman_connection);
    13391335
     1336        if (!devman_init()) {
     1337                log_msg(LVL_ERROR, "Error while initializing service.");
     1338                return -1;
     1339        }
     1340
    13401341        /* Register device manager at naming service. */
    13411342        if (service_register(SERVICE_DEVMAN) != EOK) {
  • uspace/srv/hid/console/console.c

    r03e0a244 ra1347a7  
    825825       
    826826        /* Register server */
    827         int rc = loc_server_register(NAME, client_connection);
     827        async_set_client_connection(client_connection);
     828        int rc = loc_server_register(NAME);
    828829        if (rc < 0) {
    829830                printf("%s: Unable to register server (%s)\n", NAME,
  • uspace/srv/hid/fb/fb.c

    r03e0a244 ra1347a7  
    987987       
    988988        /* Register server */
    989         int rc = loc_server_register(NAME, client_connection);
     989        async_set_client_connection(client_connection);
     990        int rc = loc_server_register(NAME);
    990991        if (rc != EOK) {
    991992                printf("%s: Unable to register driver (%d)\n", NAME, rc);
  • uspace/srv/hid/input/Makefile

    r03e0a244 ra1347a7  
    4343        port/adb_mouse.c \
    4444        port/chardev.c \
    45         port/chardev_mouse.c \
    4645        port/gxemul.c \
    4746        port/msim.c \
     
    5251        proto/adb.c \
    5352        proto/mousedev.c \
    54         proto/ps2.c \
    5553        ctl/apple.c \
    5654        ctl/gxe_fb.c \
  • uspace/srv/hid/input/generic/input.c

    r03e0a244 ra1347a7  
    172172
    173173/** Mouse pointer has moved. */
    174 void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy)
     174void mouse_push_event_move(mouse_dev_t *mdev, int dx, int dy, int dz)
    175175{
    176176        async_exch_t *exch = async_exchange_begin(client_sess);
    177         async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy);
     177        if (dx || dy)
     178                async_msg_2(exch, INPUT_EVENT_MOVE, dx, dy);
     179        if (dz) {
     180                // TODO: Implement proper wheel support
     181                keycode_t code = dz > 0 ? KC_UP : KC_DOWN;
     182                for (int i = 0; i < 3; ++i) {
     183                        async_msg_4(exch, INPUT_EVENT_KEY, KEY_PRESS, code, 0, 0);
     184                }
     185                async_msg_4(exch, INPUT_EVENT_KEY, KEY_RELEASE, code, 0, 0);
     186        }
    178187        async_exchange_end(exch);
    179188}
     
    397406         * them automatically.
    398407         */
    399 #if defined(UARCH_amd64)
    400         kbd_add_dev(&chardev_port, &pc_ctl);
    401 #endif
    402408#if defined(UARCH_arm32) && defined(MACHINE_gta02)
    403409        kbd_add_dev(&chardev_port, &stty_ctl);
     
    411417#if defined(UARCH_arm32) && defined(MACHINE_integratorcp)
    412418        kbd_add_dev(&pl050_port, &pc_ctl);
    413 #endif
    414 #if defined(UARCH_ia32)
    415         kbd_add_dev(&chardev_port, &pc_ctl);
    416 #endif
    417 #if defined(MACHINE_i460GX)
    418         kbd_add_dev(&chardev_port, &pc_ctl);
    419419#endif
    420420#if defined(MACHINE_ski)
     
    450450         * them automatically.
    451451         */
    452 #if defined(UARCH_amd64)
    453         mouse_add_dev(&chardev_mouse_port, &ps2_proto);
    454 #endif
    455 #if defined(UARCH_ia32)
    456         mouse_add_dev(&chardev_mouse_port, &ps2_proto);
    457 #endif
    458 #if defined(MACHINE_i460GX)
    459         mouse_add_dev(&chardev_mouse_port, &ps2_proto);
    460 #endif
    461452#if defined(UARCH_ppc32)
    462453        mouse_add_dev(&adb_mouse_port, &adb_proto);
     
    658649       
    659650        /* Register driver */
    660         int rc = loc_server_register(NAME, client_connection);
     651        async_set_client_connection(client_connection);
     652        int rc = loc_server_register(NAME);
    661653        if (rc < 0) {
    662654                printf("%s: Unable to register server (%d)\n", NAME, rc);
  • uspace/srv/hid/input/include/mouse.h

    r03e0a244 ra1347a7  
    6262
    6363extern void mouse_push_data(mouse_dev_t *, sysarg_t);
    64 extern void mouse_push_event_move(mouse_dev_t *, int, int);
     64extern void mouse_push_event_move(mouse_dev_t *, int, int, int);
    6565extern void mouse_push_event_button(mouse_dev_t *, int, int);
    6666
  • uspace/srv/hid/input/include/mouse_proto.h

    r03e0a244 ra1347a7  
    4848
    4949extern mouse_proto_ops_t adb_proto;
    50 extern mouse_proto_ops_t ps2_proto;
    5150extern mouse_proto_ops_t mousedev_proto;
    5251
  • uspace/srv/hid/input/port/chardev.c

    r03e0a244 ra1347a7  
    6363/** List of devices to try connecting to. */
    6464static const char *in_devs[] = {
    65         "char/ps2a",
    6665        "char/s3c24ser"
    6766};
  • uspace/srv/hid/input/proto/adb.c

    r03e0a244 ra1347a7  
    8282       
    8383        if (dx != 0 || dy != 0)
    84                 mouse_push_event_move(mouse_dev, dx, dy);
     84                mouse_push_event_move(mouse_dev, dx, dy, 0);
    8585}
    8686
  • uspace/srv/hid/input/proto/mousedev.c

    r03e0a244 ra1347a7  
    9191                switch (IPC_GET_IMETHOD(call)) {
    9292                case MOUSEEV_MOVE_EVENT:
    93                         mouse_push_event_move(mousedev->mouse_dev, IPC_GET_ARG1(call),
    94                             IPC_GET_ARG2(call));
     93                        mouse_push_event_move(mousedev->mouse_dev,
     94                            IPC_GET_ARG1(call), IPC_GET_ARG2(call),
     95                            IPC_GET_ARG3(call));
    9596                        retval = EOK;
    9697                        break;
    9798                case MOUSEEV_BUTTON_EVENT:
    98                         mouse_push_event_button(mousedev->mouse_dev, IPC_GET_ARG1(call),
    99                             IPC_GET_ARG2(call));
     99                        mouse_push_event_button(mousedev->mouse_dev,
     100                            IPC_GET_ARG1(call), IPC_GET_ARG2(call));
    100101                        retval = EOK;
    101102                        break;
  • uspace/srv/hid/remcons/remcons.c

    r03e0a244 ra1347a7  
    322322        int port = 2223;
    323323       
    324         int rc = loc_server_register(NAME, client_connection);
     324        async_set_client_connection(client_connection);
     325        int rc = loc_server_register(NAME);
    325326        if (rc < 0) {
    326327                fprintf(stderr, NAME ": Unable to register server: %s.\n",
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    r03e0a244 ra1347a7  
    8585
    8686        printf(NAME ": S3C24xx touchscreen driver\n");
    87 
    88         rc = loc_server_register(NAME, s3c24xx_ts_connection);
     87       
     88        async_set_client_connection(s3c24xx_ts_connection);
     89        rc = loc_server_register(NAME);
    8990        if (rc < 0) {
    9091                printf(NAME ": Unable to register driver.\n");
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    r03e0a244 ra1347a7  
    154154        }
    155155
    156         rc = loc_server_register(NAME, cuda_connection);
     156        async_set_client_connection(cuda_connection);
     157        rc = loc_server_register(NAME);
    157158        if (rc < 0) {
    158159                printf(NAME ": Unable to register server.\n");
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    r03e0a244 ra1347a7  
    7979        printf(NAME ": S3C24xx on-chip UART driver\n");
    8080
    81         rc = loc_server_register(NAME, s3c24xx_uart_connection);
     81        async_set_client_connection(s3c24xx_uart_connection);
     82        rc = loc_server_register(NAME);
    8283        if (rc < 0) {
    8384                printf(NAME ": Unable to register server.\n");
  • uspace/srv/net/nil/eth/eth.c

    r03e0a244 ra1347a7  
    802802                        next = tmp;
    803803                } else {
     804                        nic_send_frame(device->sess, packet_get_data(next),
     805                            packet_get_data_length(next));
    804806                        next = pq_next(next);
    805807                }
    806808        } while (next);
    807809       
    808         /* Send packet queue */
    809         if (packet)
    810                 nic_send_message(device->sess, packet_get_id(packet));
     810        pq_release_remote(eth_globals.net_sess, packet_get_id(packet));
    811811       
    812812        fibril_rwlock_read_unlock(&eth_globals.devices_lock);
  • uspace/srv/net/nil/nildummy/nildummy.c

    r03e0a244 ra1347a7  
    345345    services_t sender)
    346346{
     347        packet_t *p;
     348       
    347349        fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
    348350       
     
    354356        }
    355357       
    356         /* Send packet queue */
    357         if (packet)
    358                 nic_send_message(device->sess, packet_get_id(packet));
     358        p = packet;
     359        do {
     360                nic_send_frame(device->sess, packet_get_data(p),
     361                    packet_get_data_length(p));
     362                p = pq_next(p);
     363        } while (p != NULL);
     364       
     365        pq_release_remote(nildummy_globals.net_sess, packet_get_id(packet));
    359366       
    360367        fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
Note: See TracChangeset for help on using the changeset viewer.