Changes in / [c3dafe1:06f9d8fb] in mainline


Ignore:
Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/vuhid/device.c

    rc3dafe1 r06f9d8fb  
    9696    const char *id)
    9797{
    98         if ((ifaces == NULL) || (id == NULL)) {
    99                 return NULL;
    100         }
    101         while (*ifaces != NULL) {
    102                 if (str_cmp((*ifaces)->id, id) == 0) {
    103                         return *ifaces;
     98        vuhid_interface_t *iface = ifaces[0];
     99        while (iface != NULL) {
     100                if (str_cmp(iface->id, id) == 0) {
     101                        return iface;
    104102                }
    105                 ifaces++;
    106         }
    107 
    108         return NULL;
     103                iface++;
     104        }
     105
     106        return iface;
    109107}
    110108
     
    121119        }
    122120
     121        // FIXME - we shall set vuhid_data to NULL in the main() rather
     122        // than to depend on individual interfaces
    123123        /* Already used interface. */
    124124        if (iface->vuhid_data != NULL) {
     
    166166         * Prepare new descriptors.
    167167         */
     168        printf("preparing descriptors...\n");
    168169        size_t descr_count = 0;
    169170        size_t total_descr_size = 0;
     
    272273        }
    273274
     275        printf("adding extra descriptors...\n");
    274276        /* Allocation is okay, we can (actually have to now) overwrite the
    275277         * original pointer.
  • uspace/drv/ehci-hcd/main.c

    rc3dafe1 r06f9d8fb  
    8888        ret = pci_disable_legacy(device, reg_base, reg_size, irq);
    8989        CHECK_RET_RETURN(ret,
    90             "Failed to disable legacy USB: %s.\n", str_error(ret));
     90            "Failed(%d) disable legacy USB: %s.\n", ret, str_error(ret));
    9191
    9292        ddf_fun_t *hc_fun = ddf_fun_create(device, fun_exposed, "ehci-hc");
  • uspace/drv/ehci-hcd/pci.c

    rc3dafe1 r06f9d8fb  
    3535 */
    3636#include <errno.h>
    37 #include <str_error.h>
    3837#include <assert.h>
    3938#include <as.h>
     
    241240        void *regs = NULL;
    242241        int ret = pio_enable((void*)reg_base, reg_size, &regs);
    243         CHECK_RET_RETURN(ret, "Failed to map registers %p: %s.\n",
    244             (void *) reg_base, str_error(ret));
     242        CHECK_RET_RETURN(ret, "Failed(%d) to map registers %p.\n",
     243            ret, (void *) reg_base);
    245244
    246245        const uint32_t hcc_params =
     
    257256        uint32_t usblegsup;
    258257        ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup);
    259         CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret));
    260         usb_log_debug("USBLEGSUP: %" PRIx32 ".\n", usblegsup);
     258        CHECK_RET_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret);
     259        usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup);
    261260
    262261        /* Request control from firmware/BIOS, by writing 1 to highest byte.
     
    264263        usb_log_debug("Requesting OS control.\n");
    265264        ret = pci_write8(device, eecp + USBLEGSUP_OFFSET + 3, 1);
    266         CHECK_RET_RETURN(ret, "Failed to request OS EHCI control: %s.\n",
    267             str_error(ret));
     265        CHECK_RET_RETURN(ret, "Failed(%d) to request OS EHCI control.\n", ret);
    268266
    269267        size_t wait = 0;
     
    285283                ret = pci_write32(device, eecp + USBLEGSUP_OFFSET,
    286284                    USBLEGSUP_OS_CONTROL);
    287                 CHECK_RET_RETURN(ret, "Failed to force OS control: %s.\n",
    288                     str_error(ret));
     285                CHECK_RET_RETURN(ret, "Failed(%d) to force OS control.\n", ret);
    289286                /* Check capability type here, A value of 01h
    290287                 * identifies the capability as Legacy Support.
     
    300297                            device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts);
    301298                        CHECK_RET_RETURN(ret,
    302                             "Failed to get USBLEGCTLSTS: %s.\n", str_error(ret));
    303                         usb_log_debug("USBLEGCTLSTS: %" PRIx32 ".\n",
     299                            "Failed(%d) to get USBLEGCTLSTS.\n", ret);
     300                        usb_log_debug("USBLEGCTLSTS: %" PRIxn ".\n",
    304301                            usblegctlsts);
    305302                        /* Zero SMI enables in legacy control register.
     
    313310                            device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts);
    314311                        CHECK_RET_RETURN(ret,
    315                             "Failed to get USBLEGCTLSTS 2: %s.\n",
    316                             str_error(ret));
    317                         usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIx32 ".\n",
     312                            "Failed(%d) to get USBLEGCTLSTS 2.\n", ret);
     313                        usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIxn ".\n",
    318314                            usblegctlsts);
    319315                }
     
    323319        /* Read again Legacy Support register */
    324320        ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup);
    325         CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret));
    326         usb_log_debug("USBLEGSUP: %" PRIx32 ".\n", usblegsup);
     321        CHECK_RET_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret);
     322        usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup);
    327323
    328324        /*
  • uspace/drv/ohci/hw_struct/hcca.h

    rc3dafe1 r06f9d8fb  
    3737#include <stdint.h>
    3838
    39 /** Host controller communication area.
    40  * Shared memory used for communication between the controller and the driver.
    41  */
    4239typedef struct hcca {
    4340        uint32_t int_ep[32];
Note: See TracChangeset for help on using the changeset viewer.