Changeset a1732929 in mainline for uspace/drv


Ignore:
Timestamp:
2018-01-15T17:04:34Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ff99e8
Parents:
c1a966e
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:32)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-15 17:04:34)
Message:

usb: unified logging

Use logger instead of printf. Logger adds newlines automatically.

Location:
uspace/drv
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/usbmast/bo_trans.c

    rc1a966e ra1732929  
    9090            str_error(rc));
    9191        if (rc != EOK) {
    92                 usb_log_error("Bulk out write failed: %s\n", str_error(rc));
     92                usb_log_error("Bulk out write failed: %s", str_error(rc));
    9393                return EIO;
    9494        }
     
    154154        case cbs_failed:
    155155                cmd->status = CMDS_FAILED;
    156                 usb_log_error("CBS Failed.\n");
     156                usb_log_error("CBS Failed.");
    157157                break;
    158158        case cbs_phase_error:
    159                 usb_log_error("CBS phase error.\n");
     159                usb_log_error("CBS phase error.");
    160160                rc = EIO;
    161161                break;
    162162        default:
    163                 usb_log_error("CBS other error.\n");
     163                usb_log_error("CBS other error.");
    164164                rc = EIO;
    165165                break;
     
    168168        const size_t residue = uint32_usb2host(csw.dCSWDataResidue);
    169169        if (residue > dbuf_size) {
    170                 usb_log_error("Residue > buffer size (%zu > %zu).\n",
     170                usb_log_error("Residue > buffer size (%zu > %zu).",
    171171                    residue, dbuf_size);
    172172                return EIO;
  • uspace/drv/block/usbmast/main.c

    rc1a966e ra1732929  
    156156            usb_device_get_mapped_ep_desc(dev, &bulk_out_ep);
    157157        if (!epm_in || !epm_out || !epm_in->present || !epm_out->present) {
    158                 usb_log_error("Required EPs were not mapped.\n");
     158                usb_log_error("Required EPs were not mapped.");
    159159                return ENOENT;
    160160        }
     
    163163        mdev = usb_device_data_alloc(dev, sizeof(usbmast_dev_t));
    164164        if (mdev == NULL) {
    165                 usb_log_error("Failed allocating softstate.\n");
     165                usb_log_error("Failed allocating softstate.");
    166166                return ENOMEM;
    167167        }
     
    169169        mdev->usb_dev = dev;
    170170
    171         usb_log_info("Initializing mass storage `%s'.\n",
     171        usb_log_info("Initializing mass storage `%s'.",
    172172            usb_device_get_name(dev));
    173         usb_log_debug("Bulk in endpoint: %d [%zuB].\n",
     173        usb_log_debug("Bulk in endpoint: %d [%zuB].",
    174174            epm_in->pipe.desc.endpoint_no, epm_in->pipe.desc.max_transfer_size);
    175         usb_log_debug("Bulk out endpoint: %d [%zuB].\n",
     175        usb_log_debug("Bulk out endpoint: %d [%zuB].",
    176176            epm_out->pipe.desc.endpoint_no, epm_out->pipe.desc.max_transfer_size);
    177177
    178         usb_log_debug("Get LUN count...\n");
     178        usb_log_debug("Get LUN count...");
    179179        mdev->lun_count = usb_masstor_get_lun_count(mdev);
    180180        mdev->luns = calloc(mdev->lun_count, sizeof(ddf_fun_t*));
    181181        if (mdev->luns == NULL) {
    182182                rc = ENOMEM;
    183                 usb_log_error("Failed allocating luns table.\n");
     183                usb_log_error("Failed allocating luns table.");
    184184                goto error;
    185185        }
     
    226226
    227227        if (asprintf(&fun_name, "l%u", lun) < 0) {
    228                 usb_log_error("Out of memory.\n");
     228                usb_log_error("Out of memory.");
    229229                rc = ENOMEM;
    230230                goto error;
     
    233233        fun = usb_device_ddf_fun_create(mdev->usb_dev, fun_exposed, fun_name);
    234234        if (fun == NULL) {
    235                 usb_log_error("Failed to create DDF function %s.\n", fun_name);
     235                usb_log_error("Failed to create DDF function %s.", fun_name);
    236236                rc = ENOMEM;
    237237                goto error;
     
    241241        mfun = ddf_fun_data_alloc(fun, sizeof(usbmast_fun_t));
    242242        if (mfun == NULL) {
    243                 usb_log_error("Failed allocating softstate.\n");
     243                usb_log_error("Failed allocating softstate.");
    244244                rc = ENOMEM;
    245245                goto error;
     
    257257        ddf_fun_set_conn_handler(fun, usbmast_bd_connection);
    258258
    259         usb_log_debug("Inquire...\n");
     259        usb_log_debug("Inquire...");
    260260        usbmast_inquiry_data_t inquiry;
    261261        rc = usbmast_inquiry(mfun, &inquiry);
    262262        if (rc != EOK) {
    263                 usb_log_warning("Failed to inquire device `%s': %s.\n",
     263                usb_log_warning("Failed to inquire device `%s': %s.",
    264264                    usb_device_get_name(mdev->usb_dev), str_error(rc));
    265265                rc = EIO;
     
    281281        rc = usbmast_read_capacity(mfun, &nblocks, &block_size);
    282282        if (rc != EOK) {
    283                 usb_log_warning("Failed to read capacity, device `%s': %s.\n",
     283                usb_log_warning("Failed to read capacity, device `%s': %s.",
    284284                    usb_device_get_name(mdev->usb_dev), str_error(rc));
    285285                rc = EIO;
     
    295295        rc = ddf_fun_bind(fun);
    296296        if (rc != EOK) {
    297                 usb_log_error("Failed to bind DDF function %s: %s.\n",
     297                usb_log_error("Failed to bind DDF function %s: %s.",
    298298                    fun_name, str_error(rc));
    299299                goto error;
  • uspace/drv/block/usbmast/scsi_ms.c

    rc1a966e ra1732929  
    116116                rc = usb_massstor_unit_ready(mfun);
    117117                if (rc != EOK) {
    118                         usb_log_error("Inquiry transport failed, device %s: %s.\n",
     118                        usb_log_error("Inquiry transport failed, device %s: %s.",
    119119                           usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    120120                        return rc;
     
    123123                rc = usb_massstor_cmd(mfun, 0xDEADBEEF, cmd);
    124124                if (rc != EOK) {
    125                         usb_log_error("Inquiry transport failed, device %s: %s.\n",
     125                        usb_log_error("Inquiry transport failed, device %s: %s.",
    126126                           usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    127127                        return rc;
     
    131131                        return EOK;
    132132
    133                 usb_log_error("SCSI command failed, device %s.\n",
     133                usb_log_error("SCSI command failed, device %s.",
    134134                    usb_device_get_name(mfun->mdev->usb_dev));
    135135
    136136                rc = usbmast_request_sense(mfun, &sense_buf, sizeof(sense_buf));
    137137                if (rc != EOK) {
    138                         usb_log_error("Failed to read sense data.\n");
     138                        usb_log_error("Failed to read sense data.");
    139139                        return EIO;
    140140                }
     
    182182
    183183        if (rc != EOK) {
    184                 usb_log_error("Inquiry transport failed, device %s: %s.\n",
     184                usb_log_error("Inquiry transport failed, device %s: %s.",
    185185                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    186186                return rc;
     
    188188
    189189        if (cmd.status != CMDS_GOOD) {
    190                 usb_log_error("Inquiry command failed, device %s.\n",
     190                usb_log_error("Inquiry command failed, device %s.",
    191191                   usb_device_get_name(mfun->mdev->usb_dev));
    192192                return EIO;
     
    194194
    195195        if (cmd.rcvd_size < SCSI_STD_INQUIRY_DATA_MIN_SIZE) {
    196                 usb_log_error("SCSI Inquiry response too short (%zu).\n",
     196                usb_log_error("SCSI Inquiry response too short (%zu).",
    197197                    cmd.rcvd_size);
    198198                return EIO;
     
    250250
    251251        if (rc != EOK || cmd.status != CMDS_GOOD) {
    252                 usb_log_error("Request Sense failed, device %s: %s.\n",
     252                usb_log_error("Request Sense failed, device %s: %s.",
    253253                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    254254                return rc;
     
    292292
    293293        if (rc != EOK) {
    294                 usb_log_error("Read Capacity (10) transport failed, device %s: %s.\n",
     294                usb_log_error("Read Capacity (10) transport failed, device %s: %s.",
    295295                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    296296                return rc;
     
    298298
    299299        if (cmd.status != CMDS_GOOD) {
    300                 usb_log_error("Read Capacity (10) command failed, device %s.\n",
     300                usb_log_error("Read Capacity (10) command failed, device %s.",
    301301                   usb_device_get_name(mfun->mdev->usb_dev));
    302302                return EIO;
     
    304304
    305305        if (cmd.rcvd_size < sizeof(data)) {
    306                 usb_log_error("SCSI Read Capacity response too short (%zu).\n",
     306                usb_log_error("SCSI Read Capacity response too short (%zu).",
    307307                    cmd.rcvd_size);
    308308                return EIO;
     
    349349
    350350        if (rc != EOK) {
    351                 usb_log_error("Read (10) transport failed, device %s: %s.\n",
     351                usb_log_error("Read (10) transport failed, device %s: %s.",
    352352                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    353353                return rc;
     
    355355
    356356        if (cmd.status != CMDS_GOOD) {
    357                 usb_log_error("Read (10) command failed, device %s.\n",
     357                usb_log_error("Read (10) command failed, device %s.",
    358358                   usb_device_get_name(mfun->mdev->usb_dev));
    359359                return EIO;
     
    361361
    362362        if (cmd.rcvd_size < nblocks * mfun->block_size) {
    363                 usb_log_error("SCSI Read response too short (%zu).\n",
     363                usb_log_error("SCSI Read response too short (%zu).",
    364364                    cmd.rcvd_size);
    365365                return EIO;
     
    405405
    406406        if (rc != EOK) {
    407                 usb_log_error("Write (10) transport failed, device %s: %s.\n",
     407                usb_log_error("Write (10) transport failed, device %s: %s.",
    408408                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    409409                return rc;
     
    411411
    412412        if (cmd.status != CMDS_GOOD) {
    413                 usb_log_error("Write (10) command failed, device %s.\n",
     413                usb_log_error("Write (10) command failed, device %s.",
    414414                   usb_device_get_name(mfun->mdev->usb_dev));
    415415                return EIO;
     
    450450
    451451        if (rc != EOK) {
    452                 usb_log_error("Synchronize Cache (10) transport failed, device %s: %s.\n",
     452                usb_log_error("Synchronize Cache (10) transport failed, device %s: %s.",
    453453                   usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
    454454                return rc;
     
    456456
    457457        if (cmd.status != CMDS_GOOD) {
    458                 usb_log_error("Synchronize Cache (10) command failed, device %s.\n",
     458                usb_log_error("Synchronize Cache (10) command failed, device %s.",
    459459                   usb_device_get_name(mfun->mdev->usb_dev));
    460460                return EIO;
  • uspace/drv/bus/usb/ehci/ehci_batch.c

    rc1a966e ra1732929  
    143143        batch_setup[ehci_batch->base.ep->transfer_type](ehci_batch);
    144144
    145         usb_log_debug("Batch %p %s " USB_TRANSFER_BATCH_FMT " initialized.\n",
     145        usb_log_debug("Batch %p %s " USB_TRANSFER_BATCH_FMT " initialized.",
    146146            ehci_batch, usb_str_direction(ehci_batch->base.dir),
    147147            USB_TRANSFER_BATCH_ARGS(ehci_batch->base));
     
    163163        assert(ehci_batch);
    164164
    165         usb_log_debug("Batch %p: checking %zu td(s) for completion.\n",
     165        usb_log_debug("Batch %p: checking %zu td(s) for completion.",
    166166            ehci_batch, ehci_batch->td_count);
    167167
    168         usb_log_debug2("Batch %p: QH: %08x:%08x:%08x:%08x:%08x:%08x.\n",
     168        usb_log_debug2("Batch %p: QH: %08x:%08x:%08x:%08x:%08x:%08x.",
    169169            ehci_batch,
    170170            ehci_batch->qh->ep_char, ehci_batch->qh->ep_cap,
  • uspace/drv/bus/usb/ehci/ehci_rh.c

    rc1a966e ra1732929  
    107107            (EHCI_RD(caps->hcsparams) >> EHCI_CAPS_HCS_N_PORTS_SHIFT) &
    108108            EHCI_CAPS_HCS_N_PORTS_MASK;
    109         usb_log_debug2("RH(%p): hcsparams: %x.\n", instance,
     109        usb_log_debug2("RH(%p): hcsparams: %x.", instance,
    110110            EHCI_RD(caps->hcsparams));
    111         usb_log_info("RH(%p): Found %u ports.\n", instance,
     111        usb_log_info("RH(%p): Found %u ports.", instance,
    112112            instance->port_count);
    113113
  • uspace/drv/bus/usb/ehci/endpoint_list.c

    rc1a966e ra1732929  
    9797        assert(ep);
    9898        assert(ep->qh);
    99         usb_log_debug2("EPL(%p-%s): Append endpoint(%p).\n",
     99        usb_log_debug2("EPL(%p-%s): Append endpoint(%p).",
    100100            instance, instance->name, ep);
    101101
     
    128128        ehci_endpoint_t *first = ehci_endpoint_list_instance(
    129129            list_first(&instance->endpoint_list));
    130         usb_log_debug("EPL(%p-%s): EP(%p) added to list, first is %p(%p).\n",
     130        usb_log_debug("EPL(%p-%s): EP(%p) added to list, first is %p(%p).",
    131131            instance, instance->name, ep, first, first->qh);
    132132        if (last_qh == instance->list_head) {
    133                 usb_log_debug2("EPL(%p-%s): head EP(%p-%"PRIxn"): %x:%x.\n",
     133                usb_log_debug2("EPL(%p-%s): head EP(%p-%"PRIxn"): %x:%x.",
    134134                    instance, instance->name, last_qh,
    135135                    addr_to_phys(instance->list_head),
     
    153153        fibril_mutex_lock(&instance->guard);
    154154
    155         usb_log_debug2("EPL(%p-%s): removing EP(%p).\n",
     155        usb_log_debug2("EPL(%p-%s): removing EP(%p).",
    156156            instance, instance->name, ep);
    157157
     
    172172        write_barrier();
    173173
    174         usb_log_debug("EPL(%p-%s): EP(%p) removed (%s), horizontal %x.\n",
     174        usb_log_debug("EPL(%p-%s): EP(%p) removed (%s), horizontal %x.",
    175175            instance, instance->name,  ep, qpos, ep->qh->horizontal);
    176176
  • uspace/drv/bus/usb/ehci/hc.c

    rc1a966e ra1732929  
    134134        EHCI_WR(code->cmds[1].value, EHCI_USED_INTERRUPTS);
    135135
    136         usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.\n",
     136        usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.",
    137137            RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
    138138
     
    160160        if (ret != EOK) {
    161161                usb_log_error("HC(%p): Failed to gain access to device "
    162                     "registers: %s.\n", instance, str_error(ret));
     162                    "registers: %s.", instance, str_error(ret));
    163163                return ret;
    164164        }
     
    211211        assert(ep);
    212212        ehci_endpoint_t *ehci_ep = ehci_endpoint_get(ep);
    213         usb_log_debug("HC(%p) enqueue EP(%d:%d:%s:%s)\n", instance,
     213        usb_log_debug("HC(%p) enqueue EP(%d:%d:%s:%s)", instance,
    214214            ep->device->address, ep->endpoint,
    215215            usb_str_transfer_type_short(ep->transfer_type),
     
    235235        assert(ep);
    236236        ehci_endpoint_t *ehci_ep = ehci_endpoint_get(ep);
    237         usb_log_debug("HC(%p) dequeue EP(?:%d:%s:%s)\n", instance,
     237        usb_log_debug("HC(%p) dequeue EP(?:%d:%s:%s)", instance,
    238238            ep->endpoint,
    239239            usb_str_transfer_type_short(ep->transfer_type),
     
    423423        usb_log_debug("HC(%p): HW started.", instance);
    424424
    425         usb_log_debug2("HC(%p): Registers: \n"
    426             "\tUSBCMD(%p): %x(0x00080000 = at least 1ms between interrupts)\n"
    427             "\tUSBSTS(%p): %x(0x00001000 = HC halted)\n"
    428             "\tUSBINT(%p): %x(0x0 = no interrupts).\n"
    429             "\tCONFIG(%p): %x(0x0 = ports controlled by companion hc).\n",
     425        usb_log_debug2("HC(%p): Registers: "
     426            "\tUSBCMD(%p): %x(0x00080000 = at least 1ms between interrupts)"
     427            "\tUSBSTS(%p): %x(0x00001000 = HC halted)"
     428            "\tUSBINT(%p): %x(0x0 = no interrupts)."
     429            "\tCONFIG(%p): %x(0x0 = ports controlled by companion hc).",
    430430            instance,
    431431            &instance->registers->usbcmd, EHCI_RD(instance->registers->usbcmd),
  • uspace/drv/bus/usb/ehci/res.c

    rc1a966e ra1732929  
    7474            eecp + USBLEGSUP_OFFSET, &usblegsup);
    7575        if (ret != EOK) {
    76                 usb_log_error("Failed to read USBLEGSUP: %s.\n", str_error(ret));
    77                 return ret;
    78         }
    79         usb_log_debug2("USBLEGSUP: %" PRIx32 ".\n", usblegsup);
     76                usb_log_error("Failed to read USBLEGSUP: %s.", str_error(ret));
     77                return ret;
     78        }
     79        usb_log_debug2("USBLEGSUP: %" PRIx32 ".", usblegsup);
    8080
    8181        /* Request control from firmware/BIOS by writing 1 to highest
    8282         * byte. (OS Control semaphore)*/
    83         usb_log_debug("Requesting OS control.\n");
     83        usb_log_debug("Requesting OS control.");
    8484        ret = pci_config_space_write_8(parent_sess,
    8585            eecp + USBLEGSUP_OFFSET + 3, 1);
    8686        if (ret != EOK) {
    87                 usb_log_error("Failed to request OS EHCI control: %s.\n",
     87                usb_log_error("Failed to request OS EHCI control: %s.",
    8888                    str_error(ret));
    8989                return ret;
     
    103103
    104104        if ((usblegsup & USBLEGSUP_BIOS_CONTROL) == 0) {
    105                 usb_log_info("BIOS released control after %zu usec.\n", wait);
     105                usb_log_info("BIOS released control after %zu usec.", wait);
    106106                return EOK;
    107107        }
     
    109109        /* BIOS failed to hand over control, this should not happen. */
    110110        usb_log_warning( "BIOS failed to release control after "
    111             "%zu usecs, force it.\n", wait);
     111            "%zu usecs, force it.", wait);
    112112        ret = pci_config_space_write_32(parent_sess,
    113113            eecp + USBLEGSUP_OFFSET, USBLEGSUP_OS_CONTROL);
    114114        if (ret != EOK) {
    115                 usb_log_error("Failed to force OS control: %s.\n",
     115                usb_log_error("Failed to force OS control: %s.",
    116116                    str_error(ret));
    117117                return ret;
     
    130130                    eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts);
    131131                if (ret != EOK) {
    132                         usb_log_error("Failed to get USBLEGCTLSTS: %s.\n",
     132                        usb_log_error("Failed to get USBLEGCTLSTS: %s.",
    133133                            str_error(ret));
    134134                        return ret;
    135135                }
    136                 usb_log_debug2("USBLEGCTLSTS: %" PRIx32 ".\n", usblegctlsts);
     136                usb_log_debug2("USBLEGCTLSTS: %" PRIx32 ".", usblegctlsts);
    137137                /*
    138138                 * Zero SMI enables in legacy control register.
     
    143143                    eecp + USBLEGCTLSTS_OFFSET, 0xe0000000);
    144144                if (ret != EOK) {
    145                         usb_log_error("Failed to zero USBLEGCTLSTS: %s\n",
     145                        usb_log_error("Failed to zero USBLEGCTLSTS: %s",
    146146                            str_error(ret));
    147147                        return ret;
     
    153153                    eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts);
    154154                if (ret != EOK) {
    155                         usb_log_error("Failed to get USBLEGCTLSTS 2: %s.\n",
     155                        usb_log_error("Failed to get USBLEGCTLSTS 2: %s.",
    156156                            str_error(ret));
    157157                        return ret;
    158158                }
    159                 usb_log_debug2("Zeroed USBLEGCTLSTS: %" PRIx32 ".\n",
     159                usb_log_debug2("Zeroed USBLEGCTLSTS: %" PRIx32 ".",
    160160                    usblegctlsts);
    161161        }
     
    165165            eecp + USBLEGSUP_OFFSET, &usblegsup);
    166166        if (ret != EOK) {
    167                 usb_log_error("Failed to read USBLEGSUP: %s.\n",
    168                     str_error(ret));
    169                 return ret;
    170         }
    171         usb_log_debug2("USBLEGSUP: %" PRIx32 ".\n", usblegsup);
     167                usb_log_error("Failed to read USBLEGSUP: %s.",
     168                    str_error(ret));
     169                return ret;
     170        }
     171        usb_log_debug2("USBLEGSUP: %" PRIx32 ".", usblegsup);
    172172        return ret;
    173173}
     
    181181                return ENOMEM;
    182182
    183         usb_log_debug("Disabling EHCI legacy support.\n");
     183        usb_log_debug("Disabling EHCI legacy support.");
    184184
    185185
    186186        const uint32_t hcc_params = EHCI_RD(hc->caps->hccparams);
    187         usb_log_debug2("Value of hcc params register: %x.\n", hcc_params);
     187        usb_log_debug2("Value of hcc params register: %x.", hcc_params);
    188188
    189189        /* Read value of EHCI Extended Capabilities Pointer
     
    191191        const uint32_t eecp =
    192192            (hcc_params >> EHCI_CAPS_HCC_EECP_SHIFT) & EHCI_CAPS_HCC_EECP_MASK;
    193         usb_log_debug2("Value of EECP: %x.\n", eecp);
     193        usb_log_debug2("Value of EECP: %x.", eecp);
    194194
    195195        int ret = disable_extended_caps(parent_sess, eecp);
    196196        if (ret != EOK) {
    197                 usb_log_error("Failed to disable extended capabilities: %s.\n",
     197                usb_log_error("Failed to disable extended capabilities: %s.",
    198198                    str_error(ret));
    199199                    goto clean;
  • uspace/drv/bus/usb/ohci/endpoint_list.c

    rc1a966e ra1732929  
    5757        instance->list_head = malloc32(sizeof(ed_t));
    5858        if (!instance->list_head) {
    59                 usb_log_error("Failed to allocate list head.\n");
     59                usb_log_error("Failed to allocate list head.");
    6060                return ENOMEM;
    6161        }
    6262        instance->list_head_pa = addr_to_phys(instance->list_head);
    63         usb_log_debug2("Transfer list %s setup with ED: %p(0x%0" PRIx32 ")).\n",
     63        usb_log_debug2("Transfer list %s setup with ED: %p(0x%0" PRIx32 ")).",
    6464            name, instance->list_head, instance->list_head_pa);
    6565
     
    9696        assert(instance);
    9797        assert(ep);
    98         usb_log_debug2("Queue %s: Adding endpoint(%p).\n", instance->name, ep);
     98        usb_log_debug2("Queue %s: Adding endpoint(%p).", instance->name, ep);
    9999
    100100        fibril_mutex_lock(&instance->guard);
     
    126126        ohci_endpoint_t *first = list_get_instance(
    127127            list_first(&instance->endpoint_list), ohci_endpoint_t, link);
    128         usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).\n",
     128        usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).",
    129129                ep, instance->name, first, first->ed);
    130130        if (last_ed == instance->list_head) {
    131                 usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.\n",
     131                usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.",
    132132                    instance->name, last_ed, instance->list_head_pa,
    133133                    last_ed->status, last_ed->td_tail, last_ed->td_head,
     
    151151        fibril_mutex_lock(&instance->guard);
    152152
    153         usb_log_debug2("Queue %s: removing endpoint(%p).\n", instance->name, ep);
     153        usb_log_debug2("Queue %s: removing endpoint(%p).", instance->name, ep);
    154154
    155155        const char *qpos = NULL;
     
    171171        write_barrier();
    172172
    173         usb_log_debug("HCD EP(%p) removed (%s) from %s, next %x.\n",
     173        usb_log_debug("HCD EP(%p) removed (%s) from %s, next %x.",
    174174            ep, qpos, instance->name, ep->ed->next);
    175175
  • uspace/drv/bus/usb/ohci/hc.c

    rc1a966e ra1732929  
    136136        OHCI_WR(code->cmds[1].value, OHCI_USED_INTERRUPTS);
    137137
    138         usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.\n",
     138        usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.",
    139139            RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
    140140
     
    160160            (void **) &instance->registers);
    161161        if (ret != EOK) {
    162                 usb_log_error("Failed to gain access to registers: %s.\n",
     162                usb_log_error("Failed to gain access to registers: %s.",
    163163                    str_error(ret));
    164164                return ret;
    165165        }
    166         usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible.\n",
     166        usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible.",
    167167            hw_res->mem_ranges.ranges[0].address.absolute,
    168168            hw_res->mem_ranges.ranges[0].size);
     
    173173        ret = hc_init_memory(instance);
    174174        if (ret != EOK) {
    175                 usb_log_error("Failed to create OHCI memory structures: %s.\n",
     175                usb_log_error("Failed to create OHCI memory structures: %s.",
    176176                    str_error(ret));
    177177                // TODO: We should disable pio access here
     
    293293        /* Check for root hub communication */
    294294        if (batch->target.address == ohci_rh_get_address(&hc->rh)) {
    295                 usb_log_debug("OHCI root hub request.\n");
     295                usb_log_debug("OHCI root hub request.");
    296296                return ohci_rh_schedule(&hc->rh, batch);
    297297        }
     
    341341        if ((status & ~I_SF) == 0) /* ignore sof status */
    342342                return;
    343         usb_log_debug2("OHCI(%p) interrupt: %x.\n", hc, status);
     343        usb_log_debug2("OHCI(%p) interrupt: %x.", hc, status);
    344344        if (status & I_RHSC)
    345345                ohci_rh_interrupt(&hc->rh);
     
    347347        if (status & I_WDH) {
    348348                fibril_mutex_lock(&hc->guard);
    349                 usb_log_debug2("HCCA: %p-%#" PRIx32 " (%p).\n", hc->hcca,
     349                usb_log_debug2("HCCA: %p-%#" PRIx32 " (%p).", hc->hcca,
    350350                    OHCI_RD(hc->registers->hcca),
    351351                    (void *) addr_to_phys(hc->hcca));
    352                 usb_log_debug2("Periodic current: %#" PRIx32 ".\n",
     352                usb_log_debug2("Periodic current: %#" PRIx32 ".",
    353353                    OHCI_RD(hc->registers->periodic_current));
    354354
     
    370370
    371371        if (status & I_UE) {
    372                 usb_log_fatal("Error like no other!\n");
     372                usb_log_fatal("Error like no other!");
    373373                hc_start(&hc->base);
    374374        }
     
    387387        hc_t *instance = hcd_to_hc(hcd);
    388388
    389         usb_log_debug("Requesting OHCI control.\n");
     389        usb_log_debug("Requesting OHCI control.");
    390390        if (OHCI_RD(instance->registers->revision) & R_LEGACY_FLAG) {
    391391                /* Turn off legacy emulation, it should be enough to zero
     
    396396                volatile uint32_t *ohci_emulation_reg =
    397397                (uint32_t*)((char*)instance->registers + LEGACY_REGS_OFFSET);
    398                 usb_log_debug("OHCI legacy register %p: %x.\n",
     398                usb_log_debug("OHCI legacy register %p: %x.",
    399399                    ohci_emulation_reg, OHCI_RD(*ohci_emulation_reg));
    400400                /* Zero everything but A20State */
     
    402402                OHCI_CLR(*ohci_emulation_reg, ~0x100);
    403403                usb_log_debug(
    404                     "OHCI legacy register (should be 0 or 0x100) %p: %x.\n",
     404                    "OHCI legacy register (should be 0 or 0x100) %p: %x.",
    405405                    ohci_emulation_reg, OHCI_RD(*ohci_emulation_reg));
    406406        }
     
    408408        /* Interrupt routing enabled => smm driver is active */
    409409        if (OHCI_RD(instance->registers->control) & C_IR) {
    410                 usb_log_debug("SMM driver: request ownership change.\n");
     410                usb_log_debug("SMM driver: request ownership change.");
    411411                // TODO: should we ack interrupts before doing this?
    412412                OHCI_SET(instance->registers->command_status, CS_OCR);
     
    415415                        async_usleep(1000);
    416416                }
    417                 usb_log_info("SMM driver: Ownership taken.\n");
     417                usb_log_info("SMM driver: Ownership taken.");
    418418                C_HCFS_SET(instance->registers->control, C_HCFS_RESET);
    419419                async_usleep(50000);
     
    424424        /* Interrupt routing disabled && status != USB_RESET => BIOS active */
    425425        if (hc_status != C_HCFS_RESET) {
    426                 usb_log_debug("BIOS driver found.\n");
     426                usb_log_debug("BIOS driver found.");
    427427                if (hc_status == C_HCFS_OPERATIONAL) {
    428                         usb_log_info("BIOS driver: HC operational.\n");
     428                        usb_log_info("BIOS driver: HC operational.");
    429429                        return EOK;
    430430                }
     
    432432                C_HCFS_SET(instance->registers->control, C_HCFS_RESUME);
    433433                async_usleep(20000);
    434                 usb_log_info("BIOS driver: HC resumed.\n");
     434                usb_log_info("BIOS driver: HC resumed.");
    435435                return EOK;
    436436        }
     
    438438        /* HC is in reset (hw startup) => no other driver
    439439         * maintain reset for at least the time specified in USB spec (50 ms)*/
    440         usb_log_debug("Host controller found in reset state.\n");
     440        usb_log_debug("Host controller found in reset state.");
    441441        async_usleep(50000);
    442442        return EOK;
     
    454454        /* OHCI guide page 42 */
    455455        assert(instance);
    456         usb_log_debug2("Started hc initialization routine.\n");
     456        usb_log_debug2("Started hc initialization routine.");
    457457
    458458        /* Save contents of fm_interval register */
    459459        const uint32_t fm_interval = OHCI_RD(instance->registers->fm_interval);
    460         usb_log_debug2("Old value of HcFmInterval: %x.\n", fm_interval);
     460        usb_log_debug2("Old value of HcFmInterval: %x.", fm_interval);
    461461
    462462        /* Reset hc */
    463         usb_log_debug2("HC reset.\n");
     463        usb_log_debug2("HC reset.");
    464464        size_t time = 0;
    465465        OHCI_WR(instance->registers->command_status, CS_HCR);
     
    468468                time += 10;
    469469        }
    470         usb_log_debug2("HC reset complete in %zu us.\n", time);
     470        usb_log_debug2("HC reset complete in %zu us.", time);
    471471
    472472        /* Restore fm_interval */
     
    475475
    476476        /* hc is now in suspend state */
    477         usb_log_debug2("HC should be in suspend state(%x).\n",
     477        usb_log_debug2("HC should be in suspend state(%x).",
    478478            OHCI_RD(instance->registers->control));
    479479
     
    484484        OHCI_WR(instance->registers->bulk_head,
    485485            instance->lists[USB_TRANSFER_BULK].list_head_pa);
    486         usb_log_debug2("Bulk HEAD set to: %p (%#" PRIx32 ").\n",
     486        usb_log_debug2("Bulk HEAD set to: %p (%#" PRIx32 ").",
    487487            instance->lists[USB_TRANSFER_BULK].list_head,
    488488            instance->lists[USB_TRANSFER_BULK].list_head_pa);
     
    490490        OHCI_WR(instance->registers->control_head,
    491491            instance->lists[USB_TRANSFER_CONTROL].list_head_pa);
    492         usb_log_debug2("Control HEAD set to: %p (%#" PRIx32 ").\n",
     492        usb_log_debug2("Control HEAD set to: %p (%#" PRIx32 ").",
    493493            instance->lists[USB_TRANSFER_CONTROL].list_head,
    494494            instance->lists[USB_TRANSFER_CONTROL].list_head_pa);
     
    496496        /* Enable queues */
    497497        OHCI_SET(instance->registers->control, (C_PLE | C_IE | C_CLE | C_BLE));
    498         usb_log_debug("Queues enabled(%x).\n",
     498        usb_log_debug("Queues enabled(%x).",
    499499            OHCI_RD(instance->registers->control));
    500500
     
    503503                OHCI_WR(instance->registers->interrupt_enable,
    504504                    OHCI_USED_INTERRUPTS);
    505                 usb_log_debug("Enabled interrupts: %x.\n",
     505                usb_log_debug("Enabled interrupts: %x.",
    506506                    OHCI_RD(instance->registers->interrupt_enable));
    507507                OHCI_WR(instance->registers->interrupt_enable, I_MI);
     
    513513        OHCI_WR(instance->registers->periodic_start,
    514514            ((frame_length / 10) * 9) & PS_MASK << PS_SHIFT);
    515         usb_log_debug2("All periodic start set to: %x(%u - 90%% of %d).\n",
     515        usb_log_debug2("All periodic start set to: %x(%u - 90%% of %d).",
    516516            OHCI_RD(instance->registers->periodic_start),
    517517            OHCI_RD(instance->registers->periodic_start), frame_length);
    518518        C_HCFS_SET(instance->registers->control, C_HCFS_OPERATIONAL);
    519         usb_log_debug("OHCI HC up and running (ctl_reg=0x%x).\n",
     519        usb_log_debug("OHCI HC up and running (ctl_reg=0x%x).",
    520520            OHCI_RD(instance->registers->control));
    521521
     
    536536        const int ret = endpoint_list_init(&instance->lists[type], name); \
    537537        if (ret != EOK) { \
    538                 usb_log_error("Failed to setup %s endpoint list: %s.\n", \
     538                usb_log_error("Failed to setup %s endpoint list: %s.", \
    539539                    name, str_error(ret)); \
    540540                endpoint_list_fini(&instance->lists[USB_TRANSFER_ISOCHRONOUS]);\
     
    577577        if (instance->hcca == NULL)
    578578                return ENOMEM;
    579         usb_log_debug2("OHCI HCCA initialized at %p.\n", instance->hcca);
     579        usb_log_debug2("OHCI HCCA initialized at %p.", instance->hcca);
    580580
    581581        for (unsigned i = 0; i < HCCA_INT_EP_COUNT; ++i) {
     
    583583                    instance->lists[USB_TRANSFER_INTERRUPT].list_head_pa);
    584584        }
    585         usb_log_debug2("Interrupt HEADs set to: %p (%#" PRIx32 ").\n",
     585        usb_log_debug2("Interrupt HEADs set to: %p (%#" PRIx32 ").",
    586586            instance->lists[USB_TRANSFER_INTERRUPT].list_head,
    587587            instance->lists[USB_TRANSFER_INTERRUPT].list_head_pa);
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    rc1a966e ra1732929  
    175175        assert(ohci_batch);
    176176
    177         usb_log_debug("Batch %p checking %zu td(s) for completion.\n",
     177        usb_log_debug("Batch %p checking %zu td(s) for completion.",
    178178            &ohci_batch->base, ohci_batch->td_count);
    179         usb_log_debug2("ED: %08x:%08x:%08x:%08x.\n",
     179        usb_log_debug2("ED: %08x:%08x:%08x:%08x.",
    180180            ohci_batch->ed->status, ohci_batch->ed->td_head,
    181181            ohci_batch->ed->td_tail, ohci_batch->ed->next);
     
    196196        for (size_t i = 0; i < ohci_batch->td_count; ++i) {
    197197                assert(ohci_batch->tds[i] != NULL);
    198                 usb_log_debug("TD %zu: %08x:%08x:%08x:%08x.\n", i,
     198                usb_log_debug("TD %zu: %08x:%08x:%08x:%08x.", i,
    199199                    ohci_batch->tds[i]->status, ohci_batch->tds[i]->cbp,
    200200                    ohci_batch->tds[i]->next, ohci_batch->tds[i]->be);
     
    217217                            -= td_remain_size(ohci_batch->tds[i]);
    218218                } else {
    219                         usb_log_debug("Batch %p found error TD(%zu):%08x.\n",
     219                        usb_log_debug("Batch %p found error TD(%zu):%08x.",
    220220                            &ohci_batch->base, i,
    221221                            ohci_batch->tds[i]->status);
     
    295295        assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT);
    296296
    297         usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.\n", ohci_batch->ed,
     297        usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.", ohci_batch->ed,
    298298            ohci_batch->ed->status, ohci_batch->ed->td_tail,
    299299            ohci_batch->ed->td_head, ohci_batch->ed->next);
     
    312312            ohci_batch->tds[0], ohci_batch->tds[1], USB_DIRECTION_BOTH,
    313313            buffer, USB_SETUP_PACKET_SIZE, toggle);
    314         usb_log_debug("Created CONTROL SETUP TD: %08x:%08x:%08x:%08x.\n",
     314        usb_log_debug("Created CONTROL SETUP TD: %08x:%08x:%08x:%08x.",
    315315            ohci_batch->tds[0]->status, ohci_batch->tds[0]->cbp,
    316316            ohci_batch->tds[0]->next, ohci_batch->tds[0]->be);
     
    328328                    ohci_batch->tds[td_current + 1],
    329329                    data_dir, buffer, transfer_size, toggle);
    330                 usb_log_debug("Created CONTROL DATA TD: %08x:%08x:%08x:%08x.\n",
     330                usb_log_debug("Created CONTROL DATA TD: %08x:%08x:%08x:%08x.",
    331331                    ohci_batch->tds[td_current]->status,
    332332                    ohci_batch->tds[td_current]->cbp,
     
    344344        td_init(ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1],
    345345            status_dir, NULL, 0, 1);
    346         usb_log_debug("Created CONTROL STATUS TD: %08x:%08x:%08x:%08x.\n",
     346        usb_log_debug("Created CONTROL STATUS TD: %08x:%08x:%08x:%08x.",
    347347            ohci_batch->tds[td_current]->status,
    348348            ohci_batch->tds[td_current]->cbp,
     
    350350            ohci_batch->tds[td_current]->be);
    351351        usb_log_debug2(
    352             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     352            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
    353353            &ohci_batch->base,
    354354            usb_str_transfer_type(ohci_batch->base.ep->transfer_type),
     
    371371        usb_direction_t dir = ohci_batch->base.dir;
    372372        assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT);
    373         usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.\n", ohci_batch->ed,
     373        usb_log_debug("Using ED(%p): %08x:%08x:%08x:%08x.", ohci_batch->ed,
    374374            ohci_batch->ed->status, ohci_batch->ed->td_tail,
    375375            ohci_batch->ed->td_head, ohci_batch->ed->next);
     
    386386                    dir, buffer, transfer_size, -1);
    387387
    388                 usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x.\n",
     388                usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x.",
    389389                    ohci_batch->tds[td_current]->status,
    390390                    ohci_batch->tds[td_current]->cbp,
     
    398398        }
    399399        usb_log_debug2(
    400             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     400            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
    401401            &ohci_batch->base,
    402402            usb_str_transfer_type(ohci_batch->base.ep->transfer_type),
  • uspace/drv/bus/usb/ohci/ohci_rh.c

    rc1a966e ra1732929  
    114114        instance->registers = regs;
    115115        instance->port_count = OHCI_RD(regs->rh_desc_a) & RHDA_NDS_MASK;
    116         usb_log_debug2("rh_desc_a: %x.\n", OHCI_RD(regs->rh_desc_a));
     116        usb_log_debug2("rh_desc_a: %x.", OHCI_RD(regs->rh_desc_a));
    117117        if (instance->port_count > OHCI_MAX_PORTS) {
    118118                usb_log_warning("OHCI specification does not allow %d ports. "
    119                     "Max %d ports will be used.\n", instance->port_count,
     119                    "Max %d ports will be used.", instance->port_count,
    120120                    OHCI_MAX_PORTS);
    121121                instance->port_count = OHCI_MAX_PORTS;
    122122        }
    123         usb_log_info("%s: Found %u ports.\n", name, instance->port_count);
     123        usb_log_info("%s: Found %u ports.", name, instance->port_count);
    124124
    125125#if defined OHCI_POWER_SWITCH_no
    126         usb_log_info("%s: Set power mode to no power switching.\n", name);
     126        usb_log_info("%s: Set power mode to no power switching.", name);
    127127        /* Set port power mode to no power-switching. (always on) */
    128128        OHCI_SET(regs->rh_desc_a, RHDA_NPS_FLAG);
     
    132132
    133133#elif defined OHCI_POWER_SWITCH_ganged
    134         usb_log_info("%s: Set power mode to ganged power switching.\n", name);
     134        usb_log_info("%s: Set power mode to ganged power switching.", name);
    135135        /* Set port power mode to ganged power-switching. */
    136136        OHCI_CLR(regs->rh_desc_a, RHDA_NPS_FLAG);
     
    144144        OHCI_CLR(regs->rh_desc_a, RHDA_OCPM_FLAG);
    145145#else
    146         usb_log_info("%s: Set power mode to per-port power switching.\n", name);
     146        usb_log_info("%s: Set power mode to per-port power switching.", name);
    147147        /* Set port power mode to per port power-switching. */
    148148        OHCI_CLR(regs->rh_desc_a, RHDA_NPS_FLAG);
     
    356356        case USB_HUB_FEATURE_C_PORT_RESET:        /*20*/
    357357                usb_log_debug2("Clearing port C_CONNECTION, C_ENABLE, "
    358                     "C_SUSPEND, C_OC or C_RESET on port %u.\n", port);
     358                    "C_SUSPEND, C_OC or C_RESET on port %u.", port);
    359359                /* Bit offsets correspond to the feature number */
    360360                OHCI_WR(hub->registers->rh_port_status[port],
     
    405405        case USB_HUB_FEATURE_PORT_RESET:   /*4*/
    406406                usb_log_debug2("Setting port POWER, ENABLE, SUSPEND or RESET "
    407                     "on port %u.\n", port);
     407                    "on port %u.", port);
    408408                /* Bit offsets correspond to the feature number */
    409409                OHCI_WR(hub->registers->rh_port_status[port], 1 << feature);
     
    451451        }
    452452
    453         usb_log_debug2("OHCI root hub interrupt mask: %hx.\n", mask);
     453        usb_log_debug2("OHCI root hub interrupt mask: %hx.", mask);
    454454
    455455        if (mask == 0)
  • uspace/drv/bus/usb/uhci/hc.c

    rc1a966e ra1732929  
    141141        code->cmds[3].addr = (void*)&registers->usbsts;
    142142
    143         usb_log_debug("I/O regs at %p (size %zu), IRQ %d.\n",
     143        usb_log_debug("I/O regs at %p (size %zu), IRQ %d.",
    144144            RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]);
    145145
     
    182182        /* Resume interrupts are not supported */
    183183        if (status & UHCI_STATUS_RESUME) {
    184                 usb_log_error("Resume interrupt!\n");
     184                usb_log_error("Resume interrupt!");
    185185        }
    186186
    187187        /* Bits 4 and 5 indicate hc error */
    188188        if (status & (UHCI_STATUS_PROCESS_ERROR | UHCI_STATUS_SYSTEM_ERROR)) {
    189                 usb_log_error("UHCI hardware failure!.\n");
     189                usb_log_error("UHCI hardware failure!.");
    190190                ++instance->hw_failures;
    191191                transfer_list_abort_all(&instance->transfers_interrupt);
     
    198198                        hc_init_hw(instance);
    199199                } else {
    200                         usb_log_fatal("Too many UHCI hardware failures!.\n");
     200                        usb_log_fatal("Too many UHCI hardware failures!.");
    201201                        hc_gone(&instance->base);
    202202                }
     
    229229            (void **) &instance->registers);
    230230        if (ret != EOK) {
    231                 usb_log_error("Failed to gain access to registers: %s.\n",
     231                usb_log_error("Failed to gain access to registers: %s.",
    232232                    str_error(ret));
    233233                return ret;
    234234        }
    235235
    236         usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible.\n",
     236        usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible.",
    237237            hw_res->io_ranges.ranges[0].address.absolute,
    238238            hw_res->io_ranges.ranges[0].size);
     
    240240        ret = hc_init_mem_structures(instance, hcd);
    241241        if (ret != EOK) {
    242                 usb_log_error("Failed to init UHCI memory structures: %s.\n",
     242                usb_log_error("Failed to init UHCI memory structures: %s.",
    243243                    str_error(ret));
    244244                // TODO: we should disable pio here
     
    304304        const uint16_t cmd = pio_read_16(&registers->usbcmd);
    305305        if (cmd != 0)
    306                 usb_log_warning("Previous command value: %x.\n", cmd);
     306                usb_log_warning("Previous command value: %x.", cmd);
    307307
    308308        /* Start the hc with large(64B) packet FSBR */
     
    399399                return ENOMEM;
    400400        }
    401         usb_log_debug("Initialized frame list at %p.\n", instance->frame_list);
     401        usb_log_debug("Initialized frame list at %p.", instance->frame_list);
    402402
    403403        /* Init transfer lists */
    404404        int ret = hc_init_transfer_lists(instance);
    405405        if (ret != EOK) {
    406                 usb_log_error("Failed to initialize transfer lists.\n");
     406                usb_log_error("Failed to initialize transfer lists.");
    407407                return_page(instance->frame_list);
    408408                return ENOMEM;
    409409        }
    410         usb_log_debug("Initialized transfer lists.\n");
     410        usb_log_debug("Initialized transfer lists.");
    411411
    412412
     
    438438        int ret = transfer_list_init(&instance->transfers_##type, name); \
    439439        if (ret != EOK) { \
    440                 usb_log_error("Failed to setup %s transfer list: %s.\n", \
     440                usb_log_error("Failed to setup %s transfer list: %s.", \
    441441                    name, str_error(ret)); \
    442442                transfer_list_fini(&instance->transfers_bulk_full); \
     
    552552
    553553                if (((cmd & UHCI_CMD_RUN_STOP) != 1) || (sts != 0)) {
    554                         usb_log_debug2("Command: %X Status: %X Intr: %x\n",
     554                        usb_log_debug2("Command: %X Status: %X Intr: %x",
    555555                            cmd, sts, intr);
    556556                }
     
    559559                    pio_read_32(&instance->registers->flbaseadd) & ~0xfff;
    560560                if (frame_list != addr_to_phys(instance->frame_list)) {
    561                         usb_log_debug("Framelist address: %p vs. %p.\n",
     561                        usb_log_debug("Framelist address: %p vs. %p.",
    562562                            (void *) frame_list,
    563563                            (void *) addr_to_phys(instance->frame_list));
     
    570570                uintptr_t real_pa = addr_to_phys(QH(interrupt));
    571571                if (expected_pa != real_pa) {
    572                         usb_log_debug("Interrupt QH: %p (frame %d) vs. %p.\n",
     572                        usb_log_debug("Interrupt QH: %p (frame %d) vs. %p.",
    573573                            (void *) expected_pa, frnum, (void *) real_pa);
    574574                }
     
    577577                real_pa = addr_to_phys(QH(control_slow));
    578578                if (expected_pa != real_pa) {
    579                         usb_log_debug("Control Slow QH: %p vs. %p.\n",
     579                        usb_log_debug("Control Slow QH: %p vs. %p.",
    580580                            (void *) expected_pa, (void *) real_pa);
    581581                }
     
    584584                real_pa = addr_to_phys(QH(control_full));
    585585                if (expected_pa != real_pa) {
    586                         usb_log_debug("Control Full QH: %p vs. %p.\n",
     586                        usb_log_debug("Control Full QH: %p vs. %p.",
    587587                            (void *) expected_pa, (void *) real_pa);
    588588                }
     
    591591                real_pa = addr_to_phys(QH(bulk_full));
    592592                if (expected_pa != real_pa ) {
    593                         usb_log_debug("Bulk QH: %p vs. %p.\n",
     593                        usb_log_debug("Bulk QH: %p vs. %p.",
    594594                            (void *) expected_pa, (void *) real_pa);
    595595                }
  • uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.c

    rc1a966e ra1732929  
    104104        instance->buffer_ptr = addr_to_phys(buffer);
    105105
    106         usb_log_debug2("Created TD(%p): %X:%X:%X:%X(%p).\n",
     106        usb_log_debug2("Created TD(%p): %X:%X:%X:%X(%p).",
    107107            instance, instance->next, instance->status, instance->device,
    108108            instance->buffer_ptr, buffer);
    109109        td_print_status(instance);
    110110        if (pid == USB_PID_SETUP) {
    111                 usb_log_debug2("SETUP BUFFER: %s\n",
     111                usb_log_debug2("SETUP BUFFER: %s",
    112112                    usb_debug_str_buffer(buffer, 8, 8));
    113113        }
     
    160160        assert(instance);
    161161        const uint32_t s = instance->status;
    162         usb_log_debug2("TD(%p) status(%#" PRIx32 "):%s %d,%s%s%s%s%s%s%s%s%s%s%s %zu.\n",
     162        usb_log_debug2("TD(%p) status(%#" PRIx32 "):%s %d,%s%s%s%s%s%s%s%s%s%s%s %zu.",
    163163            instance, instance->status,
    164164            (s & TD_STATUS_SPD_FLAG) ? " SPD," : "",
  • uspace/drv/bus/usb/uhci/transfer_list.c

    rc1a966e ra1732929  
    5959        instance->queue_head = malloc32(sizeof(qh_t));
    6060        if (!instance->queue_head) {
    61                 usb_log_error("Failed to allocate queue head.\n");
     61                usb_log_error("Failed to allocate queue head.");
    6262                return ENOMEM;
    6363        }
    6464        const uint32_t queue_head_pa = addr_to_phys(instance->queue_head);
    65         usb_log_debug2("Transfer list %s setup with QH: %p (%#" PRIx32" ).\n",
     65        usb_log_debug2("Transfer list %s setup with QH: %p (%#" PRIx32" ).",
    6666            name, instance->queue_head, queue_head_pa);
    6767
     
    120120        fibril_mutex_unlock(&ep->guard);
    121121
    122         usb_log_debug2("Batch %p adding to queue %s.\n",
     122        usb_log_debug2("Batch %p adding to queue %s.",
    123123            uhci_batch, instance->name);
    124124
     
    150150
    151151        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT
    152             " scheduled in queue %s.\n", uhci_batch,
     152            " scheduled in queue %s.", uhci_batch,
    153153            USB_TRANSFER_BATCH_ARGS(uhci_batch->base), instance->name);
    154154        fibril_mutex_unlock(&instance->guard);
     
    213213        assert(fibril_mutex_is_locked(&instance->guard));
    214214
    215         usb_log_debug2("Batch %p removing from queue %s.\n",
     215        usb_log_debug2("Batch %p removing from queue %s.",
    216216            uhci_batch, instance->name);
    217217
     
    236236        list_remove(&uhci_batch->link);
    237237        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " removed (%s) "
    238             "from %s, next: %x.\n", uhci_batch,
     238            "from %s, next: %x.", uhci_batch,
    239239            USB_TRANSFER_BATCH_ARGS(uhci_batch->base),
    240240            qpos, instance->name, uhci_batch->qh->next);
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    rc1a966e ra1732929  
    7575            calloc(1, sizeof(uhci_transfer_batch_t));
    7676        if (!uhci_batch) {
    77                 usb_log_error("Failed to allocate UHCI batch.\n");
     77                usb_log_error("Failed to allocate UHCI batch.");
    7878                return NULL;
    7979        }
     
    112112        uhci_batch->device_buffer = malloc32(total_size);
    113113        if (!uhci_batch->device_buffer) {
    114                 usb_log_error("Failed to allocate UHCI buffer.\n");
     114                usb_log_error("Failed to allocate UHCI buffer.");
    115115                return ENOMEM;
    116116        }
     
    135135        }
    136136        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT
    137             " memory structures ready.\n", usb_batch,
     137            " memory structures ready.", usb_batch,
    138138            USB_TRANSFER_BATCH_ARGS(*usb_batch));
    139139
     
    159159
    160160        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT
    161             " checking %zu transfer(s) for completion.\n",
     161            " checking %zu transfer(s) for completion.",
    162162            uhci_batch, USB_TRANSFER_BATCH_ARGS(*batch),
    163163            uhci_batch->td_count);
     
    174174
    175175                        usb_log_debug("Batch %p found error TD(%zu->%p):%"
    176                             PRIx32 ".\n", uhci_batch, i,
     176                            PRIx32 ".", uhci_batch, i,
    177177                            &uhci_batch->tds[i], uhci_batch->tds[i].status);
    178178                        td_print_status(&uhci_batch->tds[i]);
     
    260260        uhci_batch->base.ep->toggle = toggle;
    261261        usb_log_debug2(
    262             "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.\n", \
     262            "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \
    263263            uhci_batch,
    264264            usb_str_transfer_type(uhci_batch->base.ep->transfer_type),
     
    333333        td_set_ioc(&uhci_batch->tds[td]);
    334334
    335         usb_log_debug2("Control last TD status: %x.\n",
     335        usb_log_debug2("Control last TD status: %x.",
    336336            uhci_batch->tds[td].status);
    337337}
  • uspace/drv/bus/usb/uhci/uhci_rh.c

    rc1a966e ra1732929  
    202202        data[0] = ((value & STATUS_LINE_D_MINUS) ? 1 : 0)
    203203            | ((value & STATUS_LINE_D_PLUS) ? 2 : 0);
    204         RH_DEBUG(hub, port, "Bus state %" PRIx8 "(source %" PRIx16")\n",
     204        RH_DEBUG(hub, port, "Bus state %" PRIx8 "(source %" PRIx16")",
    205205            data[0], value);
    206206        *act_size = 1;
     
    248248        );
    249249        RH_DEBUG(hub, port, "Port status %" PRIx32 " (source %" PRIx16
    250             "%s)\n", uint32_usb2host(status), val,
     250            "%s)", uint32_usb2host(status), val,
    251251            hub->reset_changed[port] ? "-reset" : "");
    252252        memcpy(data, &status, sizeof(status));
     
    276276        case USB_HUB_FEATURE_PORT_ENABLE:
    277277                RH_DEBUG(hub, port, "Clear port enable (status %"
    278                     PRIx16 ")\n", status);
     278                    PRIx16 ")", status);
    279279                pio_write_16(hub->ports[port], val & ~STATUS_ENABLED);
    280280                break;
    281281        case USB_HUB_FEATURE_PORT_SUSPEND:
    282282                RH_DEBUG(hub, port, "Clear port suspend (status %"
    283                     PRIx16 ")\n", status);
     283                    PRIx16 ")", status);
    284284                pio_write_16(hub->ports[port], val & ~STATUS_SUSPEND);
    285285                // TODO we should do resume magic
    286                 usb_log_warning("Resume is not implemented on port %u\n", port);
     286                usb_log_warning("Resume is not implemented on port %u", port);
    287287                break;
    288288        case USB_HUB_FEATURE_PORT_POWER:
    289                 RH_DEBUG(hub, port, "Clear port power (status %" PRIx16 ")\n",
     289                RH_DEBUG(hub, port, "Clear port power (status %" PRIx16 ")",
    290290                    status);
    291291                /* We are always powered */
    292                 usb_log_warning("Tried to power off port %u\n", port);
     292                usb_log_warning("Tried to power off port %u", port);
    293293                break;
    294294        case USB_HUB_FEATURE_C_PORT_CONNECTION:
    295295                RH_DEBUG(hub, port, "Clear port conn change (status %"
    296                     PRIx16 ")\n", status);
     296                    PRIx16 ")", status);
    297297                pio_write_16(hub->ports[port], val | STATUS_CONNECTED_CHANGED);
    298298                break;
    299299        case USB_HUB_FEATURE_C_PORT_RESET:
    300300                RH_DEBUG(hub, port, "Clear port reset change (status %"
    301                     PRIx16 ")\n", status);
     301                    PRIx16 ")", status);
    302302                hub->reset_changed[port] = false;
    303303                break;
    304304        case USB_HUB_FEATURE_C_PORT_ENABLE:
    305305                RH_DEBUG(hub, port, "Clear port enable change (status %"
    306                     PRIx16 ")\n", status);
     306                    PRIx16 ")", status);
    307307                pio_write_16(hub->ports[port], status | STATUS_ENABLED_CHANGED);
    308308                break;
    309309        case USB_HUB_FEATURE_C_PORT_SUSPEND:
    310310                RH_DEBUG(hub, port, "Clear port suspend change (status %"
    311                     PRIx16 ")\n", status);
     311                    PRIx16 ")", status);
    312312                //TODO
    313313                return ENOTSUP;
    314314        case USB_HUB_FEATURE_C_PORT_OVER_CURRENT:
    315315                RH_DEBUG(hub, port, "Clear port OC change (status %"
    316                     PRIx16 ")\n", status);
     316                    PRIx16 ")", status);
    317317                /* UHCI Does not report over current */
    318318                //TODO: newer chips do, but some have broken wiring
     
    320320        default:
    321321                RH_DEBUG(hub, port, "Clear unknown feature %d (status %"
    322                     PRIx16 ")\n", feature, status);
    323                 usb_log_warning("Clearing feature %d is unsupported\n",
     322                    PRIx16 ")", feature, status);
     323                usb_log_warning("Clearing feature %d is unsupported",
    324324                    feature);
    325325                return ESTALL;
     
    348348        case USB_HUB_FEATURE_PORT_RESET:
    349349                RH_DEBUG(hub, port, "Set port reset before (status %" PRIx16
    350                     ")\n", status);
     350                    ")", status);
    351351                uhci_port_reset_enable(hub->ports[port]);
    352352                hub->reset_changed[port] = true;
    353353                RH_DEBUG(hub, port, "Set port reset after (status %" PRIx16
    354                     ")\n", pio_read_16(hub->ports[port]));
     354                    ")", pio_read_16(hub->ports[port]));
    355355                break;
    356356        case USB_HUB_FEATURE_PORT_SUSPEND:
    357357                RH_DEBUG(hub, port, "Set port suspend (status %" PRIx16
    358                     ")\n", status);
     358                    ")", status);
    359359                pio_write_16(hub->ports[port],
    360360                    (status & ~STATUS_WC_BITS) | STATUS_SUSPEND);
    361                 usb_log_warning("Suspend is not implemented on port %u\n", port);
     361                usb_log_warning("Suspend is not implemented on port %u", port);
    362362                break;
    363363        case USB_HUB_FEATURE_PORT_POWER:
    364364                RH_DEBUG(hub, port, "Set port power (status %" PRIx16
    365                     ")\n", status);
     365                    ")", status);
    366366                /* We are always powered */
    367                 usb_log_warning("Tried to power port %u\n", port);
     367                usb_log_warning("Tried to power port %u", port);
    368368                break;
    369369        case USB_HUB_FEATURE_C_PORT_CONNECTION:
     
    372372        case USB_HUB_FEATURE_C_PORT_OVER_CURRENT:
    373373                RH_DEBUG(hub, port, "Set port change flag (status %" PRIx16
    374                     ")\n", status);
     374                    ")", status);
    375375                /* These are voluntary and don't have to be set
    376376                 * there is no way we could do it on UHCI anyway */
     
    378378        default:
    379379                RH_DEBUG(hub, port, "Set unknown feature %d (status %" PRIx16
    380                     ")\n", feature, status);
    381                 usb_log_warning("Setting feature %d is unsupported\n",
     380                    ")", feature, status);
     381                usb_log_warning("Setting feature %d is unsupported",
    382382                    feature);
    383383                return ESTALL;
     
    418418                RH_DEBUG(hub, -1, "Event mask %" PRIx8
    419419                    " (status_a %" PRIx16 "%s),"
    420                     " (status_b %" PRIx16 "%s)\n", status,
     420                    " (status_b %" PRIx16 "%s)", status,
    421421                    status_a, hub->reset_changed[0] ? "-reset" : "",
    422422                    status_b, hub->reset_changed[1] ? "-reset" : "" );
  • uspace/drv/bus/usb/usbdiag/device.c

    rc1a966e ra1732929  
    7979        usb_endpoint_mapping_t *epm = usb_device_get_mapped_ep(dev->usb_dev, USBDIAG_EP_##ep_no);\
    8080        if (!epm || !epm->present) {\
    81                 usb_log_error("Failed to map endpoint: " #ep_no ".\n");\
     81                usb_log_error("Failed to map endpoint: " #ep_no ".");\
    8282                rc = ENOENT;\
    8383                goto err_fun;\
  • uspace/drv/bus/usb/usbdiag/main.c

    rc1a966e ra1732929  
    5252        usbdiag_dev_t *diag_dev;
    5353        if ((rc = usbdiag_dev_create(dev, &diag_dev))) {
    54                 usb_log_error("Failed create device: %s.\n", str_error(rc));
     54                usb_log_error("Failed create device: %s.", str_error(rc));
    5555                goto err;
    5656        }
    5757
    5858        if ((rc = ddf_fun_bind(diag_dev->fun))) {
    59                 usb_log_error("Failed to bind DDF function: %s.\n", str_error(rc));
     59                usb_log_error("Failed to bind DDF function: %s.", str_error(rc));
    6060                goto err_create;
    6161        }
     
    9696
    9797        if ((rc = ddf_fun_unbind(diag_dev->fun))) {
    98                 usb_log_error("Failed to unbind DDF function: %s\n", str_error(rc));
     98                usb_log_error("Failed to unbind DDF function: %s", str_error(rc));
    9999                goto err;
    100100        }
     
    117117
    118118        if ((rc = ddf_fun_unbind(diag_dev->fun))) {
    119                 usb_log_error("Failed to unbind DDF function: %s\n", str_error(rc));
     119                usb_log_error("Failed to unbind DDF function: %s", str_error(rc));
    120120                goto err;
    121121        }
  • uspace/drv/bus/usb/usbdiag/tests.c

    rc1a966e ra1732929  
    6868                while (remaining > 0) {
    6969                        if ((rc = usb_pipe_read(pipe, buffer + size - remaining, remaining, &transferred))) {
    70                                 usb_log_error("Read of %s IN endpoint failed with error: %s\n", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
     70                                usb_log_error("Read of %s IN endpoint failed with error: %s", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
    7171                                break;
    7272                        }
    7373
    7474                        if (transferred > remaining) {
    75                                 usb_log_error("Read of %s IN endpoint returned more data than expected.\n", usb_str_transfer_type(pipe->desc.transfer_type));
     75                                usb_log_error("Read of %s IN endpoint returned more data than expected.", usb_str_transfer_type(pipe->desc.transfer_type));
    7676                                rc = EINVAL;
    7777                                break;
     
    121121                // Write buffer to device.
    122122                if ((rc = usb_pipe_write(pipe, buffer, size))) {
    123                         usb_log_error("Write to %s OUT endpoint failed with error: %s\n", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
     123                        usb_log_error("Write to %s OUT endpoint failed with error: %s", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
    124124                        break;
    125125                }
     
    169169                while (remaining > 0) {
    170170                        if ((rc = usb_pipe_read(pipe, buffer + size - remaining, remaining, &transferred))) {
    171                                 usb_log_error("Read of %s IN endpoint failed with error: %s\n", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
     171                                usb_log_error("Read of %s IN endpoint failed with error: %s", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
    172172                                break;
    173173                        }
    174174
    175175                        if (transferred > remaining) {
    176                                 usb_log_error("Read of %s IN endpoint returned more data than expected.\n", usb_str_transfer_type(pipe->desc.transfer_type));
     176                                usb_log_error("Read of %s IN endpoint returned more data than expected.", usb_str_transfer_type(pipe->desc.transfer_type));
    177177                                rc = EINVAL;
    178178                                break;
     
    187187                for (size_t i = 0; i < size; i += sizeof(test_data)) {
    188188                        if (*(uint32_t *)(buffer + i) != test_data) {
    189                                 usb_log_error("Read of %s IN endpoint returned invald data at address %lu.\n", usb_str_transfer_type(pipe->desc.transfer_type), i);
     189                                usb_log_error("Read of %s IN endpoint returned invald data at address %lu.", usb_str_transfer_type(pipe->desc.transfer_type), i);
    190190                                rc = EINVAL;
    191191                                break;
     
    238238                // Write buffer to device.
    239239                if ((rc = usb_pipe_write(pipe, buffer, size))) {
    240                         usb_log_error("Write to %s OUT endpoint failed with error: %s\n", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
     240                        usb_log_error("Write to %s OUT endpoint failed with error: %s", usb_str_transfer_type(pipe->desc.transfer_type), str_error(rc));
    241241                        break;
    242242                }
  • uspace/drv/bus/usb/usbflbk/main.c

    rc1a966e ra1732929  
    4848static int usbfallback_device_add(usb_device_t *dev)
    4949{
    50         usb_log_info("Pretending to control %s `%s'.\n",
     50        usb_log_info("Pretending to control %s `%s'.",
    5151            usb_device_get_iface_number(dev) < 0 ? "device" : "interface",
    5252            usb_device_get_name(dev));
  • uspace/drv/bus/usb/usbhub/port.c

    rc1a966e ra1732929  
    141141        assert(port);
    142142        assert(hub);
    143         usb_log_debug2("(%p-%u): Interrupt.\n", hub, port->port_number);
     143        usb_log_debug2("(%p-%u): Interrupt.", hub, port->port_number);
    144144
    145145        usb_port_status_t status = 0;
    146146        const int opResult = get_port_status(port, &status);
    147147        if (opResult != EOK) {
    148                 usb_log_error("(%p-%u): Failed to get port status: %s.\n", hub,
     148                usb_log_error("(%p-%u): Failed to get port status: %s.", hub,
    149149                    port->port_number, str_error(opResult));
    150150                return;
     
    155155                const bool connected =
    156156                    (status & USB_HUB_PORT_STATUS_CONNECTION) != 0;
    157                 usb_log_debug("(%p-%u): Connection change: device %s.\n", hub,
     157                usb_log_debug("(%p-%u): Connection change: device %s.", hub,
    158158                    port->port_number, connected ? "attached" : "removed");
    159159
     
    189189        if (status & USB_HUB_PORT_C_STATUS_ENABLED) {
    190190                // TODO: maybe HS reset failed?
    191                 usb_log_info("(%p-%u): Port disabled because of errors.\n", hub,
     191                usb_log_info("(%p-%u): Port disabled because of errors.", hub,
    192192                   port->port_number);
    193193                usb_hub_port_device_gone(port, hub);
     
    294294        if (enabled) {
    295295                port->reset_status = RESET_OK;
    296                 usb_log_debug("(%p-%u): Port reset complete.\n", hub,
     296                usb_log_debug("(%p-%u): Port reset complete.", hub,
    297297                    port->port_number);
    298298        } else {
  • uspace/drv/bus/usb/usbhub/usbhub.c

    rc1a966e ra1732929  
    117117            usb_device_data_alloc(usb_dev, sizeof(usb_hub_dev_t));
    118118        if (hub_dev == NULL) {
    119                 usb_log_error("Failed to create hub driver structure.\n");
     119                usb_log_error("Failed to create hub driver structure.");
    120120                return ENOMEM;
    121121        }
     
    129129        int opResult = usb_set_first_configuration(usb_dev);
    130130        if (opResult != EOK) {
    131                 usb_log_error("Could not set hub configuration: %s\n",
     131                usb_log_error("Could not set hub configuration: %s",
    132132                    str_error(opResult));
    133133                return opResult;
     
    137137        opResult = usb_hub_process_hub_specific_info(hub_dev);
    138138        if (opResult != EOK) {
    139                 usb_log_error("Could process hub specific info, %s\n",
     139                usb_log_error("Could process hub specific info, %s",
    140140                    str_error(opResult));
    141141                return opResult;
     
    143143
    144144        /* Create hub control function. */
    145         usb_log_debug("Creating DDF function '" HUB_FNC_NAME "'.\n");
     145        usb_log_debug("Creating DDF function '" HUB_FNC_NAME "'.");
    146146        hub_dev->hub_fun = usb_device_ddf_fun_create(hub_dev->usb_device,
    147147            fun_exposed, HUB_FNC_NAME);
    148148        if (hub_dev->hub_fun == NULL) {
    149                 usb_log_error("Failed to create hub function.\n");
     149                usb_log_error("Failed to create hub function.");
    150150                return ENOMEM;
    151151        }
     
    154154        opResult = ddf_fun_bind(hub_dev->hub_fun);
    155155        if (opResult != EOK) {
    156                 usb_log_error("Failed to bind hub function: %s.\n",
     156                usb_log_error("Failed to bind hub function: %s.",
    157157                   str_error(opResult));
    158158                ddf_fun_destroy(hub_dev->hub_fun);
     
    167167                ddf_fun_unbind(hub_dev->hub_fun);
    168168                ddf_fun_destroy(hub_dev->hub_fun);
    169                 usb_log_error("Failed to initialize polling fibril: %s.\n",
     169                usb_log_error("Failed to initialize polling fibril: %s.",
    170170                    str_error(opResult));
    171171                return opResult;
     
    189189                ddf_fun_unbind(hub_dev->hub_fun);
    190190                ddf_fun_destroy(hub_dev->hub_fun);
    191                 usb_log_error("Failed to create polling fibril: %s.\n",
     191                usb_log_error("Failed to create polling fibril: %s.",
    192192                    str_error(opResult));
    193193                return opResult;
     
    195195
    196196        hub_dev->running = true;
    197         usb_log_info("Controlling hub '%s' (%p: %zu ports).\n",
     197        usb_log_info("Controlling hub '%s' (%p: %zu ports).",
    198198            usb_device_get_name(hub_dev->usb_device), hub_dev,
    199199            hub_dev->port_count);
     
    335335            sizeof(usb_hub_descriptor_header_t), &received_size);
    336336        if (opResult != EOK) {
    337                 usb_log_error("(%p): Failed to receive hub descriptor: %s.\n",
     337                usb_log_error("(%p): Failed to receive hub descriptor: %s.",
    338338                    hub_dev, str_error(opResult));
    339339                return opResult;
    340340        }
    341341
    342         usb_log_debug("(%p): Setting port count to %d.\n", hub_dev,
     342        usb_log_debug("(%p): Setting port count to %d.", hub_dev,
    343343            descriptor.port_count);
    344344        hub_dev->port_count = descriptor.port_count;
     
    365365        }
    366366
    367         usb_log_info("(%p): Hub port power switching enabled (%s).\n", hub_dev,
     367        usb_log_info("(%p): Hub port power switching enabled (%s).", hub_dev,
    368368            hub_dev->per_port_power ? "per port" : "ganged");
    369369
     
    374374
    375375                if (ret != EOK) {
    376                         usb_log_error("(%p-%u): Cannot power on port: %s.\n",
     376                        usb_log_error("(%p-%u): Cannot power on port: %s.",
    377377                            hub_dev, hub_dev->ports[port].port_number,
    378378                            str_error(ret));
     
    402402        const size_t configuration_count =
    403403            usb_device_descriptors(usb_device)->device.configuration_count;
    404         usb_log_debug("Hub has %zu configurations.\n", configuration_count);
     404        usb_log_debug("Hub has %zu configurations.", configuration_count);
    405405
    406406        if (configuration_count < 1) {
    407                 usb_log_error("There are no configurations available\n");
     407                usb_log_error("There are no configurations available");
    408408                return EINVAL;
    409409        }
     
    426426            config_descriptor->configuration_number);
    427427        if (opResult != EOK) {
    428                 usb_log_error("Failed to set hub configuration: %s.\n",
     428                usb_log_error("Failed to set hub configuration: %s.",
    429429                    str_error(opResult));
    430430        } else {
    431                 usb_log_debug("\tUsed configuration %d\n",
     431                usb_log_debug("\tUsed configuration %d",
    432432                    config_descriptor->configuration_number);
    433433        }
  • uspace/drv/bus/usb/usbmid/dump.c

    rc1a966e ra1732929  
    5656                usb_standard_interface_descriptor_t *descriptor
    5757                    = (usb_standard_interface_descriptor_t *) data;
    58                 usb_log_info("Found interface: %s (0x%02x/0x%02x/0x%02x).\n",
     58                usb_log_info("Found interface: %s (0x%02x/0x%02x/0x%02x).",
    5959                    usb_str_class(descriptor->interface_class),
    6060                    (int) descriptor->interface_class,
  • uspace/drv/bus/usb/usbmid/explore.c

    rc1a966e ra1732929  
    106106
    107107
    108                 usb_log_info("Creating child for interface %d (%s).\n",
     108                usb_log_info("Creating child for interface %d (%s).",
    109109                    interface->interface_number,
    110110                    usb_str_class(interface->interface_class));
     
    144144                    dev_class, usb_str_class(dev_class),
    145145                    USB_CLASS_USE_INTERFACE);
    146                 usb_log_error("Not a multi-interface device, refusing.\n");
     146                usb_log_error("Not a multi-interface device, refusing.");
    147147                return ENOTSUP;
    148148        }
     
    160160            config_descriptor->configuration_number);
    161161        if (rc != EOK) {
    162                 usb_log_error("Failed to set device configuration: %s.\n",
     162                usb_log_error("Failed to set device configuration: %s.",
    163163                    str_error(rc));
    164164                return rc;
     
    168168        usb_mid_t *usb_mid = usb_device_data_alloc(dev, sizeof(usb_mid_t));
    169169        if (!usb_mid) {
    170                 usb_log_error("Failed to create USB MID structure.\n");
     170                usb_log_error("Failed to create USB MID structure.");
    171171                return ENOMEM;
    172172        }
     
    175175        usb_mid->ctl_fun = usb_device_ddf_fun_create(dev, fun_exposed, "ctl");
    176176        if (usb_mid->ctl_fun == NULL) {
    177                 usb_log_error("Failed to create control function.\n");
     177                usb_log_error("Failed to create control function.");
    178178                return ENOMEM;
    179179        }
     
    182182        rc = ddf_fun_bind(usb_mid->ctl_fun);
    183183        if (rc != EOK) {
    184                 usb_log_error("Failed to bind control function: %s.\n",
     184                usb_log_error("Failed to bind control function: %s.",
    185185                    str_error(rc));
    186186                ddf_fun_destroy(usb_mid->ctl_fun);
  • uspace/drv/bus/usb/usbmid/main.c

    rc1a966e ra1732929  
    5151static int usbmid_device_add(usb_device_t *dev)
    5252{
    53         usb_log_info("Taking care of new MID `%s'.\n", usb_device_get_name(dev));
     53        usb_log_info("Taking care of new MID `%s'.", usb_device_get_name(dev));
    5454
    5555        return usbmid_explore_device(dev);
     
    6868                const int pret = usbmid_interface_destroy(iface);
    6969                if (pret != EOK) {
    70                         usb_log_error("Failed to remove child `%s': %s\n",
     70                        usb_log_error("Failed to remove child `%s': %s",
    7171                            ddf_fun_get_name(iface->fun), str_error(pret));
    7272                        ret = pret;
     
    9191        int ret = ddf_fun_unbind(usb_mid->ctl_fun);
    9292        if (ret != EOK) {
    93                 usb_log_error("Failed to unbind USB MID ctl function: %s.\n",
     93                usb_log_error("Failed to unbind USB MID ctl function: %s.",
    9494                    str_error(ret));
    9595                return ret;
     
    9999        /* Remove all children */
    100100        list_foreach(usb_mid->interface_list, link, usbmid_interface_t, iface) {
    101                 usb_log_info("Removing child `%s'.\n",
     101                usb_log_info("Removing child `%s'.",
    102102                    ddf_fun_get_name(iface->fun));
    103103
     
    105105                int pret = ddf_fun_offline(iface->fun);
    106106                if (pret != EOK) {
    107                         usb_log_warning("Failed to turn off child `%s': %s\n",
     107                        usb_log_warning("Failed to turn off child `%s': %s",
    108108                            ddf_fun_get_name(iface->fun), str_error(pret));
    109109                        ret = pret;
     
    125125        assert(usb_mid);
    126126
    127         usb_log_info("USB MID gone: `%s'.\n", usb_device_get_name(dev));
     127        usb_log_info("USB MID gone: `%s'.", usb_device_get_name(dev));
    128128
    129129        /* Remove ctl function */
    130130        int ret = ddf_fun_unbind(usb_mid->ctl_fun);
    131131        if (ret != EOK) {
    132                 usb_log_error("Failed to unbind USB MID ctl function: %s.\n",
     132                usb_log_error("Failed to unbind USB MID ctl function: %s.",
    133133                    str_error(ret));
    134134                return ret;
  • uspace/drv/bus/usb/vhc/conndev.c

    rc1a966e ra1732929  
    113113                receive_device_name(callback);
    114114               
    115                 usb_log_info("New virtual device `%s' (id: %" PRIxn ").\n",
     115                usb_log_info("New virtual device `%s' (id: %" PRIxn ").",
    116116                    plugged_device_name, plugged_device_handle);
    117117        } else
     
    130130
    131131        if (plugged_device_handle != 0) {
    132                 usb_log_info("Virtual device `%s' disconnected (id: %" PRIxn ").\n",
     132                usb_log_info("Virtual device `%s' disconnected (id: %" PRIxn ").",
    133133                    plugged_device_name, plugged_device_handle);
    134134                vhc_virtdev_unplug(vhc, plugged_device_handle);
  • uspace/drv/bus/usb/vhc/hub/hub.c

    rc1a966e ra1732929  
    231231        }
    232232
    233         usb_log_debug("Setting port %zu to state %d.\n", port_index, state);
     233        usb_log_debug("Setting port %zu to state %d.", port_index, state);
    234234
    235235        switch (state) {
     
    423423        uint16_t old_value = port->status_change;
    424424        port->status_change |= change;
    425         usb_log_debug("Changing status change on %zu: %04x => %04x\n",
     425        usb_log_debug("Changing status change on %zu: %04x => %04x",
    426426            port->index,
    427427            (unsigned int) old_value, (unsigned int) port->status_change);
     
    510510        fid_t fibril = fibril_create(set_port_state_delayed_fibril, change);
    511511        if (fibril == 0) {
    512                 printf("Failed to create fibril\n");
     512                usb_log_error("Failed to create fibril.");
    513513                free(change);
    514514                return;
  • uspace/drv/bus/usb/vhc/main.c

    rc1a966e ra1732929  
    7777        int ret = hcd_ddf_setup_hc(dev, sizeof(vhc_data_t));
    7878        if (ret != EOK) {
    79                 usb_log_error("Failed to init HCD structures: %s.\n",
     79                usb_log_error("Failed to init HCD structures: %s.",
    8080                   str_error(ret));
    8181                return ret;
     
    9090        ret = vhc_control_node(dev, &ctl_fun);
    9191        if (ret != EOK) {
    92                 usb_log_error("Failed to setup control node.\n");
     92                usb_log_error("Failed to setup control node.");
    9393                return ret;
    9494        }
     
    9797        ret = vhc_virtdev_plug_hub(vhc, &vhc->hub, NULL, 0);
    9898        if (ret != EOK) {
    99                 usb_log_error("Failed to plug root hub: %s.\n", str_error(ret));
     99                usb_log_error("Failed to plug root hub: %s.", str_error(ret));
    100100                ddf_fun_destroy(ctl_fun);
    101101                return ret;
     
    108108        ret = hcd_setup_virtual_root_hub(&vhc->base);
    109109        if (ret != EOK) {
    110                 usb_log_error("Failed to init VHC root hub: %s\n",
     110                usb_log_error("Failed to init VHC root hub: %s",
    111111                        str_error(ret));
    112112                // TODO do something here...
  • uspace/drv/bus/usb/vhc/transfer.c

    rc1a966e ra1732929  
    207207       
    208208        if (targets > 1)
    209                 usb_log_warning("Transfer would be accepted by more devices!\n");
     209                usb_log_warning("Transfer would be accepted by more devices!");
    210210
    211211        return targets ? EOK : ENOENT;
     
    236236                            dev->dev_local, &data_transfer_size);
    237237                } else {
    238                         usb_log_warning("Device has no remote phone nor local node.\n");
     238                        usb_log_warning("Device has no remote phone nor local node.");
    239239                        rc = ESTALL;
    240240                }
    241241
    242                 usb_log_debug2("Transfer %p processed: %s.\n",
     242                usb_log_debug2("Transfer %p processed: %s.",
    243243                    transfer, str_error(rc));
    244244
     
    249249                                    (void*) transfer->batch.setup.buffer;
    250250                                dev->address = setup->value;
    251                                 usb_log_debug2("Address changed to %d\n",
     251                                usb_log_debug2("Address changed to %d",
    252252                                    dev->address);
    253253                        }
  • uspace/drv/bus/usb/xhci/bus.c

    rc1a966e ra1732929  
    7373        if ((err = hc_enable_slot(bus->hc, &dev->slot_id)) != EOK)
    7474                return err;
    75         usb_log_debug2("Obtained slot ID: %u.\n", dev->slot_id);
     75        usb_log_debug2("Obtained slot ID: %u.", dev->slot_id);
    7676
    7777        /* Create and configure control endpoint. */
  • uspace/drv/bus/usb/xhci/hc.c

    rc1a966e ra1732929  
    190190        hc->mmio_range = hw_res->mem_ranges.ranges[0];
    191191
    192         usb_log_debug("MMIO area at %p (size %zu), IRQ %d.\n",
     192        usb_log_debug("MMIO area at %p (size %zu), IRQ %d.",
    193193            RNGABSPTR(hc->mmio_range), RNGSZ(hc->mmio_range), hw_res->irqs.irqs[0]);
    194194
     
    406406                async_usleep(XHCI_LEGSUP_POLLING_DELAY_1MS);
    407407        }
    408         usb_log_error("BIOS did not release XHCI legacy hold!\n");
     408        usb_log_error("BIOS did not release XHCI legacy hold!");
    409409
    410410        return ENOTSUP;
     
    776776        xhci_device_ctx_t *dev_ctx = dev->dev_ctx.virt;
    777777        dev->base.address = XHCI_SLOT_DEVICE_ADDRESS(dev_ctx->slot_ctx);
    778         usb_log_debug2("Obtained USB address: %d.\n", dev->base.address);
     778        usb_log_debug2("Obtained USB address: %d.", dev->base.address);
    779779
    780780        return EOK;
  • uspace/drv/hid/usbhid/blink1/blink1.c

    rc1a966e ra1732929  
    6464        usb_blink1_t *blink1_dev = (usb_blink1_t *) ddf_fun_data_get(fun);
    6565        if (blink1_dev == NULL) {
    66                 usb_log_debug("Missing parameters.\n");
     66                usb_log_debug("Missing parameters.");
    6767                return EINVAL;
    6868        }
     
    105105            fun_exposed, HID_BLINK1_FUN_NAME);
    106106        if (fun == NULL) {
    107                 usb_log_error("Could not create DDF function node `%s'.\n",
     107                usb_log_error("Could not create DDF function node `%s'.",
    108108                    HID_BLINK1_FUN_NAME);
    109109                return ENOMEM;
     
    123123        int rc = ddf_fun_bind(fun);
    124124        if (rc != EOK) {
    125                 usb_log_error("Could not bind DDF function `%s': %s.\n",
     125                usb_log_error("Could not bind DDF function `%s': %s.",
    126126                    ddf_fun_get_name(fun), str_error(rc));
    127127                ddf_fun_destroy(fun);
     
    131131        rc = ddf_fun_add_to_category(fun, HID_BLINK1_CATEGORY);
    132132        if (rc != EOK) {
    133                 usb_log_error("Could not add DDF function to category %s: %s.\n",
     133                usb_log_error("Could not add DDF function to category %s: %s.",
    134134                    HID_BLINK1_CATEGORY, str_error(rc));
    135135               
  • uspace/drv/hid/usbhid/generic/hiddev.c

    rc1a966e ra1732929  
    9696        const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
    9797
    98         usb_log_debug2("hid_dev: %p, Max input report size (%zu).\n",
     98        usb_log_debug2("hid_dev: %p, Max input report size (%zu).",
    9999            hid_dev, hid_dev->max_input_report_size);
    100100
     
    105105    size_t size, size_t *act_size, int *event_nr, unsigned int flags)
    106106{
    107         usb_log_debug2("Generic HID: Get event.\n");
     107        usb_log_debug2("Generic HID: Get event.");
    108108
    109109        if (buffer == NULL || act_size == NULL || event_nr == NULL) {
     
    115115
    116116        if (hid_dev->input_report_size > size) {
    117                 usb_log_debug("input_report_size > size (%zu, %zu)\n",
     117                usb_log_debug("input_report_size > size (%zu, %zu)",
    118118                    hid_dev->input_report_size, size);
    119119                return EINVAL;  // TODO: other error code
     
    126126        *event_nr = usb_hid_report_number(hid_dev);
    127127
    128         usb_log_debug2("OK\n");
     128        usb_log_debug2("OK");
    129129
    130130        return EOK;
     
    133133static size_t usb_generic_get_report_descriptor_length(ddf_fun_t *fun)
    134134{
    135         usb_log_debug("Generic HID: Get report descriptor length.\n");
    136 
    137         const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
    138 
    139         usb_log_debug2("hid_dev->report_desc_size = %zu\n",
     135        usb_log_debug("Generic HID: Get report descriptor length.");
     136
     137        const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
     138
     139        usb_log_debug2("hid_dev->report_desc_size = %zu",
    140140            hid_dev->report_desc_size);
    141141
     
    146146    size_t size, size_t *actual_size)
    147147{
    148         usb_log_debug2("Generic HID: Get report descriptor.\n");
     148        usb_log_debug2("Generic HID: Get report descriptor.");
    149149
    150150        const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
     
    162162static int usb_generic_hid_client_connected(ddf_fun_t *fun)
    163163{
    164         usb_log_debug("Generic HID: Client connected.\n");
     164        usb_log_debug("Generic HID: Client connected.");
    165165        return EOK;
    166166}
     
    173173
    174174        if (ddf_fun_unbind(fun) != EOK) {
    175                 usb_log_error("Failed to unbind generic hid fun.\n");
     175                usb_log_error("Failed to unbind generic hid fun.");
    176176                return;
    177177        }
    178         usb_log_debug2("%s unbound.\n", ddf_fun_get_name(fun));
     178        usb_log_debug2("%s unbound.", ddf_fun_get_name(fun));
    179179        ddf_fun_destroy(fun);
    180180}
     
    189189
    190190        /* Create the exposed function. */
    191         usb_log_debug("Creating DDF function %s...\n", HID_GENERIC_FUN_NAME);
     191        usb_log_debug("Creating DDF function %s...", HID_GENERIC_FUN_NAME);
    192192        ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev,
    193193            fun_exposed, HID_GENERIC_FUN_NAME);
    194194        if (fun == NULL) {
    195                 usb_log_error("Could not create DDF function node.\n");
     195                usb_log_error("Could not create DDF function node.");
    196196                return ENOMEM;
    197197        }
     
    204204        int rc = ddf_fun_bind(fun);
    205205        if (rc != EOK) {
    206                 usb_log_error("Could not bind DDF function: %s.\n",
     206                usb_log_error("Could not bind DDF function: %s.",
    207207                    str_error(rc));
    208208                ddf_fun_destroy(fun);
     
    210210        }
    211211
    212         usb_log_debug("HID function created. Handle: %" PRIun "\n",
     212        usb_log_debug("HID function created. Handle: %" PRIun "",
    213213            ddf_fun_get_handle(fun));
    214214        *data = fun;
  • uspace/drv/hid/usbhid/kbd/kbddev.c

    rc1a966e ra1732929  
    185185                if (kbd_dev->client_sess == NULL) {
    186186                        kbd_dev->client_sess = sess;
    187                         usb_log_debug("%s: OK\n", __FUNCTION__);
     187                        usb_log_debug("%s: OK", __FUNCTION__);
    188188                        async_answer_0(icallid, EOK);
    189189                } else {
    190                         usb_log_error("%s: console session already set\n",
     190                        usb_log_error("%s: console session already set",
    191191                           __FUNCTION__);
    192192                        async_answer_0(icallid, ELIMIT);
     
    195195        }
    196196        default:
    197                         usb_log_error("%s: Unknown method: %d.\n",
     197                        usb_log_error("%s: Unknown method: %d.",
    198198                            __FUNCTION__, (int) method);
    199199                        async_answer_0(icallid, EINVAL);
     
    226226        /* Reset the LED data. */
    227227        memset(kbd_dev->led_data, 0, kbd_dev->led_output_size * sizeof(int32_t));
    228         usb_log_debug("Creating output report:\n");
     228        usb_log_debug("Creating output report:");
    229229
    230230        usb_hid_report_field_t *field = usb_hid_report_get_sibling(
     
    266266        }
    267267
    268         usb_log_debug("Output report buffer: %s\n",
     268        usb_log_debug("Output report buffer: %s",
    269269            usb_debug_str_buffer(kbd_dev->output_buffer, kbd_dev->output_size,
    270270                0));
     
    276276            kbd_dev->output_buffer, kbd_dev->output_size);
    277277        if (rc != EOK) {
    278                 usb_log_warning("Failed to set kbd indicators.\n");
     278                usb_log_warning("Failed to set kbd indicators.");
    279279        }
    280280}
     
    289289void usb_kbd_push_ev(usb_kbd_t *kbd_dev, int type, unsigned key)
    290290{
    291         usb_log_debug2("Sending kbdev event %d/%d to the console\n", type, key);
     291        usb_log_debug2("Sending kbdev event %d/%d to the console", type, key);
    292292        if (kbd_dev->client_sess == NULL) {
    293293                usb_log_warning(
     
    301301                async_exchange_end(exch);
    302302        } else {
    303                 usb_log_warning("Failed to send key to console.\n");
     303                usb_log_warning("Failed to send key to console.");
    304304        }
    305305}
     
    353353            kbd_dev->key_count);
    354354        if (i != (size_t) -1) {
    355                 usb_log_error("Detected phantom state.\n");
     355                usb_log_error("Detected phantom state.");
    356356                return;
    357357        }
     
    403403        ddf_dump_buffer(key_buffer, 512,
    404404            kbd_dev->keys_old, 4, kbd_dev->key_count, 0);
    405         usb_log_debug2("Stored keys %s.\n", key_buffer);
     405        usb_log_debug2("Stored keys %s.", key_buffer);
    406406}
    407407
     
    431431        usb_hid_report_path_t *path = usb_hid_report_path();
    432432        if (path == NULL) {
    433                 usb_log_error("Failed to create hid/kbd report path.\n");
     433                usb_log_error("Failed to create hid/kbd report path.");
    434434                return;
    435435        }
     
    438438           usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
    439439        if (ret != EOK) {
    440                 usb_log_error("Failed to append to hid/kbd report path.\n");
     440                usb_log_error("Failed to append to hid/kbd report path.");
    441441                return;
    442442        }
     
    452452
    453453        while (field != NULL) {
    454                 usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u)\n",
     454                usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u)",
    455455                    field, field->value, field->usage);
    456456
     
    464464                        kbd_dev->keys[i] = 0;
    465465                }
    466                 usb_log_debug2("Saved %u. key usage %d\n", i, kbd_dev->keys[i]);
     466                usb_log_debug2("Saved %u. key usage %d", i, kbd_dev->keys[i]);
    467467
    468468                ++i;
     
    502502        usb_hid_report_path_t *path = usb_hid_report_path();
    503503        if (path == NULL) {
    504                 usb_log_error("Failed to create kbd report path.\n");
     504                usb_log_error("Failed to create kbd report path.");
    505505                usb_kbd_destroy(kbd_dev);
    506506                return ENOMEM;
     
    510510            usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
    511511        if (ret != EOK) {
    512                 usb_log_error("Failed to append item to kbd report path.\n");
     512                usb_log_error("Failed to append item to kbd report path.");
    513513                usb_hid_report_path_free(path);
    514514                usb_kbd_destroy(kbd_dev);
     
    523523        usb_hid_report_path_free(path);
    524524
    525         usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count);
     525        usb_log_debug("Size of the input report: %zu", kbd_dev->key_count);
    526526
    527527        kbd_dev->keys = calloc(kbd_dev->key_count, sizeof(int32_t));
    528528        if (kbd_dev->keys == NULL) {
    529                 usb_log_error("Failed to allocate key buffer.\n");
     529                usb_log_error("Failed to allocate key buffer.");
    530530                usb_kbd_destroy(kbd_dev);
    531531                return ENOMEM;
     
    534534        kbd_dev->keys_old = calloc(kbd_dev->key_count, sizeof(int32_t));
    535535        if (kbd_dev->keys_old == NULL) {
    536                 usb_log_error("Failed to allocate old_key buffer.\n");
     536                usb_log_error("Failed to allocate old_key buffer.");
    537537                usb_kbd_destroy(kbd_dev);
    538538                return ENOMEM;
     
    544544            &kbd_dev->output_size, 0);
    545545        if (kbd_dev->output_buffer == NULL) {
    546                 usb_log_error("Error creating output report buffer.\n");
     546                usb_log_error("Error creating output report buffer.");
    547547                usb_kbd_destroy(kbd_dev);
    548548                return ENOMEM;
    549549        }
    550550
    551         usb_log_debug("Output buffer size: %zu\n", kbd_dev->output_size);
     551        usb_log_debug("Output buffer size: %zu", kbd_dev->output_size);
    552552
    553553        kbd_dev->led_path = usb_hid_report_path();
    554554        if (kbd_dev->led_path == NULL) {
    555                 usb_log_error("Failed to create kbd led report path.\n");
     555                usb_log_error("Failed to create kbd led report path.");
    556556                usb_kbd_destroy(kbd_dev);
    557557                return ENOMEM;
     
    561561            kbd_dev->led_path, USB_HIDUT_PAGE_LED, 0);
    562562        if (ret != EOK) {
    563                 usb_log_error("Failed to append to kbd/led report path.\n");
     563                usb_log_error("Failed to append to kbd/led report path.");
    564564                usb_kbd_destroy(kbd_dev);
    565565                return ret;
     
    569569            &hid_dev->report, 0, USB_HID_REPORT_TYPE_OUTPUT);
    570570
    571         usb_log_debug("Output report size (in items): %zu\n",
     571        usb_log_debug("Output report size (in items): %zu",
    572572            kbd_dev->led_output_size);
    573573
    574574        kbd_dev->led_data = calloc(kbd_dev->led_output_size, sizeof(int32_t));
    575575        if (kbd_dev->led_data == NULL) {
    576                 usb_log_error("Error creating buffer for LED output report.\n");
     576                usb_log_error("Error creating buffer for LED output report.");
    577577                usb_kbd_destroy(kbd_dev);
    578578                return ENOMEM;
     
    588588
    589589        kbd_dev->initialized = USB_KBD_STATUS_INITIALIZED;
    590         usb_log_debug("HID/KBD device structure initialized.\n");
     590        usb_log_debug("HID/KBD device structure initialized.");
    591591
    592592        return EOK;
     
    618618int usb_kbd_init(usb_hid_dev_t *hid_dev, void **data)
    619619{
    620         usb_log_debug("Initializing HID/KBD structure...\n");
     620        usb_log_debug("Initializing HID/KBD structure...");
    621621
    622622        if (hid_dev == NULL) {
     
    627627
    628628        /* Create the exposed function. */
    629         usb_log_debug("Creating DDF function %s...\n", HID_KBD_FUN_NAME);
     629        usb_log_debug("Creating DDF function %s...", HID_KBD_FUN_NAME);
    630630        ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev,
    631631            fun_exposed, HID_KBD_FUN_NAME);
    632632        if (fun == NULL) {
    633                 usb_log_error("Could not create DDF function node.\n");
     633                usb_log_error("Could not create DDF function node.");
    634634                return ENOMEM;
    635635        }
     
    637637        usb_kbd_t *kbd_dev = ddf_fun_data_alloc(fun, sizeof(usb_kbd_t));
    638638        if (kbd_dev == NULL) {
    639                 usb_log_error("Failed to allocate KBD device structure.\n");
     639                usb_log_error("Failed to allocate KBD device structure.");
    640640                ddf_fun_destroy(fun);
    641641                return ENOMEM;
     
    644644        int ret = kbd_dev_init(kbd_dev, hid_dev);
    645645        if (ret != EOK) {
    646                 usb_log_error("Failed to initialize KBD device  structure.\n");
     646                usb_log_error("Failed to initialize KBD device  structure.");
    647647                ddf_fun_destroy(fun);
    648648                return ret;
     
    655655        ret = ddf_fun_bind(fun);
    656656        if (ret != EOK) {
    657                 usb_log_error("Could not bind DDF function: %s.\n",
     657                usb_log_error("Could not bind DDF function: %s.",
    658658                    str_error(ret));
    659659                usb_kbd_destroy(kbd_dev);
     
    662662        }
    663663
    664         usb_log_debug("%s function created. Handle: %" PRIun "\n",
     664        usb_log_debug("%s function created. Handle: %" PRIun "",
    665665            HID_KBD_FUN_NAME, ddf_fun_get_handle(fun));
    666666
    667         usb_log_debug("Adding DDF function to category %s...\n",
     667        usb_log_debug("Adding DDF function to category %s...",
    668668            HID_KBD_CATEGORY_NAME);
    669669        ret = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY_NAME);
     
    753753        if (kbd_dev->fun) {
    754754                if (ddf_fun_unbind(kbd_dev->fun) != EOK) {
    755                         usb_log_warning("Failed to unbind %s.\n",
     755                        usb_log_warning("Failed to unbind %s.",
    756756                            ddf_fun_get_name(kbd_dev->fun));
    757757                } else {
    758                         usb_log_debug2("%s unbound.\n",
     758                        usb_log_debug2("%s unbound.",
    759759                            ddf_fun_get_name(kbd_dev->fun));
    760760                        ddf_fun_destroy(kbd_dev->fun);
     
    784784
    785785        if (rc != EOK) {
    786                 usb_log_error("Failed to parse boot report descriptor: %s\n",
     786                usb_log_error("Failed to parse boot report descriptor: %s",
    787787                    str_error(rc));
    788788                return rc;
  • uspace/drv/hid/usbhid/kbd/kbdrepeat.c

    rc1a966e ra1732929  
    6969        unsigned int delay = 0;
    7070
    71         usb_log_debug("Starting autorepeat loop.\n");
     71        usb_log_debug("Starting autorepeat loop.");
    7272
    7373        while (true) {
    7474                /* Check if the kbd structure is usable. */
    7575                if (!usb_kbd_is_initialized(kbd)) {
    76                         usb_log_warning("kbd not ready, exiting autorepeat.\n");
     76                        usb_log_warning("kbd not ready, exiting autorepeat.");
    7777                        return;
    7878                }
     
    8282                if (kbd->repeat.key_new > 0) {
    8383                        if (kbd->repeat.key_new == kbd->repeat.key_repeated) {
    84                                 usb_log_debug2("Repeating key: %u.\n",
     84                                usb_log_debug2("Repeating key: %u.",
    8585                                    kbd->repeat.key_repeated);
    8686                                usb_kbd_push_ev(kbd, KEY_PRESS,
     
    8888                                delay = kbd->repeat.delay_between;
    8989                        } else {
    90                                 usb_log_debug2("New key to repeat: %u.\n",
     90                                usb_log_debug2("New key to repeat: %u.",
    9191                                    kbd->repeat.key_new);
    9292                                kbd->repeat.key_repeated = kbd->repeat.key_new;
     
    9595                } else {
    9696                        if (kbd->repeat.key_repeated > 0) {
    97                                 usb_log_debug2("Stopping to repeat key: %u.\n",
     97                                usb_log_debug2("Stopping to repeat key: %u.",
    9898                                    kbd->repeat.key_repeated);
    9999                                kbd->repeat.key_repeated = 0;
     
    119119int usb_kbd_repeat_fibril(void *arg)
    120120{
    121         usb_log_debug("Autorepeat fibril spawned.\n");
     121        usb_log_debug("Autorepeat fibril spawned.");
    122122
    123123        if (arg == NULL) {
    124                 usb_log_error("No device!\n");
     124                usb_log_error("No device!");
    125125                return EINVAL;
    126126        }
  • uspace/drv/hid/usbhid/main.c

    rc1a966e ra1732929  
    5858static int usb_hid_device_add(usb_device_t *dev)
    5959{
    60         usb_log_debug("%s\n", __FUNCTION__);
     60        usb_log_debug("%s", __FUNCTION__);
    6161
    6262        if (dev == NULL) {
    63                 usb_log_error("Wrong parameter given for add_device().\n");
     63                usb_log_error("Wrong parameter given for add_device().");
    6464                return EINVAL;
    6565        }
     
    7373            usb_device_data_alloc(dev, sizeof(usb_hid_dev_t));
    7474        if (hid_dev == NULL) {
    75                 usb_log_error("Failed to create USB/HID device structure.\n");
     75                usb_log_error("Failed to create USB/HID device structure.");
    7676                return ENOMEM;
    7777        }
     
    7979        int rc = usb_hid_init(hid_dev, dev);
    8080        if (rc != EOK) {
    81                 usb_log_error("Failed to initialize USB/HID device.\n");
     81                usb_log_error("Failed to initialize USB/HID device.");
    8282                usb_hid_deinit(hid_dev);
    8383                return rc;
    8484        }
    8585
    86         usb_log_debug("USB/HID device structure initialized.\n");
     86        usb_log_debug("USB/HID device structure initialized.");
    8787
    8888        /* Start automated polling function.
     
    9292
    9393        if (rc != EOK) {
    94                 usb_log_error("Failed to start polling fibril for `%s'.\n",
     94                usb_log_error("Failed to start polling fibril for `%s'.",
    9595                    usb_device_get_name(dev));
    9696                usb_hid_deinit(hid_dev);
     
    9999        hid_dev->running = true;
    100100
    101         usb_log_info("HID device `%s' ready.\n", usb_device_get_name(dev));
     101        usb_log_info("HID device `%s' ready.", usb_device_get_name(dev));
    102102
    103103        return EOK;
     
    115115        /* Clean up. */
    116116        usb_hid_deinit(hid_dev);
    117         usb_log_info("%s destruction complete.\n", usb_device_get_name(dev));
     117        usb_log_info("%s destruction complete.", usb_device_get_name(dev));
    118118
    119119        return EOK;
     
    132132        assert(hid_dev);
    133133
    134         usb_log_info("Device %s removed.\n", usb_device_get_name(dev));
     134        usb_log_info("Device %s removed.", usb_device_get_name(dev));
    135135        return join_and_clean(dev);
    136136}
     
    148148        assert(hid_dev);
    149149
    150         usb_log_info("Device %s gone.\n", usb_device_get_name(dev));
     150        usb_log_info("Device %s gone.", usb_device_get_name(dev));
    151151        return join_and_clean(dev);
    152152}
  • uspace/drv/hid/usbhid/mouse/mousedev.c

    rc1a966e ra1732929  
    118118
    119119        if (mouse_dev == NULL) {
    120                 usb_log_debug("%s: Missing parameters.\n", __FUNCTION__);
     120                usb_log_debug("%s: Missing parameters.", __FUNCTION__);
    121121                async_answer_0(icallid, EINVAL);
    122122                return;
    123123        }
    124124
    125         usb_log_debug("%s: fun->name: %s\n", __FUNCTION__, ddf_fun_get_name(fun));
    126         usb_log_debug("%s: mouse_sess: %p\n",
     125        usb_log_debug("%s: fun->name: %s", __FUNCTION__, ddf_fun_get_name(fun));
     126        usb_log_debug("%s: mouse_sess: %p",
    127127            __FUNCTION__, mouse_dev->mouse_sess);
    128128
     
    132132                if (mouse_dev->mouse_sess == NULL) {
    133133                        mouse_dev->mouse_sess = sess;
    134                         usb_log_debug("Console session to %s set ok (%p).\n",
     134                        usb_log_debug("Console session to %s set ok (%p).",
    135135                            ddf_fun_get_name(fun), sess);
    136136                        async_answer_0(icallid, EOK);
    137137                } else {
    138                         usb_log_error("Console session to %s already set.\n",
     138                        usb_log_error("Console session to %s already set.",
    139139                            ddf_fun_get_name(fun));
    140140                        async_answer_0(icallid, ELIMIT);
     
    142142                }
    143143        } else {
    144                 usb_log_debug("%s: Invalid function.\n", __FUNCTION__);
     144                usb_log_debug("%s: Invalid function.", __FUNCTION__);
    145145                async_answer_0(icallid, EINVAL);
    146146        }
     
    171171
    172172        if (mouse_dev->mouse_sess == NULL) {
    173                 usb_log_warning(NAME " No console session.\n");
     173                usb_log_warning(NAME " No console session.");
    174174                return;
    175175        }
     
    225225        usb_hid_report_path_t *path = usb_hid_report_path();
    226226        if (path == NULL) {
    227                 usb_log_warning("Failed to create USB HID report path.\n");
     227                usb_log_warning("Failed to create USB HID report path.");
    228228                return;
    229229        }
     
    232232        if (ret != EOK) {
    233233                usb_hid_report_path_free(path);
    234                 usb_log_warning("Failed to add buttons to report path.\n");
     234                usb_log_warning("Failed to add buttons to report path.");
    235235                return;
    236236        }
     
    242242
    243243        while (field != NULL) {
    244                 usb_log_debug2(NAME " VALUE(%X) USAGE(%X)\n", field->value,
     244                usb_log_debug2(NAME " VALUE(%X) USAGE(%X)", field->value,
    245245                    field->usage);
    246246                assert(field->usage > field->usage_minimum);
     
    331331
    332332        if (mouse_dev->buttons == NULL) {
    333                 usb_log_error(NAME ": out of memory, giving up on device!\n");
     333                usb_log_error(NAME ": out of memory, giving up on device!");
    334334                free(mouse_dev);
    335335                return ENOMEM;
     
    344344int usb_mouse_init(usb_hid_dev_t *hid_dev, void **data)
    345345{
    346         usb_log_debug("Initializing HID/Mouse structure...\n");
     346        usb_log_debug("Initializing HID/Mouse structure...");
    347347
    348348        if (hid_dev == NULL) {
     
    353353
    354354        /* Create the exposed function. */
    355         usb_log_debug("Creating DDF function %s...\n", HID_MOUSE_FUN_NAME);
     355        usb_log_debug("Creating DDF function %s...", HID_MOUSE_FUN_NAME);
    356356        ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev,
    357357            fun_exposed, HID_MOUSE_FUN_NAME);
    358358        if (fun == NULL) {
    359                 usb_log_error("Could not create DDF function node `%s'.\n",
     359                usb_log_error("Could not create DDF function node `%s'.",
    360360                    HID_MOUSE_FUN_NAME);
    361361                return ENOMEM;
     
    364364        usb_mouse_t *mouse_dev = ddf_fun_data_alloc(fun, sizeof(usb_mouse_t));
    365365        if (mouse_dev == NULL) {
    366                 usb_log_error("Failed to alloc HID mouse device structure.\n");
     366                usb_log_error("Failed to alloc HID mouse device structure.");
    367367                ddf_fun_destroy(fun);
    368368                return ENOMEM;
     
    371371        int ret = mouse_dev_init(mouse_dev, hid_dev);
    372372        if (ret != EOK) {
    373                 usb_log_error("Failed to init HID mouse device structure.\n");
     373                usb_log_error("Failed to init HID mouse device structure.");
    374374                return ret;
    375375        }
     
    379379        ret = ddf_fun_bind(fun);
    380380        if (ret != EOK) {
    381                 usb_log_error("Could not bind DDF function `%s': %s.\n",
     381                usb_log_error("Could not bind DDF function `%s': %s.",
    382382                    ddf_fun_get_name(fun), str_error(ret));
    383383                ddf_fun_destroy(fun);
     
    385385        }
    386386
    387         usb_log_debug("Adding DDF function `%s' to category %s...\n",
     387        usb_log_debug("Adding DDF function `%s' to category %s...",
    388388            ddf_fun_get_name(fun), HID_MOUSE_CATEGORY);
    389389        ret = ddf_fun_add_to_category(fun, HID_MOUSE_CATEGORY);
     
    444444
    445445        if (rc != EOK) {
    446                 usb_log_error("Failed to parse boot report descriptor: %s\n",
     446                usb_log_error("Failed to parse boot report descriptor: %s",
    447447                    str_error(rc));
    448448                return rc;
  • uspace/drv/hid/usbhid/multimedia/multimedia.c

    rc1a966e ra1732929  
    8686    ipc_callid_t icallid, ipc_call_t *icall)
    8787{
    88         usb_log_debug(NAME " default_connection_handler()\n");
     88        usb_log_debug(NAME " default_connection_handler()");
    8989
    9090        usb_multimedia_t *multim_dev = ddf_fun_data_get(fun);
     
    9595                if (multim_dev->console_sess == NULL) {
    9696                        multim_dev->console_sess = sess;
    97                         usb_log_debug(NAME " Saved session to console: %p\n",
     97                        usb_log_debug(NAME " Saved session to console: %p",
    9898                            sess);
    9999                        async_answer_0(icallid, EOK);
     
    137137        };
    138138
    139         usb_log_debug2(NAME " Sending key %d to the console\n", ev.key);
     139        usb_log_debug2(NAME " Sending key %d to the console", ev.key);
    140140        if (multim_dev->console_sess == NULL) {
    141141                usb_log_warning(
     
    149149                async_exchange_end(exch);
    150150        } else {
    151                 usb_log_warning("Failed to send multimedia key.\n");
     151                usb_log_warning("Failed to send multimedia key.");
    152152        }
    153153}
     
    159159        }
    160160
    161         usb_log_debug(NAME " Initializing HID/multimedia structure...\n");
     161        usb_log_debug(NAME " Initializing HID/multimedia structure...");
    162162
    163163        /* Create the exposed function. */
     
    165165            hid_dev->usb_dev, fun_exposed, NAME);
    166166        if (fun == NULL) {
    167                 usb_log_error("Could not create DDF function node.\n");
     167                usb_log_error("Could not create DDF function node.");
    168168                return ENOMEM;
    169169        }
     
    184184        int rc = ddf_fun_bind(fun);
    185185        if (rc != EOK) {
    186                 usb_log_error("Could not bind DDF function: %s.\n",
     186                usb_log_error("Could not bind DDF function: %s.",
    187187                    str_error(rc));
    188188                ddf_fun_destroy(fun);
     
    190190        }
    191191
    192         usb_log_debug(NAME " function created (handle: %" PRIun ").\n",
     192        usb_log_debug(NAME " function created (handle: %" PRIun ").",
    193193            ddf_fun_get_handle(fun));
    194194
     
    199199                    str_error(rc));
    200200                if (ddf_fun_unbind(fun) != EOK) {
    201                         usb_log_error("Failed to unbind %s, won't destroy.\n",
     201                        usb_log_error("Failed to unbind %s, won't destroy.",
    202202                            ddf_fun_get_name(fun));
    203203                } else {
     
    210210        *data = fun;
    211211
    212         usb_log_debug(NAME " HID/multimedia structure initialized.\n");
     212        usb_log_debug(NAME " HID/multimedia structure initialized.");
    213213        return EOK;
    214214}
     
    224224                async_hangup(multim_dev->console_sess);
    225225        if (ddf_fun_unbind(fun) != EOK) {
    226                 usb_log_error("Failed to unbind %s, won't destroy.\n",
     226                usb_log_error("Failed to unbind %s, won't destroy.",
    227227                    ddf_fun_get_name(fun));
    228228        } else {
    229                 usb_log_debug2("%s unbound.\n", ddf_fun_get_name(fun));
     229                usb_log_debug2("%s unbound.", ddf_fun_get_name(fun));
    230230                /* This frees multim_dev too as it was stored in
    231231                 * fun->data */
     
    266266        while (field != NULL) {
    267267                if (field->value != 0) {
    268                         usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n",
     268                        usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)",
    269269                            field->value, field->usage);
    270270                        const unsigned key =
     
    272272                        const char *key_str =
    273273                            usbhid_multimedia_usage_to_str(field->usage);
    274                         usb_log_info("Pressed key: %s\n", key_str);
     274                        usb_log_info("Pressed key: %s", key_str);
    275275                        usb_multimedia_push_ev(multim_dev, KEY_PRESS, key);
    276276                }
  • uspace/drv/hid/usbhid/usbhid.c

    rc1a966e ra1732929  
    134134        usb_hid_report_path_t *usage_path = usb_hid_report_path();
    135135        if (usage_path == NULL) {
    136                 usb_log_debug("Failed to create usage path.\n");
     136                usb_log_debug("Failed to create usage path.");
    137137                return false;
    138138        }
     
    143143                    mapping->usage_path[i].usage_page,
    144144                    mapping->usage_path[i].usage) != EOK) {
    145                         usb_log_debug("Failed to append to usage path.\n");
     145                        usb_log_debug("Failed to append to usage path.");
    146146                        usb_hid_report_path_free(usage_path);
    147147                        return false;
     
    149149        }
    150150
    151         usb_log_debug("Compare flags: %d\n", mapping->compare);
     151        usb_log_debug("Compare flags: %d", mapping->compare);
    152152
    153153        bool matches = false;
     
    155155
    156156        do {
    157                 usb_log_debug("Trying report id %u\n", report_id);
     157                usb_log_debug("Trying report id %u", report_id);
    158158                if (report_id != 0) {
    159159                        usb_hid_report_path_set_report_id(usage_path,
     
    166166                        USB_HID_REPORT_TYPE_INPUT);
    167167
    168                 usb_log_debug("Field: %p\n", field);
     168                usb_log_debug("Field: %p", field);
    169169
    170170                if (field != NULL) {
     
    243243                            mapping->product_id);
    244244                        if (usb_hid_ids_match(hid_dev, mapping)) {
    245                                 usb_log_debug("IDs matched.\n");
     245                                usb_log_debug("IDs matched.");
    246246                                matched = true;
    247247                        }
     
    250250                /* Check usage match. */
    251251                if (mapping->usage_path != NULL) {
    252                         usb_log_debug("Comparing device against usage path.\n");
     252                        usb_log_debug("Comparing device against usage path.");
    253253                        if (usb_hid_path_matches(hid_dev, mapping)) {
    254254                                /* Does not matter if IDs were matched. */
     
    258258
    259259                if (matched) {
    260                         usb_log_debug("Subdriver matched.\n");
     260                        usb_log_debug("Subdriver matched.");
    261261                        subdrivers[count++] = &mapping->subdriver;
    262262                }
     
    285285                    usb_device_get_mapped_ep_desc(dev, endpoints[i].desc);
    286286                if (epm && epm->present) {
    287                         usb_log_debug("Found: %s.\n", endpoints[i].description);
     287                        usb_log_debug("Found: %s.", endpoints[i].description);
    288288                        hid_dev->poll_pipe_mapping = epm;
    289289                        return EOK;
     
    301301
    302302        do {
    303                 usb_log_debug("Getting size of the report.\n");
     303                usb_log_debug("Getting size of the report.");
    304304                const size_t size =
    305305                    usb_hid_report_byte_size(&hid_dev->report, report_id,
    306306                        USB_HID_REPORT_TYPE_INPUT);
    307                 usb_log_debug("Report ID: %u, size: %zu\n", report_id, size);
     307                usb_log_debug("Report ID: %u, size: %zu", report_id, size);
    308308                max_size = (size > max_size) ? size : max_size;
    309                 usb_log_debug("Getting next report ID\n");
     309                usb_log_debug("Getting next report ID");
    310310                report_id = usb_hid_get_next_report_id(&hid_dev->report,
    311311                    report_id, USB_HID_REPORT_TYPE_INPUT);
    312312        } while (report_id != 0);
    313313
    314         usb_log_debug("Max size of input report: %zu\n", max_size);
     314        usb_log_debug("Max size of input report: %zu", max_size);
    315315
    316316        assert(hid_dev->input_report == NULL);
     
    329329{
    330330        if (dev == NULL || arg == NULL || buffer == NULL) {
    331                 usb_log_error("Missing arguments to polling callback.\n");
     331                usb_log_error("Missing arguments to polling callback.");
    332332                return false;
    333333        }
     
    336336        assert(hid_dev->input_report != NULL);
    337337
    338         usb_log_debug("New data [%zu/%zu]: %s\n", buffer_size,
     338        usb_log_debug("New data [%zu/%zu]: %s", buffer_size,
    339339            hid_dev->max_input_report_size,
    340340            usb_debug_str_buffer(buffer, buffer_size, 0));
     
    419419        assert(dev);
    420420
    421         usb_log_debug("Initializing HID structure...\n");
     421        usb_log_debug("Initializing HID structure...");
    422422
    423423        usb_hid_report_init(&hid_dev->report);
     
    441441                usb_hid_find_subdrivers(hid_dev);
    442442        } else {
    443                 usb_log_error("Failed to parse report descriptor: fallback.\n");
     443                usb_log_error("Failed to parse report descriptor: fallback.");
    444444                hid_dev->subdrivers = NULL;
    445445                hid_dev->subdriver_count = 0;
    446446        }
    447447
    448         usb_log_debug("Subdriver count(before trying boot protocol): %d\n",
     448        usb_log_debug("Subdriver count(before trying boot protocol): %d",
    449449            hid_dev->subdriver_count);
    450450
     
    457457                switch (hid_dev->poll_pipe_mapping->interface->interface_protocol) {
    458458                case USB_HID_PROTOCOL_KEYBOARD:
    459                         usb_log_info("Falling back to kbd boot protocol.\n");
     459                        usb_log_info("Falling back to kbd boot protocol.");
    460460                        rc = usb_kbd_set_boot_protocol(hid_dev);
    461461                        if (rc == EOK) {
     
    464464                        break;
    465465                case USB_HID_PROTOCOL_MOUSE:
    466                         usb_log_info("Falling back to mouse boot protocol.\n");
     466                        usb_log_info("Falling back to mouse boot protocol.");
    467467                        rc = usb_mouse_set_boot_protocol(hid_dev);
    468468                        if (rc == EOK) {
     
    471471                        break;
    472472                default:
    473                         usb_log_info("Falling back to generic HID driver.\n");
     473                        usb_log_info("Falling back to generic HID driver.");
    474474                        usb_hid_set_generic_hid_subdriver(hid_dev);
    475475                }
    476476        }
    477477
    478         usb_log_debug("Subdriver count(after trying boot protocol): %d\n",
     478        usb_log_debug("Subdriver count(after trying boot protocol): %d",
    479479            hid_dev->subdriver_count);
    480480
     
    491491        for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) {
    492492                if (hid_dev->subdrivers[i].init != NULL) {
    493                         usb_log_debug("Initializing subdriver %d.\n",i);
     493                        usb_log_debug("Initializing subdriver %d.",i);
    494494                        const int pret = hid_dev->subdrivers[i].init(hid_dev,
    495495                            &hid_dev->subdrivers[i].data);
     
    514514                rc = usb_hid_init_report(hid_dev);
    515515                if (rc != EOK) {
    516                         usb_log_error("Failed to initialize input report buffer: %s\n", str_error(rc));
     516                        usb_log_error("Failed to initialize input report buffer: %s", str_error(rc));
    517517                        // FIXME: What happens now?
    518518                }
     
    520520                usb_polling_t *polling = &hid_dev->polling;
    521521                if ((rc = usb_polling_init(polling))) {
    522                         usb_log_error("Failed to initialize polling: %s\n", str_error(rc));
     522                        usb_log_error("Failed to initialize polling: %s", str_error(rc));
    523523                        // FIXME: What happens now?
    524524                }
     
    555555        usb_polling_fini(&hid_dev->polling);
    556556
    557         usb_log_debug("Subdrivers: %p, subdriver count: %d\n",
     557        usb_log_debug("Subdrivers: %p, subdriver count: %d",
    558558            hid_dev->subdrivers, hid_dev->subdriver_count);
    559559
Note: See TracChangeset for help on using the changeset viewer.