Changeset a1732929 in mainline for uspace/drv
- Timestamp:
- 2018-01-15T17:04:34Z (8 years ago)
- 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)
- Location:
- uspace/drv
- Files:
-
- 40 edited
-
block/usbmast/bo_trans.c (modified) (3 diffs)
-
block/usbmast/main.c (modified) (9 diffs)
-
block/usbmast/scsi_ms.c (modified) (17 diffs)
-
bus/usb/ehci/ehci_batch.c (modified) (2 diffs)
-
bus/usb/ehci/ehci_rh.c (modified) (1 diff)
-
bus/usb/ehci/endpoint_list.c (modified) (4 diffs)
-
bus/usb/ehci/hc.c (modified) (5 diffs)
-
bus/usb/ehci/res.c (modified) (9 diffs)
-
bus/usb/ohci/endpoint_list.c (modified) (5 diffs)
-
bus/usb/ohci/hc.c (modified) (26 diffs)
-
bus/usb/ohci/ohci_batch.c (modified) (11 diffs)
-
bus/usb/ohci/ohci_rh.c (modified) (6 diffs)
-
bus/usb/uhci/hc.c (modified) (14 diffs)
-
bus/usb/uhci/hw_struct/transfer_descriptor.c (modified) (2 diffs)
-
bus/usb/uhci/transfer_list.c (modified) (5 diffs)
-
bus/usb/uhci/uhci_batch.c (modified) (7 diffs)
-
bus/usb/uhci/uhci_rh.c (modified) (8 diffs)
-
bus/usb/usbdiag/device.c (modified) (1 diff)
-
bus/usb/usbdiag/main.c (modified) (3 diffs)
-
bus/usb/usbdiag/tests.c (modified) (5 diffs)
-
bus/usb/usbflbk/main.c (modified) (1 diff)
-
bus/usb/usbhub/port.c (modified) (4 diffs)
-
bus/usb/usbhub/usbhub.c (modified) (13 diffs)
-
bus/usb/usbmid/dump.c (modified) (1 diff)
-
bus/usb/usbmid/explore.c (modified) (6 diffs)
-
bus/usb/usbmid/main.c (modified) (6 diffs)
-
bus/usb/vhc/conndev.c (modified) (2 diffs)
-
bus/usb/vhc/hub/hub.c (modified) (3 diffs)
-
bus/usb/vhc/main.c (modified) (4 diffs)
-
bus/usb/vhc/transfer.c (modified) (3 diffs)
-
bus/usb/xhci/bus.c (modified) (1 diff)
-
bus/usb/xhci/hc.c (modified) (3 diffs)
-
hid/usbhid/blink1/blink1.c (modified) (4 diffs)
-
hid/usbhid/generic/hiddev.c (modified) (11 diffs)
-
hid/usbhid/kbd/kbddev.c (modified) (29 diffs)
-
hid/usbhid/kbd/kbdrepeat.c (modified) (5 diffs)
-
hid/usbhid/main.c (modified) (8 diffs)
-
hid/usbhid/mouse/mousedev.c (modified) (15 diffs)
-
hid/usbhid/multimedia/multimedia.c (modified) (13 diffs)
-
hid/usbhid/usbhid.c (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/usbmast/bo_trans.c
rc1a966e ra1732929 90 90 str_error(rc)); 91 91 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)); 93 93 return EIO; 94 94 } … … 154 154 case cbs_failed: 155 155 cmd->status = CMDS_FAILED; 156 usb_log_error("CBS Failed. \n");156 usb_log_error("CBS Failed."); 157 157 break; 158 158 case cbs_phase_error: 159 usb_log_error("CBS phase error. \n");159 usb_log_error("CBS phase error."); 160 160 rc = EIO; 161 161 break; 162 162 default: 163 usb_log_error("CBS other error. \n");163 usb_log_error("CBS other error."); 164 164 rc = EIO; 165 165 break; … … 168 168 const size_t residue = uint32_usb2host(csw.dCSWDataResidue); 169 169 if (residue > dbuf_size) { 170 usb_log_error("Residue > buffer size (%zu > %zu). \n",170 usb_log_error("Residue > buffer size (%zu > %zu).", 171 171 residue, dbuf_size); 172 172 return EIO; -
uspace/drv/block/usbmast/main.c
rc1a966e ra1732929 156 156 usb_device_get_mapped_ep_desc(dev, &bulk_out_ep); 157 157 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."); 159 159 return ENOENT; 160 160 } … … 163 163 mdev = usb_device_data_alloc(dev, sizeof(usbmast_dev_t)); 164 164 if (mdev == NULL) { 165 usb_log_error("Failed allocating softstate. \n");165 usb_log_error("Failed allocating softstate."); 166 166 return ENOMEM; 167 167 } … … 169 169 mdev->usb_dev = dev; 170 170 171 usb_log_info("Initializing mass storage `%s'. \n",171 usb_log_info("Initializing mass storage `%s'.", 172 172 usb_device_get_name(dev)); 173 usb_log_debug("Bulk in endpoint: %d [%zuB]. \n",173 usb_log_debug("Bulk in endpoint: %d [%zuB].", 174 174 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].", 176 176 epm_out->pipe.desc.endpoint_no, epm_out->pipe.desc.max_transfer_size); 177 177 178 usb_log_debug("Get LUN count... \n");178 usb_log_debug("Get LUN count..."); 179 179 mdev->lun_count = usb_masstor_get_lun_count(mdev); 180 180 mdev->luns = calloc(mdev->lun_count, sizeof(ddf_fun_t*)); 181 181 if (mdev->luns == NULL) { 182 182 rc = ENOMEM; 183 usb_log_error("Failed allocating luns table. \n");183 usb_log_error("Failed allocating luns table."); 184 184 goto error; 185 185 } … … 226 226 227 227 if (asprintf(&fun_name, "l%u", lun) < 0) { 228 usb_log_error("Out of memory. \n");228 usb_log_error("Out of memory."); 229 229 rc = ENOMEM; 230 230 goto error; … … 233 233 fun = usb_device_ddf_fun_create(mdev->usb_dev, fun_exposed, fun_name); 234 234 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); 236 236 rc = ENOMEM; 237 237 goto error; … … 241 241 mfun = ddf_fun_data_alloc(fun, sizeof(usbmast_fun_t)); 242 242 if (mfun == NULL) { 243 usb_log_error("Failed allocating softstate. \n");243 usb_log_error("Failed allocating softstate."); 244 244 rc = ENOMEM; 245 245 goto error; … … 257 257 ddf_fun_set_conn_handler(fun, usbmast_bd_connection); 258 258 259 usb_log_debug("Inquire... \n");259 usb_log_debug("Inquire..."); 260 260 usbmast_inquiry_data_t inquiry; 261 261 rc = usbmast_inquiry(mfun, &inquiry); 262 262 if (rc != EOK) { 263 usb_log_warning("Failed to inquire device `%s': %s. \n",263 usb_log_warning("Failed to inquire device `%s': %s.", 264 264 usb_device_get_name(mdev->usb_dev), str_error(rc)); 265 265 rc = EIO; … … 281 281 rc = usbmast_read_capacity(mfun, &nblocks, &block_size); 282 282 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.", 284 284 usb_device_get_name(mdev->usb_dev), str_error(rc)); 285 285 rc = EIO; … … 295 295 rc = ddf_fun_bind(fun); 296 296 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.", 298 298 fun_name, str_error(rc)); 299 299 goto error; -
uspace/drv/block/usbmast/scsi_ms.c
rc1a966e ra1732929 116 116 rc = usb_massstor_unit_ready(mfun); 117 117 if (rc != EOK) { 118 usb_log_error("Inquiry transport failed, device %s: %s. \n",118 usb_log_error("Inquiry transport failed, device %s: %s.", 119 119 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 120 120 return rc; … … 123 123 rc = usb_massstor_cmd(mfun, 0xDEADBEEF, cmd); 124 124 if (rc != EOK) { 125 usb_log_error("Inquiry transport failed, device %s: %s. \n",125 usb_log_error("Inquiry transport failed, device %s: %s.", 126 126 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 127 127 return rc; … … 131 131 return EOK; 132 132 133 usb_log_error("SCSI command failed, device %s. \n",133 usb_log_error("SCSI command failed, device %s.", 134 134 usb_device_get_name(mfun->mdev->usb_dev)); 135 135 136 136 rc = usbmast_request_sense(mfun, &sense_buf, sizeof(sense_buf)); 137 137 if (rc != EOK) { 138 usb_log_error("Failed to read sense data. \n");138 usb_log_error("Failed to read sense data."); 139 139 return EIO; 140 140 } … … 182 182 183 183 if (rc != EOK) { 184 usb_log_error("Inquiry transport failed, device %s: %s. \n",184 usb_log_error("Inquiry transport failed, device %s: %s.", 185 185 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 186 186 return rc; … … 188 188 189 189 if (cmd.status != CMDS_GOOD) { 190 usb_log_error("Inquiry command failed, device %s. \n",190 usb_log_error("Inquiry command failed, device %s.", 191 191 usb_device_get_name(mfun->mdev->usb_dev)); 192 192 return EIO; … … 194 194 195 195 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).", 197 197 cmd.rcvd_size); 198 198 return EIO; … … 250 250 251 251 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.", 253 253 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 254 254 return rc; … … 292 292 293 293 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.", 295 295 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 296 296 return rc; … … 298 298 299 299 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.", 301 301 usb_device_get_name(mfun->mdev->usb_dev)); 302 302 return EIO; … … 304 304 305 305 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).", 307 307 cmd.rcvd_size); 308 308 return EIO; … … 349 349 350 350 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.", 352 352 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 353 353 return rc; … … 355 355 356 356 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.", 358 358 usb_device_get_name(mfun->mdev->usb_dev)); 359 359 return EIO; … … 361 361 362 362 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).", 364 364 cmd.rcvd_size); 365 365 return EIO; … … 405 405 406 406 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.", 408 408 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 409 409 return rc; … … 411 411 412 412 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.", 414 414 usb_device_get_name(mfun->mdev->usb_dev)); 415 415 return EIO; … … 450 450 451 451 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.", 453 453 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc)); 454 454 return rc; … … 456 456 457 457 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.", 459 459 usb_device_get_name(mfun->mdev->usb_dev)); 460 460 return EIO; -
uspace/drv/bus/usb/ehci/ehci_batch.c
rc1a966e ra1732929 143 143 batch_setup[ehci_batch->base.ep->transfer_type](ehci_batch); 144 144 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.", 146 146 ehci_batch, usb_str_direction(ehci_batch->base.dir), 147 147 USB_TRANSFER_BATCH_ARGS(ehci_batch->base)); … … 163 163 assert(ehci_batch); 164 164 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.", 166 166 ehci_batch, ehci_batch->td_count); 167 167 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.", 169 169 ehci_batch, 170 170 ehci_batch->qh->ep_char, ehci_batch->qh->ep_cap, -
uspace/drv/bus/usb/ehci/ehci_rh.c
rc1a966e ra1732929 107 107 (EHCI_RD(caps->hcsparams) >> EHCI_CAPS_HCS_N_PORTS_SHIFT) & 108 108 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, 110 110 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, 112 112 instance->port_count); 113 113 -
uspace/drv/bus/usb/ehci/endpoint_list.c
rc1a966e ra1732929 97 97 assert(ep); 98 98 assert(ep->qh); 99 usb_log_debug2("EPL(%p-%s): Append endpoint(%p). \n",99 usb_log_debug2("EPL(%p-%s): Append endpoint(%p).", 100 100 instance, instance->name, ep); 101 101 … … 128 128 ehci_endpoint_t *first = ehci_endpoint_list_instance( 129 129 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).", 131 131 instance, instance->name, ep, first, first->qh); 132 132 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.", 134 134 instance, instance->name, last_qh, 135 135 addr_to_phys(instance->list_head), … … 153 153 fibril_mutex_lock(&instance->guard); 154 154 155 usb_log_debug2("EPL(%p-%s): removing EP(%p). \n",155 usb_log_debug2("EPL(%p-%s): removing EP(%p).", 156 156 instance, instance->name, ep); 157 157 … … 172 172 write_barrier(); 173 173 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.", 175 175 instance, instance->name, ep, qpos, ep->qh->horizontal); 176 176 -
uspace/drv/bus/usb/ehci/hc.c
rc1a966e ra1732929 134 134 EHCI_WR(code->cmds[1].value, EHCI_USED_INTERRUPTS); 135 135 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.", 137 137 RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]); 138 138 … … 160 160 if (ret != EOK) { 161 161 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)); 163 163 return ret; 164 164 } … … 211 211 assert(ep); 212 212 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, 214 214 ep->device->address, ep->endpoint, 215 215 usb_str_transfer_type_short(ep->transfer_type), … … 235 235 assert(ep); 236 236 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, 238 238 ep->endpoint, 239 239 usb_str_transfer_type_short(ep->transfer_type), … … 423 423 usb_log_debug("HC(%p): HW started.", instance); 424 424 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).", 430 430 instance, 431 431 &instance->registers->usbcmd, EHCI_RD(instance->registers->usbcmd), -
uspace/drv/bus/usb/ehci/res.c
rc1a966e ra1732929 74 74 eecp + USBLEGSUP_OFFSET, &usblegsup); 75 75 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); 80 80 81 81 /* Request control from firmware/BIOS by writing 1 to highest 82 82 * byte. (OS Control semaphore)*/ 83 usb_log_debug("Requesting OS control. \n");83 usb_log_debug("Requesting OS control."); 84 84 ret = pci_config_space_write_8(parent_sess, 85 85 eecp + USBLEGSUP_OFFSET + 3, 1); 86 86 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.", 88 88 str_error(ret)); 89 89 return ret; … … 103 103 104 104 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); 106 106 return EOK; 107 107 } … … 109 109 /* BIOS failed to hand over control, this should not happen. */ 110 110 usb_log_warning( "BIOS failed to release control after " 111 "%zu usecs, force it. \n", wait);111 "%zu usecs, force it.", wait); 112 112 ret = pci_config_space_write_32(parent_sess, 113 113 eecp + USBLEGSUP_OFFSET, USBLEGSUP_OS_CONTROL); 114 114 if (ret != EOK) { 115 usb_log_error("Failed to force OS control: %s. \n",115 usb_log_error("Failed to force OS control: %s.", 116 116 str_error(ret)); 117 117 return ret; … … 130 130 eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 131 131 if (ret != EOK) { 132 usb_log_error("Failed to get USBLEGCTLSTS: %s. \n",132 usb_log_error("Failed to get USBLEGCTLSTS: %s.", 133 133 str_error(ret)); 134 134 return ret; 135 135 } 136 usb_log_debug2("USBLEGCTLSTS: %" PRIx32 ". \n", usblegctlsts);136 usb_log_debug2("USBLEGCTLSTS: %" PRIx32 ".", usblegctlsts); 137 137 /* 138 138 * Zero SMI enables in legacy control register. … … 143 143 eecp + USBLEGCTLSTS_OFFSET, 0xe0000000); 144 144 if (ret != EOK) { 145 usb_log_error("Failed to zero USBLEGCTLSTS: %s \n",145 usb_log_error("Failed to zero USBLEGCTLSTS: %s", 146 146 str_error(ret)); 147 147 return ret; … … 153 153 eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 154 154 if (ret != EOK) { 155 usb_log_error("Failed to get USBLEGCTLSTS 2: %s. \n",155 usb_log_error("Failed to get USBLEGCTLSTS 2: %s.", 156 156 str_error(ret)); 157 157 return ret; 158 158 } 159 usb_log_debug2("Zeroed USBLEGCTLSTS: %" PRIx32 ". \n",159 usb_log_debug2("Zeroed USBLEGCTLSTS: %" PRIx32 ".", 160 160 usblegctlsts); 161 161 } … … 165 165 eecp + USBLEGSUP_OFFSET, &usblegsup); 166 166 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); 172 172 return ret; 173 173 } … … 181 181 return ENOMEM; 182 182 183 usb_log_debug("Disabling EHCI legacy support. \n");183 usb_log_debug("Disabling EHCI legacy support."); 184 184 185 185 186 186 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); 188 188 189 189 /* Read value of EHCI Extended Capabilities Pointer … … 191 191 const uint32_t eecp = 192 192 (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); 194 194 195 195 int ret = disable_extended_caps(parent_sess, eecp); 196 196 if (ret != EOK) { 197 usb_log_error("Failed to disable extended capabilities: %s. \n",197 usb_log_error("Failed to disable extended capabilities: %s.", 198 198 str_error(ret)); 199 199 goto clean; -
uspace/drv/bus/usb/ohci/endpoint_list.c
rc1a966e ra1732929 57 57 instance->list_head = malloc32(sizeof(ed_t)); 58 58 if (!instance->list_head) { 59 usb_log_error("Failed to allocate list head. \n");59 usb_log_error("Failed to allocate list head."); 60 60 return ENOMEM; 61 61 } 62 62 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 ")).", 64 64 name, instance->list_head, instance->list_head_pa); 65 65 … … 96 96 assert(instance); 97 97 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); 99 99 100 100 fibril_mutex_lock(&instance->guard); … … 126 126 ohci_endpoint_t *first = list_get_instance( 127 127 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).", 129 129 ep, instance->name, first, first->ed); 130 130 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.", 132 132 instance->name, last_ed, instance->list_head_pa, 133 133 last_ed->status, last_ed->td_tail, last_ed->td_head, … … 151 151 fibril_mutex_lock(&instance->guard); 152 152 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); 154 154 155 155 const char *qpos = NULL; … … 171 171 write_barrier(); 172 172 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.", 174 174 ep, qpos, instance->name, ep->ed->next); 175 175 -
uspace/drv/bus/usb/ohci/hc.c
rc1a966e ra1732929 136 136 OHCI_WR(code->cmds[1].value, OHCI_USED_INTERRUPTS); 137 137 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.", 139 139 RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]); 140 140 … … 160 160 (void **) &instance->registers); 161 161 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.", 163 163 str_error(ret)); 164 164 return ret; 165 165 } 166 usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible. \n",166 usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible.", 167 167 hw_res->mem_ranges.ranges[0].address.absolute, 168 168 hw_res->mem_ranges.ranges[0].size); … … 173 173 ret = hc_init_memory(instance); 174 174 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.", 176 176 str_error(ret)); 177 177 // TODO: We should disable pio access here … … 293 293 /* Check for root hub communication */ 294 294 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."); 296 296 return ohci_rh_schedule(&hc->rh, batch); 297 297 } … … 341 341 if ((status & ~I_SF) == 0) /* ignore sof status */ 342 342 return; 343 usb_log_debug2("OHCI(%p) interrupt: %x. \n", hc, status);343 usb_log_debug2("OHCI(%p) interrupt: %x.", hc, status); 344 344 if (status & I_RHSC) 345 345 ohci_rh_interrupt(&hc->rh); … … 347 347 if (status & I_WDH) { 348 348 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, 350 350 OHCI_RD(hc->registers->hcca), 351 351 (void *) addr_to_phys(hc->hcca)); 352 usb_log_debug2("Periodic current: %#" PRIx32 ". \n",352 usb_log_debug2("Periodic current: %#" PRIx32 ".", 353 353 OHCI_RD(hc->registers->periodic_current)); 354 354 … … 370 370 371 371 if (status & I_UE) { 372 usb_log_fatal("Error like no other! \n");372 usb_log_fatal("Error like no other!"); 373 373 hc_start(&hc->base); 374 374 } … … 387 387 hc_t *instance = hcd_to_hc(hcd); 388 388 389 usb_log_debug("Requesting OHCI control. \n");389 usb_log_debug("Requesting OHCI control."); 390 390 if (OHCI_RD(instance->registers->revision) & R_LEGACY_FLAG) { 391 391 /* Turn off legacy emulation, it should be enough to zero … … 396 396 volatile uint32_t *ohci_emulation_reg = 397 397 (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.", 399 399 ohci_emulation_reg, OHCI_RD(*ohci_emulation_reg)); 400 400 /* Zero everything but A20State */ … … 402 402 OHCI_CLR(*ohci_emulation_reg, ~0x100); 403 403 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.", 405 405 ohci_emulation_reg, OHCI_RD(*ohci_emulation_reg)); 406 406 } … … 408 408 /* Interrupt routing enabled => smm driver is active */ 409 409 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."); 411 411 // TODO: should we ack interrupts before doing this? 412 412 OHCI_SET(instance->registers->command_status, CS_OCR); … … 415 415 async_usleep(1000); 416 416 } 417 usb_log_info("SMM driver: Ownership taken. \n");417 usb_log_info("SMM driver: Ownership taken."); 418 418 C_HCFS_SET(instance->registers->control, C_HCFS_RESET); 419 419 async_usleep(50000); … … 424 424 /* Interrupt routing disabled && status != USB_RESET => BIOS active */ 425 425 if (hc_status != C_HCFS_RESET) { 426 usb_log_debug("BIOS driver found. \n");426 usb_log_debug("BIOS driver found."); 427 427 if (hc_status == C_HCFS_OPERATIONAL) { 428 usb_log_info("BIOS driver: HC operational. \n");428 usb_log_info("BIOS driver: HC operational."); 429 429 return EOK; 430 430 } … … 432 432 C_HCFS_SET(instance->registers->control, C_HCFS_RESUME); 433 433 async_usleep(20000); 434 usb_log_info("BIOS driver: HC resumed. \n");434 usb_log_info("BIOS driver: HC resumed."); 435 435 return EOK; 436 436 } … … 438 438 /* HC is in reset (hw startup) => no other driver 439 439 * 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."); 441 441 async_usleep(50000); 442 442 return EOK; … … 454 454 /* OHCI guide page 42 */ 455 455 assert(instance); 456 usb_log_debug2("Started hc initialization routine. \n");456 usb_log_debug2("Started hc initialization routine."); 457 457 458 458 /* Save contents of fm_interval register */ 459 459 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); 461 461 462 462 /* Reset hc */ 463 usb_log_debug2("HC reset. \n");463 usb_log_debug2("HC reset."); 464 464 size_t time = 0; 465 465 OHCI_WR(instance->registers->command_status, CS_HCR); … … 468 468 time += 10; 469 469 } 470 usb_log_debug2("HC reset complete in %zu us. \n", time);470 usb_log_debug2("HC reset complete in %zu us.", time); 471 471 472 472 /* Restore fm_interval */ … … 475 475 476 476 /* 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).", 478 478 OHCI_RD(instance->registers->control)); 479 479 … … 484 484 OHCI_WR(instance->registers->bulk_head, 485 485 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 ").", 487 487 instance->lists[USB_TRANSFER_BULK].list_head, 488 488 instance->lists[USB_TRANSFER_BULK].list_head_pa); … … 490 490 OHCI_WR(instance->registers->control_head, 491 491 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 ").", 493 493 instance->lists[USB_TRANSFER_CONTROL].list_head, 494 494 instance->lists[USB_TRANSFER_CONTROL].list_head_pa); … … 496 496 /* Enable queues */ 497 497 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).", 499 499 OHCI_RD(instance->registers->control)); 500 500 … … 503 503 OHCI_WR(instance->registers->interrupt_enable, 504 504 OHCI_USED_INTERRUPTS); 505 usb_log_debug("Enabled interrupts: %x. \n",505 usb_log_debug("Enabled interrupts: %x.", 506 506 OHCI_RD(instance->registers->interrupt_enable)); 507 507 OHCI_WR(instance->registers->interrupt_enable, I_MI); … … 513 513 OHCI_WR(instance->registers->periodic_start, 514 514 ((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).", 516 516 OHCI_RD(instance->registers->periodic_start), 517 517 OHCI_RD(instance->registers->periodic_start), frame_length); 518 518 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).", 520 520 OHCI_RD(instance->registers->control)); 521 521 … … 536 536 const int ret = endpoint_list_init(&instance->lists[type], name); \ 537 537 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.", \ 539 539 name, str_error(ret)); \ 540 540 endpoint_list_fini(&instance->lists[USB_TRANSFER_ISOCHRONOUS]);\ … … 577 577 if (instance->hcca == NULL) 578 578 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); 580 580 581 581 for (unsigned i = 0; i < HCCA_INT_EP_COUNT; ++i) { … … 583 583 instance->lists[USB_TRANSFER_INTERRUPT].list_head_pa); 584 584 } 585 usb_log_debug2("Interrupt HEADs set to: %p (%#" PRIx32 "). \n",585 usb_log_debug2("Interrupt HEADs set to: %p (%#" PRIx32 ").", 586 586 instance->lists[USB_TRANSFER_INTERRUPT].list_head, 587 587 instance->lists[USB_TRANSFER_INTERRUPT].list_head_pa); -
uspace/drv/bus/usb/ohci/ohci_batch.c
rc1a966e ra1732929 175 175 assert(ohci_batch); 176 176 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.", 178 178 &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.", 180 180 ohci_batch->ed->status, ohci_batch->ed->td_head, 181 181 ohci_batch->ed->td_tail, ohci_batch->ed->next); … … 196 196 for (size_t i = 0; i < ohci_batch->td_count; ++i) { 197 197 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, 199 199 ohci_batch->tds[i]->status, ohci_batch->tds[i]->cbp, 200 200 ohci_batch->tds[i]->next, ohci_batch->tds[i]->be); … … 217 217 -= td_remain_size(ohci_batch->tds[i]); 218 218 } else { 219 usb_log_debug("Batch %p found error TD(%zu):%08x. \n",219 usb_log_debug("Batch %p found error TD(%zu):%08x.", 220 220 &ohci_batch->base, i, 221 221 ohci_batch->tds[i]->status); … … 295 295 assert(dir == USB_DIRECTION_IN || dir == USB_DIRECTION_OUT); 296 296 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, 298 298 ohci_batch->ed->status, ohci_batch->ed->td_tail, 299 299 ohci_batch->ed->td_head, ohci_batch->ed->next); … … 312 312 ohci_batch->tds[0], ohci_batch->tds[1], USB_DIRECTION_BOTH, 313 313 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.", 315 315 ohci_batch->tds[0]->status, ohci_batch->tds[0]->cbp, 316 316 ohci_batch->tds[0]->next, ohci_batch->tds[0]->be); … … 328 328 ohci_batch->tds[td_current + 1], 329 329 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.", 331 331 ohci_batch->tds[td_current]->status, 332 332 ohci_batch->tds[td_current]->cbp, … … 344 344 td_init(ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1], 345 345 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.", 347 347 ohci_batch->tds[td_current]->status, 348 348 ohci_batch->tds[td_current]->cbp, … … 350 350 ohci_batch->tds[td_current]->be); 351 351 usb_log_debug2( 352 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized. \n", \352 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \ 353 353 &ohci_batch->base, 354 354 usb_str_transfer_type(ohci_batch->base.ep->transfer_type), … … 371 371 usb_direction_t dir = ohci_batch->base.dir; 372 372 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, 374 374 ohci_batch->ed->status, ohci_batch->ed->td_tail, 375 375 ohci_batch->ed->td_head, ohci_batch->ed->next); … … 386 386 dir, buffer, transfer_size, -1); 387 387 388 usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x. \n",388 usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x.", 389 389 ohci_batch->tds[td_current]->status, 390 390 ohci_batch->tds[td_current]->cbp, … … 398 398 } 399 399 usb_log_debug2( 400 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized. \n", \400 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \ 401 401 &ohci_batch->base, 402 402 usb_str_transfer_type(ohci_batch->base.ep->transfer_type), -
uspace/drv/bus/usb/ohci/ohci_rh.c
rc1a966e ra1732929 114 114 instance->registers = regs; 115 115 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)); 117 117 if (instance->port_count > OHCI_MAX_PORTS) { 118 118 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, 120 120 OHCI_MAX_PORTS); 121 121 instance->port_count = OHCI_MAX_PORTS; 122 122 } 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); 124 124 125 125 #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); 127 127 /* Set port power mode to no power-switching. (always on) */ 128 128 OHCI_SET(regs->rh_desc_a, RHDA_NPS_FLAG); … … 132 132 133 133 #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); 135 135 /* Set port power mode to ganged power-switching. */ 136 136 OHCI_CLR(regs->rh_desc_a, RHDA_NPS_FLAG); … … 144 144 OHCI_CLR(regs->rh_desc_a, RHDA_OCPM_FLAG); 145 145 #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); 147 147 /* Set port power mode to per port power-switching. */ 148 148 OHCI_CLR(regs->rh_desc_a, RHDA_NPS_FLAG); … … 356 356 case USB_HUB_FEATURE_C_PORT_RESET: /*20*/ 357 357 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); 359 359 /* Bit offsets correspond to the feature number */ 360 360 OHCI_WR(hub->registers->rh_port_status[port], … … 405 405 case USB_HUB_FEATURE_PORT_RESET: /*4*/ 406 406 usb_log_debug2("Setting port POWER, ENABLE, SUSPEND or RESET " 407 "on port %u. \n", port);407 "on port %u.", port); 408 408 /* Bit offsets correspond to the feature number */ 409 409 OHCI_WR(hub->registers->rh_port_status[port], 1 << feature); … … 451 451 } 452 452 453 usb_log_debug2("OHCI root hub interrupt mask: %hx. \n", mask);453 usb_log_debug2("OHCI root hub interrupt mask: %hx.", mask); 454 454 455 455 if (mask == 0) -
uspace/drv/bus/usb/uhci/hc.c
rc1a966e ra1732929 141 141 code->cmds[3].addr = (void*)®isters->usbsts; 142 142 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.", 144 144 RNGABSPTR(regs), RNGSZ(regs), hw_res->irqs.irqs[0]); 145 145 … … 182 182 /* Resume interrupts are not supported */ 183 183 if (status & UHCI_STATUS_RESUME) { 184 usb_log_error("Resume interrupt! \n");184 usb_log_error("Resume interrupt!"); 185 185 } 186 186 187 187 /* Bits 4 and 5 indicate hc error */ 188 188 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!."); 190 190 ++instance->hw_failures; 191 191 transfer_list_abort_all(&instance->transfers_interrupt); … … 198 198 hc_init_hw(instance); 199 199 } else { 200 usb_log_fatal("Too many UHCI hardware failures!. \n");200 usb_log_fatal("Too many UHCI hardware failures!."); 201 201 hc_gone(&instance->base); 202 202 } … … 229 229 (void **) &instance->registers); 230 230 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.", 232 232 str_error(ret)); 233 233 return ret; 234 234 } 235 235 236 usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible. \n",236 usb_log_debug("Device registers at %" PRIx64 " (%zuB) accessible.", 237 237 hw_res->io_ranges.ranges[0].address.absolute, 238 238 hw_res->io_ranges.ranges[0].size); … … 240 240 ret = hc_init_mem_structures(instance, hcd); 241 241 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.", 243 243 str_error(ret)); 244 244 // TODO: we should disable pio here … … 304 304 const uint16_t cmd = pio_read_16(®isters->usbcmd); 305 305 if (cmd != 0) 306 usb_log_warning("Previous command value: %x. \n", cmd);306 usb_log_warning("Previous command value: %x.", cmd); 307 307 308 308 /* Start the hc with large(64B) packet FSBR */ … … 399 399 return ENOMEM; 400 400 } 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); 402 402 403 403 /* Init transfer lists */ 404 404 int ret = hc_init_transfer_lists(instance); 405 405 if (ret != EOK) { 406 usb_log_error("Failed to initialize transfer lists. \n");406 usb_log_error("Failed to initialize transfer lists."); 407 407 return_page(instance->frame_list); 408 408 return ENOMEM; 409 409 } 410 usb_log_debug("Initialized transfer lists. \n");410 usb_log_debug("Initialized transfer lists."); 411 411 412 412 … … 438 438 int ret = transfer_list_init(&instance->transfers_##type, name); \ 439 439 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.", \ 441 441 name, str_error(ret)); \ 442 442 transfer_list_fini(&instance->transfers_bulk_full); \ … … 552 552 553 553 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", 555 555 cmd, sts, intr); 556 556 } … … 559 559 pio_read_32(&instance->registers->flbaseadd) & ~0xfff; 560 560 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.", 562 562 (void *) frame_list, 563 563 (void *) addr_to_phys(instance->frame_list)); … … 570 570 uintptr_t real_pa = addr_to_phys(QH(interrupt)); 571 571 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.", 573 573 (void *) expected_pa, frnum, (void *) real_pa); 574 574 } … … 577 577 real_pa = addr_to_phys(QH(control_slow)); 578 578 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.", 580 580 (void *) expected_pa, (void *) real_pa); 581 581 } … … 584 584 real_pa = addr_to_phys(QH(control_full)); 585 585 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.", 587 587 (void *) expected_pa, (void *) real_pa); 588 588 } … … 591 591 real_pa = addr_to_phys(QH(bulk_full)); 592 592 if (expected_pa != real_pa ) { 593 usb_log_debug("Bulk QH: %p vs. %p. \n",593 usb_log_debug("Bulk QH: %p vs. %p.", 594 594 (void *) expected_pa, (void *) real_pa); 595 595 } -
uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.c
rc1a966e ra1732929 104 104 instance->buffer_ptr = addr_to_phys(buffer); 105 105 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).", 107 107 instance, instance->next, instance->status, instance->device, 108 108 instance->buffer_ptr, buffer); 109 109 td_print_status(instance); 110 110 if (pid == USB_PID_SETUP) { 111 usb_log_debug2("SETUP BUFFER: %s \n",111 usb_log_debug2("SETUP BUFFER: %s", 112 112 usb_debug_str_buffer(buffer, 8, 8)); 113 113 } … … 160 160 assert(instance); 161 161 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.", 163 163 instance, instance->status, 164 164 (s & TD_STATUS_SPD_FLAG) ? " SPD," : "", -
uspace/drv/bus/usb/uhci/transfer_list.c
rc1a966e ra1732929 59 59 instance->queue_head = malloc32(sizeof(qh_t)); 60 60 if (!instance->queue_head) { 61 usb_log_error("Failed to allocate queue head. \n");61 usb_log_error("Failed to allocate queue head."); 62 62 return ENOMEM; 63 63 } 64 64 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" ).", 66 66 name, instance->queue_head, queue_head_pa); 67 67 … … 120 120 fibril_mutex_unlock(&ep->guard); 121 121 122 usb_log_debug2("Batch %p adding to queue %s. \n",122 usb_log_debug2("Batch %p adding to queue %s.", 123 123 uhci_batch, instance->name); 124 124 … … 150 150 151 151 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT 152 " scheduled in queue %s. \n", uhci_batch,152 " scheduled in queue %s.", uhci_batch, 153 153 USB_TRANSFER_BATCH_ARGS(uhci_batch->base), instance->name); 154 154 fibril_mutex_unlock(&instance->guard); … … 213 213 assert(fibril_mutex_is_locked(&instance->guard)); 214 214 215 usb_log_debug2("Batch %p removing from queue %s. \n",215 usb_log_debug2("Batch %p removing from queue %s.", 216 216 uhci_batch, instance->name); 217 217 … … 236 236 list_remove(&uhci_batch->link); 237 237 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, 239 239 USB_TRANSFER_BATCH_ARGS(uhci_batch->base), 240 240 qpos, instance->name, uhci_batch->qh->next); -
uspace/drv/bus/usb/uhci/uhci_batch.c
rc1a966e ra1732929 75 75 calloc(1, sizeof(uhci_transfer_batch_t)); 76 76 if (!uhci_batch) { 77 usb_log_error("Failed to allocate UHCI batch. \n");77 usb_log_error("Failed to allocate UHCI batch."); 78 78 return NULL; 79 79 } … … 112 112 uhci_batch->device_buffer = malloc32(total_size); 113 113 if (!uhci_batch->device_buffer) { 114 usb_log_error("Failed to allocate UHCI buffer. \n");114 usb_log_error("Failed to allocate UHCI buffer."); 115 115 return ENOMEM; 116 116 } … … 135 135 } 136 136 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT 137 " memory structures ready. \n", usb_batch,137 " memory structures ready.", usb_batch, 138 138 USB_TRANSFER_BATCH_ARGS(*usb_batch)); 139 139 … … 159 159 160 160 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT 161 " checking %zu transfer(s) for completion. \n",161 " checking %zu transfer(s) for completion.", 162 162 uhci_batch, USB_TRANSFER_BATCH_ARGS(*batch), 163 163 uhci_batch->td_count); … … 174 174 175 175 usb_log_debug("Batch %p found error TD(%zu->%p):%" 176 PRIx32 ". \n", uhci_batch, i,176 PRIx32 ".", uhci_batch, i, 177 177 &uhci_batch->tds[i], uhci_batch->tds[i].status); 178 178 td_print_status(&uhci_batch->tds[i]); … … 260 260 uhci_batch->base.ep->toggle = toggle; 261 261 usb_log_debug2( 262 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized. \n", \262 "Batch %p %s %s " USB_TRANSFER_BATCH_FMT " initialized.", \ 263 263 uhci_batch, 264 264 usb_str_transfer_type(uhci_batch->base.ep->transfer_type), … … 333 333 td_set_ioc(&uhci_batch->tds[td]); 334 334 335 usb_log_debug2("Control last TD status: %x. \n",335 usb_log_debug2("Control last TD status: %x.", 336 336 uhci_batch->tds[td].status); 337 337 } -
uspace/drv/bus/usb/uhci/uhci_rh.c
rc1a966e ra1732929 202 202 data[0] = ((value & STATUS_LINE_D_MINUS) ? 1 : 0) 203 203 | ((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")", 205 205 data[0], value); 206 206 *act_size = 1; … … 248 248 ); 249 249 RH_DEBUG(hub, port, "Port status %" PRIx32 " (source %" PRIx16 250 "%s) \n", uint32_usb2host(status), val,250 "%s)", uint32_usb2host(status), val, 251 251 hub->reset_changed[port] ? "-reset" : ""); 252 252 memcpy(data, &status, sizeof(status)); … … 276 276 case USB_HUB_FEATURE_PORT_ENABLE: 277 277 RH_DEBUG(hub, port, "Clear port enable (status %" 278 PRIx16 ") \n", status);278 PRIx16 ")", status); 279 279 pio_write_16(hub->ports[port], val & ~STATUS_ENABLED); 280 280 break; 281 281 case USB_HUB_FEATURE_PORT_SUSPEND: 282 282 RH_DEBUG(hub, port, "Clear port suspend (status %" 283 PRIx16 ") \n", status);283 PRIx16 ")", status); 284 284 pio_write_16(hub->ports[port], val & ~STATUS_SUSPEND); 285 285 // 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); 287 287 break; 288 288 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 ")", 290 290 status); 291 291 /* 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); 293 293 break; 294 294 case USB_HUB_FEATURE_C_PORT_CONNECTION: 295 295 RH_DEBUG(hub, port, "Clear port conn change (status %" 296 PRIx16 ") \n", status);296 PRIx16 ")", status); 297 297 pio_write_16(hub->ports[port], val | STATUS_CONNECTED_CHANGED); 298 298 break; 299 299 case USB_HUB_FEATURE_C_PORT_RESET: 300 300 RH_DEBUG(hub, port, "Clear port reset change (status %" 301 PRIx16 ") \n", status);301 PRIx16 ")", status); 302 302 hub->reset_changed[port] = false; 303 303 break; 304 304 case USB_HUB_FEATURE_C_PORT_ENABLE: 305 305 RH_DEBUG(hub, port, "Clear port enable change (status %" 306 PRIx16 ") \n", status);306 PRIx16 ")", status); 307 307 pio_write_16(hub->ports[port], status | STATUS_ENABLED_CHANGED); 308 308 break; 309 309 case USB_HUB_FEATURE_C_PORT_SUSPEND: 310 310 RH_DEBUG(hub, port, "Clear port suspend change (status %" 311 PRIx16 ") \n", status);311 PRIx16 ")", status); 312 312 //TODO 313 313 return ENOTSUP; 314 314 case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: 315 315 RH_DEBUG(hub, port, "Clear port OC change (status %" 316 PRIx16 ") \n", status);316 PRIx16 ")", status); 317 317 /* UHCI Does not report over current */ 318 318 //TODO: newer chips do, but some have broken wiring … … 320 320 default: 321 321 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", 324 324 feature); 325 325 return ESTALL; … … 348 348 case USB_HUB_FEATURE_PORT_RESET: 349 349 RH_DEBUG(hub, port, "Set port reset before (status %" PRIx16 350 ") \n", status);350 ")", status); 351 351 uhci_port_reset_enable(hub->ports[port]); 352 352 hub->reset_changed[port] = true; 353 353 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])); 355 355 break; 356 356 case USB_HUB_FEATURE_PORT_SUSPEND: 357 357 RH_DEBUG(hub, port, "Set port suspend (status %" PRIx16 358 ") \n", status);358 ")", status); 359 359 pio_write_16(hub->ports[port], 360 360 (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); 362 362 break; 363 363 case USB_HUB_FEATURE_PORT_POWER: 364 364 RH_DEBUG(hub, port, "Set port power (status %" PRIx16 365 ") \n", status);365 ")", status); 366 366 /* 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); 368 368 break; 369 369 case USB_HUB_FEATURE_C_PORT_CONNECTION: … … 372 372 case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: 373 373 RH_DEBUG(hub, port, "Set port change flag (status %" PRIx16 374 ") \n", status);374 ")", status); 375 375 /* These are voluntary and don't have to be set 376 376 * there is no way we could do it on UHCI anyway */ … … 378 378 default: 379 379 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", 382 382 feature); 383 383 return ESTALL; … … 418 418 RH_DEBUG(hub, -1, "Event mask %" PRIx8 419 419 " (status_a %" PRIx16 "%s)," 420 " (status_b %" PRIx16 "%s) \n", status,420 " (status_b %" PRIx16 "%s)", status, 421 421 status_a, hub->reset_changed[0] ? "-reset" : "", 422 422 status_b, hub->reset_changed[1] ? "-reset" : "" ); -
uspace/drv/bus/usb/usbdiag/device.c
rc1a966e ra1732929 79 79 usb_endpoint_mapping_t *epm = usb_device_get_mapped_ep(dev->usb_dev, USBDIAG_EP_##ep_no);\ 80 80 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 ".");\ 82 82 rc = ENOENT;\ 83 83 goto err_fun;\ -
uspace/drv/bus/usb/usbdiag/main.c
rc1a966e ra1732929 52 52 usbdiag_dev_t *diag_dev; 53 53 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)); 55 55 goto err; 56 56 } 57 57 58 58 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)); 60 60 goto err_create; 61 61 } … … 96 96 97 97 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)); 99 99 goto err; 100 100 } … … 117 117 118 118 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)); 120 120 goto err; 121 121 } -
uspace/drv/bus/usb/usbdiag/tests.c
rc1a966e ra1732929 68 68 while (remaining > 0) { 69 69 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)); 71 71 break; 72 72 } 73 73 74 74 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)); 76 76 rc = EINVAL; 77 77 break; … … 121 121 // Write buffer to device. 122 122 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)); 124 124 break; 125 125 } … … 169 169 while (remaining > 0) { 170 170 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)); 172 172 break; 173 173 } 174 174 175 175 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)); 177 177 rc = EINVAL; 178 178 break; … … 187 187 for (size_t i = 0; i < size; i += sizeof(test_data)) { 188 188 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); 190 190 rc = EINVAL; 191 191 break; … … 238 238 // Write buffer to device. 239 239 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)); 241 241 break; 242 242 } -
uspace/drv/bus/usb/usbflbk/main.c
rc1a966e ra1732929 48 48 static int usbfallback_device_add(usb_device_t *dev) 49 49 { 50 usb_log_info("Pretending to control %s `%s'. \n",50 usb_log_info("Pretending to control %s `%s'.", 51 51 usb_device_get_iface_number(dev) < 0 ? "device" : "interface", 52 52 usb_device_get_name(dev)); -
uspace/drv/bus/usb/usbhub/port.c
rc1a966e ra1732929 141 141 assert(port); 142 142 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); 144 144 145 145 usb_port_status_t status = 0; 146 146 const int opResult = get_port_status(port, &status); 147 147 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, 149 149 port->port_number, str_error(opResult)); 150 150 return; … … 155 155 const bool connected = 156 156 (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, 158 158 port->port_number, connected ? "attached" : "removed"); 159 159 … … 189 189 if (status & USB_HUB_PORT_C_STATUS_ENABLED) { 190 190 // 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, 192 192 port->port_number); 193 193 usb_hub_port_device_gone(port, hub); … … 294 294 if (enabled) { 295 295 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, 297 297 port->port_number); 298 298 } else { -
uspace/drv/bus/usb/usbhub/usbhub.c
rc1a966e ra1732929 117 117 usb_device_data_alloc(usb_dev, sizeof(usb_hub_dev_t)); 118 118 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."); 120 120 return ENOMEM; 121 121 } … … 129 129 int opResult = usb_set_first_configuration(usb_dev); 130 130 if (opResult != EOK) { 131 usb_log_error("Could not set hub configuration: %s \n",131 usb_log_error("Could not set hub configuration: %s", 132 132 str_error(opResult)); 133 133 return opResult; … … 137 137 opResult = usb_hub_process_hub_specific_info(hub_dev); 138 138 if (opResult != EOK) { 139 usb_log_error("Could process hub specific info, %s \n",139 usb_log_error("Could process hub specific info, %s", 140 140 str_error(opResult)); 141 141 return opResult; … … 143 143 144 144 /* 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 "'."); 146 146 hub_dev->hub_fun = usb_device_ddf_fun_create(hub_dev->usb_device, 147 147 fun_exposed, HUB_FNC_NAME); 148 148 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."); 150 150 return ENOMEM; 151 151 } … … 154 154 opResult = ddf_fun_bind(hub_dev->hub_fun); 155 155 if (opResult != EOK) { 156 usb_log_error("Failed to bind hub function: %s. \n",156 usb_log_error("Failed to bind hub function: %s.", 157 157 str_error(opResult)); 158 158 ddf_fun_destroy(hub_dev->hub_fun); … … 167 167 ddf_fun_unbind(hub_dev->hub_fun); 168 168 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.", 170 170 str_error(opResult)); 171 171 return opResult; … … 189 189 ddf_fun_unbind(hub_dev->hub_fun); 190 190 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.", 192 192 str_error(opResult)); 193 193 return opResult; … … 195 195 196 196 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).", 198 198 usb_device_get_name(hub_dev->usb_device), hub_dev, 199 199 hub_dev->port_count); … … 335 335 sizeof(usb_hub_descriptor_header_t), &received_size); 336 336 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.", 338 338 hub_dev, str_error(opResult)); 339 339 return opResult; 340 340 } 341 341 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, 343 343 descriptor.port_count); 344 344 hub_dev->port_count = descriptor.port_count; … … 365 365 } 366 366 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, 368 368 hub_dev->per_port_power ? "per port" : "ganged"); 369 369 … … 374 374 375 375 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.", 377 377 hub_dev, hub_dev->ports[port].port_number, 378 378 str_error(ret)); … … 402 402 const size_t configuration_count = 403 403 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); 405 405 406 406 if (configuration_count < 1) { 407 usb_log_error("There are no configurations available \n");407 usb_log_error("There are no configurations available"); 408 408 return EINVAL; 409 409 } … … 426 426 config_descriptor->configuration_number); 427 427 if (opResult != EOK) { 428 usb_log_error("Failed to set hub configuration: %s. \n",428 usb_log_error("Failed to set hub configuration: %s.", 429 429 str_error(opResult)); 430 430 } else { 431 usb_log_debug("\tUsed configuration %d \n",431 usb_log_debug("\tUsed configuration %d", 432 432 config_descriptor->configuration_number); 433 433 } -
uspace/drv/bus/usb/usbmid/dump.c
rc1a966e ra1732929 56 56 usb_standard_interface_descriptor_t *descriptor 57 57 = (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).", 59 59 usb_str_class(descriptor->interface_class), 60 60 (int) descriptor->interface_class, -
uspace/drv/bus/usb/usbmid/explore.c
rc1a966e ra1732929 106 106 107 107 108 usb_log_info("Creating child for interface %d (%s). \n",108 usb_log_info("Creating child for interface %d (%s).", 109 109 interface->interface_number, 110 110 usb_str_class(interface->interface_class)); … … 144 144 dev_class, usb_str_class(dev_class), 145 145 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."); 147 147 return ENOTSUP; 148 148 } … … 160 160 config_descriptor->configuration_number); 161 161 if (rc != EOK) { 162 usb_log_error("Failed to set device configuration: %s. \n",162 usb_log_error("Failed to set device configuration: %s.", 163 163 str_error(rc)); 164 164 return rc; … … 168 168 usb_mid_t *usb_mid = usb_device_data_alloc(dev, sizeof(usb_mid_t)); 169 169 if (!usb_mid) { 170 usb_log_error("Failed to create USB MID structure. \n");170 usb_log_error("Failed to create USB MID structure."); 171 171 return ENOMEM; 172 172 } … … 175 175 usb_mid->ctl_fun = usb_device_ddf_fun_create(dev, fun_exposed, "ctl"); 176 176 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."); 178 178 return ENOMEM; 179 179 } … … 182 182 rc = ddf_fun_bind(usb_mid->ctl_fun); 183 183 if (rc != EOK) { 184 usb_log_error("Failed to bind control function: %s. \n",184 usb_log_error("Failed to bind control function: %s.", 185 185 str_error(rc)); 186 186 ddf_fun_destroy(usb_mid->ctl_fun); -
uspace/drv/bus/usb/usbmid/main.c
rc1a966e ra1732929 51 51 static int usbmid_device_add(usb_device_t *dev) 52 52 { 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)); 54 54 55 55 return usbmid_explore_device(dev); … … 68 68 const int pret = usbmid_interface_destroy(iface); 69 69 if (pret != EOK) { 70 usb_log_error("Failed to remove child `%s': %s \n",70 usb_log_error("Failed to remove child `%s': %s", 71 71 ddf_fun_get_name(iface->fun), str_error(pret)); 72 72 ret = pret; … … 91 91 int ret = ddf_fun_unbind(usb_mid->ctl_fun); 92 92 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.", 94 94 str_error(ret)); 95 95 return ret; … … 99 99 /* Remove all children */ 100 100 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'.", 102 102 ddf_fun_get_name(iface->fun)); 103 103 … … 105 105 int pret = ddf_fun_offline(iface->fun); 106 106 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", 108 108 ddf_fun_get_name(iface->fun), str_error(pret)); 109 109 ret = pret; … … 125 125 assert(usb_mid); 126 126 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)); 128 128 129 129 /* Remove ctl function */ 130 130 int ret = ddf_fun_unbind(usb_mid->ctl_fun); 131 131 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.", 133 133 str_error(ret)); 134 134 return ret; -
uspace/drv/bus/usb/vhc/conndev.c
rc1a966e ra1732929 113 113 receive_device_name(callback); 114 114 115 usb_log_info("New virtual device `%s' (id: %" PRIxn "). \n",115 usb_log_info("New virtual device `%s' (id: %" PRIxn ").", 116 116 plugged_device_name, plugged_device_handle); 117 117 } else … … 130 130 131 131 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 ").", 133 133 plugged_device_name, plugged_device_handle); 134 134 vhc_virtdev_unplug(vhc, plugged_device_handle); -
uspace/drv/bus/usb/vhc/hub/hub.c
rc1a966e ra1732929 231 231 } 232 232 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); 234 234 235 235 switch (state) { … … 423 423 uint16_t old_value = port->status_change; 424 424 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", 426 426 port->index, 427 427 (unsigned int) old_value, (unsigned int) port->status_change); … … 510 510 fid_t fibril = fibril_create(set_port_state_delayed_fibril, change); 511 511 if (fibril == 0) { 512 printf("Failed to create fibril\n");512 usb_log_error("Failed to create fibril."); 513 513 free(change); 514 514 return; -
uspace/drv/bus/usb/vhc/main.c
rc1a966e ra1732929 77 77 int ret = hcd_ddf_setup_hc(dev, sizeof(vhc_data_t)); 78 78 if (ret != EOK) { 79 usb_log_error("Failed to init HCD structures: %s. \n",79 usb_log_error("Failed to init HCD structures: %s.", 80 80 str_error(ret)); 81 81 return ret; … … 90 90 ret = vhc_control_node(dev, &ctl_fun); 91 91 if (ret != EOK) { 92 usb_log_error("Failed to setup control node. \n");92 usb_log_error("Failed to setup control node."); 93 93 return ret; 94 94 } … … 97 97 ret = vhc_virtdev_plug_hub(vhc, &vhc->hub, NULL, 0); 98 98 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)); 100 100 ddf_fun_destroy(ctl_fun); 101 101 return ret; … … 108 108 ret = hcd_setup_virtual_root_hub(&vhc->base); 109 109 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", 111 111 str_error(ret)); 112 112 // TODO do something here... -
uspace/drv/bus/usb/vhc/transfer.c
rc1a966e ra1732929 207 207 208 208 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!"); 210 210 211 211 return targets ? EOK : ENOENT; … … 236 236 dev->dev_local, &data_transfer_size); 237 237 } 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."); 239 239 rc = ESTALL; 240 240 } 241 241 242 usb_log_debug2("Transfer %p processed: %s. \n",242 usb_log_debug2("Transfer %p processed: %s.", 243 243 transfer, str_error(rc)); 244 244 … … 249 249 (void*) transfer->batch.setup.buffer; 250 250 dev->address = setup->value; 251 usb_log_debug2("Address changed to %d \n",251 usb_log_debug2("Address changed to %d", 252 252 dev->address); 253 253 } -
uspace/drv/bus/usb/xhci/bus.c
rc1a966e ra1732929 73 73 if ((err = hc_enable_slot(bus->hc, &dev->slot_id)) != EOK) 74 74 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); 76 76 77 77 /* Create and configure control endpoint. */ -
uspace/drv/bus/usb/xhci/hc.c
rc1a966e ra1732929 190 190 hc->mmio_range = hw_res->mem_ranges.ranges[0]; 191 191 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.", 193 193 RNGABSPTR(hc->mmio_range), RNGSZ(hc->mmio_range), hw_res->irqs.irqs[0]); 194 194 … … 406 406 async_usleep(XHCI_LEGSUP_POLLING_DELAY_1MS); 407 407 } 408 usb_log_error("BIOS did not release XHCI legacy hold! \n");408 usb_log_error("BIOS did not release XHCI legacy hold!"); 409 409 410 410 return ENOTSUP; … … 776 776 xhci_device_ctx_t *dev_ctx = dev->dev_ctx.virt; 777 777 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); 779 779 780 780 return EOK; -
uspace/drv/hid/usbhid/blink1/blink1.c
rc1a966e ra1732929 64 64 usb_blink1_t *blink1_dev = (usb_blink1_t *) ddf_fun_data_get(fun); 65 65 if (blink1_dev == NULL) { 66 usb_log_debug("Missing parameters. \n");66 usb_log_debug("Missing parameters."); 67 67 return EINVAL; 68 68 } … … 105 105 fun_exposed, HID_BLINK1_FUN_NAME); 106 106 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'.", 108 108 HID_BLINK1_FUN_NAME); 109 109 return ENOMEM; … … 123 123 int rc = ddf_fun_bind(fun); 124 124 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.", 126 126 ddf_fun_get_name(fun), str_error(rc)); 127 127 ddf_fun_destroy(fun); … … 131 131 rc = ddf_fun_add_to_category(fun, HID_BLINK1_CATEGORY); 132 132 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.", 134 134 HID_BLINK1_CATEGORY, str_error(rc)); 135 135 -
uspace/drv/hid/usbhid/generic/hiddev.c
rc1a966e ra1732929 96 96 const usb_hid_dev_t *hid_dev = fun_hid_dev(fun); 97 97 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).", 99 99 hid_dev, hid_dev->max_input_report_size); 100 100 … … 105 105 size_t size, size_t *act_size, int *event_nr, unsigned int flags) 106 106 { 107 usb_log_debug2("Generic HID: Get event. \n");107 usb_log_debug2("Generic HID: Get event."); 108 108 109 109 if (buffer == NULL || act_size == NULL || event_nr == NULL) { … … 115 115 116 116 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)", 118 118 hid_dev->input_report_size, size); 119 119 return EINVAL; // TODO: other error code … … 126 126 *event_nr = usb_hid_report_number(hid_dev); 127 127 128 usb_log_debug2("OK \n");128 usb_log_debug2("OK"); 129 129 130 130 return EOK; … … 133 133 static size_t usb_generic_get_report_descriptor_length(ddf_fun_t *fun) 134 134 { 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", 140 140 hid_dev->report_desc_size); 141 141 … … 146 146 size_t size, size_t *actual_size) 147 147 { 148 usb_log_debug2("Generic HID: Get report descriptor. \n");148 usb_log_debug2("Generic HID: Get report descriptor."); 149 149 150 150 const usb_hid_dev_t *hid_dev = fun_hid_dev(fun); … … 162 162 static int usb_generic_hid_client_connected(ddf_fun_t *fun) 163 163 { 164 usb_log_debug("Generic HID: Client connected. \n");164 usb_log_debug("Generic HID: Client connected."); 165 165 return EOK; 166 166 } … … 173 173 174 174 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."); 176 176 return; 177 177 } 178 usb_log_debug2("%s unbound. \n", ddf_fun_get_name(fun));178 usb_log_debug2("%s unbound.", ddf_fun_get_name(fun)); 179 179 ddf_fun_destroy(fun); 180 180 } … … 189 189 190 190 /* 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); 192 192 ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev, 193 193 fun_exposed, HID_GENERIC_FUN_NAME); 194 194 if (fun == NULL) { 195 usb_log_error("Could not create DDF function node. \n");195 usb_log_error("Could not create DDF function node."); 196 196 return ENOMEM; 197 197 } … … 204 204 int rc = ddf_fun_bind(fun); 205 205 if (rc != EOK) { 206 usb_log_error("Could not bind DDF function: %s. \n",206 usb_log_error("Could not bind DDF function: %s.", 207 207 str_error(rc)); 208 208 ddf_fun_destroy(fun); … … 210 210 } 211 211 212 usb_log_debug("HID function created. Handle: %" PRIun " \n",212 usb_log_debug("HID function created. Handle: %" PRIun "", 213 213 ddf_fun_get_handle(fun)); 214 214 *data = fun; -
uspace/drv/hid/usbhid/kbd/kbddev.c
rc1a966e ra1732929 185 185 if (kbd_dev->client_sess == NULL) { 186 186 kbd_dev->client_sess = sess; 187 usb_log_debug("%s: OK \n", __FUNCTION__);187 usb_log_debug("%s: OK", __FUNCTION__); 188 188 async_answer_0(icallid, EOK); 189 189 } else { 190 usb_log_error("%s: console session already set \n",190 usb_log_error("%s: console session already set", 191 191 __FUNCTION__); 192 192 async_answer_0(icallid, ELIMIT); … … 195 195 } 196 196 default: 197 usb_log_error("%s: Unknown method: %d. \n",197 usb_log_error("%s: Unknown method: %d.", 198 198 __FUNCTION__, (int) method); 199 199 async_answer_0(icallid, EINVAL); … … 226 226 /* Reset the LED data. */ 227 227 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:"); 229 229 230 230 usb_hid_report_field_t *field = usb_hid_report_get_sibling( … … 266 266 } 267 267 268 usb_log_debug("Output report buffer: %s \n",268 usb_log_debug("Output report buffer: %s", 269 269 usb_debug_str_buffer(kbd_dev->output_buffer, kbd_dev->output_size, 270 270 0)); … … 276 276 kbd_dev->output_buffer, kbd_dev->output_size); 277 277 if (rc != EOK) { 278 usb_log_warning("Failed to set kbd indicators. \n");278 usb_log_warning("Failed to set kbd indicators."); 279 279 } 280 280 } … … 289 289 void usb_kbd_push_ev(usb_kbd_t *kbd_dev, int type, unsigned key) 290 290 { 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); 292 292 if (kbd_dev->client_sess == NULL) { 293 293 usb_log_warning( … … 301 301 async_exchange_end(exch); 302 302 } else { 303 usb_log_warning("Failed to send key to console. \n");303 usb_log_warning("Failed to send key to console."); 304 304 } 305 305 } … … 353 353 kbd_dev->key_count); 354 354 if (i != (size_t) -1) { 355 usb_log_error("Detected phantom state. \n");355 usb_log_error("Detected phantom state."); 356 356 return; 357 357 } … … 403 403 ddf_dump_buffer(key_buffer, 512, 404 404 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); 406 406 } 407 407 … … 431 431 usb_hid_report_path_t *path = usb_hid_report_path(); 432 432 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."); 434 434 return; 435 435 } … … 438 438 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0); 439 439 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."); 441 441 return; 442 442 } … … 452 452 453 453 while (field != NULL) { 454 usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u) \n",454 usb_log_debug2("FIELD (%p) - VALUE(%d) USAGE(%u)", 455 455 field, field->value, field->usage); 456 456 … … 464 464 kbd_dev->keys[i] = 0; 465 465 } 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]); 467 467 468 468 ++i; … … 502 502 usb_hid_report_path_t *path = usb_hid_report_path(); 503 503 if (path == NULL) { 504 usb_log_error("Failed to create kbd report path. \n");504 usb_log_error("Failed to create kbd report path."); 505 505 usb_kbd_destroy(kbd_dev); 506 506 return ENOMEM; … … 510 510 usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0); 511 511 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."); 513 513 usb_hid_report_path_free(path); 514 514 usb_kbd_destroy(kbd_dev); … … 523 523 usb_hid_report_path_free(path); 524 524 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); 526 526 527 527 kbd_dev->keys = calloc(kbd_dev->key_count, sizeof(int32_t)); 528 528 if (kbd_dev->keys == NULL) { 529 usb_log_error("Failed to allocate key buffer. \n");529 usb_log_error("Failed to allocate key buffer."); 530 530 usb_kbd_destroy(kbd_dev); 531 531 return ENOMEM; … … 534 534 kbd_dev->keys_old = calloc(kbd_dev->key_count, sizeof(int32_t)); 535 535 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."); 537 537 usb_kbd_destroy(kbd_dev); 538 538 return ENOMEM; … … 544 544 &kbd_dev->output_size, 0); 545 545 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."); 547 547 usb_kbd_destroy(kbd_dev); 548 548 return ENOMEM; 549 549 } 550 550 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); 552 552 553 553 kbd_dev->led_path = usb_hid_report_path(); 554 554 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."); 556 556 usb_kbd_destroy(kbd_dev); 557 557 return ENOMEM; … … 561 561 kbd_dev->led_path, USB_HIDUT_PAGE_LED, 0); 562 562 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."); 564 564 usb_kbd_destroy(kbd_dev); 565 565 return ret; … … 569 569 &hid_dev->report, 0, USB_HID_REPORT_TYPE_OUTPUT); 570 570 571 usb_log_debug("Output report size (in items): %zu \n",571 usb_log_debug("Output report size (in items): %zu", 572 572 kbd_dev->led_output_size); 573 573 574 574 kbd_dev->led_data = calloc(kbd_dev->led_output_size, sizeof(int32_t)); 575 575 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."); 577 577 usb_kbd_destroy(kbd_dev); 578 578 return ENOMEM; … … 588 588 589 589 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."); 591 591 592 592 return EOK; … … 618 618 int usb_kbd_init(usb_hid_dev_t *hid_dev, void **data) 619 619 { 620 usb_log_debug("Initializing HID/KBD structure... \n");620 usb_log_debug("Initializing HID/KBD structure..."); 621 621 622 622 if (hid_dev == NULL) { … … 627 627 628 628 /* 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); 630 630 ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev, 631 631 fun_exposed, HID_KBD_FUN_NAME); 632 632 if (fun == NULL) { 633 usb_log_error("Could not create DDF function node. \n");633 usb_log_error("Could not create DDF function node."); 634 634 return ENOMEM; 635 635 } … … 637 637 usb_kbd_t *kbd_dev = ddf_fun_data_alloc(fun, sizeof(usb_kbd_t)); 638 638 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."); 640 640 ddf_fun_destroy(fun); 641 641 return ENOMEM; … … 644 644 int ret = kbd_dev_init(kbd_dev, hid_dev); 645 645 if (ret != EOK) { 646 usb_log_error("Failed to initialize KBD device structure. \n");646 usb_log_error("Failed to initialize KBD device structure."); 647 647 ddf_fun_destroy(fun); 648 648 return ret; … … 655 655 ret = ddf_fun_bind(fun); 656 656 if (ret != EOK) { 657 usb_log_error("Could not bind DDF function: %s. \n",657 usb_log_error("Could not bind DDF function: %s.", 658 658 str_error(ret)); 659 659 usb_kbd_destroy(kbd_dev); … … 662 662 } 663 663 664 usb_log_debug("%s function created. Handle: %" PRIun " \n",664 usb_log_debug("%s function created. Handle: %" PRIun "", 665 665 HID_KBD_FUN_NAME, ddf_fun_get_handle(fun)); 666 666 667 usb_log_debug("Adding DDF function to category %s... \n",667 usb_log_debug("Adding DDF function to category %s...", 668 668 HID_KBD_CATEGORY_NAME); 669 669 ret = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY_NAME); … … 753 753 if (kbd_dev->fun) { 754 754 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.", 756 756 ddf_fun_get_name(kbd_dev->fun)); 757 757 } else { 758 usb_log_debug2("%s unbound. \n",758 usb_log_debug2("%s unbound.", 759 759 ddf_fun_get_name(kbd_dev->fun)); 760 760 ddf_fun_destroy(kbd_dev->fun); … … 784 784 785 785 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", 787 787 str_error(rc)); 788 788 return rc; -
uspace/drv/hid/usbhid/kbd/kbdrepeat.c
rc1a966e ra1732929 69 69 unsigned int delay = 0; 70 70 71 usb_log_debug("Starting autorepeat loop. \n");71 usb_log_debug("Starting autorepeat loop."); 72 72 73 73 while (true) { 74 74 /* Check if the kbd structure is usable. */ 75 75 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."); 77 77 return; 78 78 } … … 82 82 if (kbd->repeat.key_new > 0) { 83 83 if (kbd->repeat.key_new == kbd->repeat.key_repeated) { 84 usb_log_debug2("Repeating key: %u. \n",84 usb_log_debug2("Repeating key: %u.", 85 85 kbd->repeat.key_repeated); 86 86 usb_kbd_push_ev(kbd, KEY_PRESS, … … 88 88 delay = kbd->repeat.delay_between; 89 89 } else { 90 usb_log_debug2("New key to repeat: %u. \n",90 usb_log_debug2("New key to repeat: %u.", 91 91 kbd->repeat.key_new); 92 92 kbd->repeat.key_repeated = kbd->repeat.key_new; … … 95 95 } else { 96 96 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.", 98 98 kbd->repeat.key_repeated); 99 99 kbd->repeat.key_repeated = 0; … … 119 119 int usb_kbd_repeat_fibril(void *arg) 120 120 { 121 usb_log_debug("Autorepeat fibril spawned. \n");121 usb_log_debug("Autorepeat fibril spawned."); 122 122 123 123 if (arg == NULL) { 124 usb_log_error("No device! \n");124 usb_log_error("No device!"); 125 125 return EINVAL; 126 126 } -
uspace/drv/hid/usbhid/main.c
rc1a966e ra1732929 58 58 static int usb_hid_device_add(usb_device_t *dev) 59 59 { 60 usb_log_debug("%s \n", __FUNCTION__);60 usb_log_debug("%s", __FUNCTION__); 61 61 62 62 if (dev == NULL) { 63 usb_log_error("Wrong parameter given for add_device(). \n");63 usb_log_error("Wrong parameter given for add_device()."); 64 64 return EINVAL; 65 65 } … … 73 73 usb_device_data_alloc(dev, sizeof(usb_hid_dev_t)); 74 74 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."); 76 76 return ENOMEM; 77 77 } … … 79 79 int rc = usb_hid_init(hid_dev, dev); 80 80 if (rc != EOK) { 81 usb_log_error("Failed to initialize USB/HID device. \n");81 usb_log_error("Failed to initialize USB/HID device."); 82 82 usb_hid_deinit(hid_dev); 83 83 return rc; 84 84 } 85 85 86 usb_log_debug("USB/HID device structure initialized. \n");86 usb_log_debug("USB/HID device structure initialized."); 87 87 88 88 /* Start automated polling function. … … 92 92 93 93 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'.", 95 95 usb_device_get_name(dev)); 96 96 usb_hid_deinit(hid_dev); … … 99 99 hid_dev->running = true; 100 100 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)); 102 102 103 103 return EOK; … … 115 115 /* Clean up. */ 116 116 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)); 118 118 119 119 return EOK; … … 132 132 assert(hid_dev); 133 133 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)); 135 135 return join_and_clean(dev); 136 136 } … … 148 148 assert(hid_dev); 149 149 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)); 151 151 return join_and_clean(dev); 152 152 } -
uspace/drv/hid/usbhid/mouse/mousedev.c
rc1a966e ra1732929 118 118 119 119 if (mouse_dev == NULL) { 120 usb_log_debug("%s: Missing parameters. \n", __FUNCTION__);120 usb_log_debug("%s: Missing parameters.", __FUNCTION__); 121 121 async_answer_0(icallid, EINVAL); 122 122 return; 123 123 } 124 124 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", 127 127 __FUNCTION__, mouse_dev->mouse_sess); 128 128 … … 132 132 if (mouse_dev->mouse_sess == NULL) { 133 133 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).", 135 135 ddf_fun_get_name(fun), sess); 136 136 async_answer_0(icallid, EOK); 137 137 } else { 138 usb_log_error("Console session to %s already set. \n",138 usb_log_error("Console session to %s already set.", 139 139 ddf_fun_get_name(fun)); 140 140 async_answer_0(icallid, ELIMIT); … … 142 142 } 143 143 } else { 144 usb_log_debug("%s: Invalid function. \n", __FUNCTION__);144 usb_log_debug("%s: Invalid function.", __FUNCTION__); 145 145 async_answer_0(icallid, EINVAL); 146 146 } … … 171 171 172 172 if (mouse_dev->mouse_sess == NULL) { 173 usb_log_warning(NAME " No console session. \n");173 usb_log_warning(NAME " No console session."); 174 174 return; 175 175 } … … 225 225 usb_hid_report_path_t *path = usb_hid_report_path(); 226 226 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."); 228 228 return; 229 229 } … … 232 232 if (ret != EOK) { 233 233 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."); 235 235 return; 236 236 } … … 242 242 243 243 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, 245 245 field->usage); 246 246 assert(field->usage > field->usage_minimum); … … 331 331 332 332 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!"); 334 334 free(mouse_dev); 335 335 return ENOMEM; … … 344 344 int usb_mouse_init(usb_hid_dev_t *hid_dev, void **data) 345 345 { 346 usb_log_debug("Initializing HID/Mouse structure... \n");346 usb_log_debug("Initializing HID/Mouse structure..."); 347 347 348 348 if (hid_dev == NULL) { … … 353 353 354 354 /* 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); 356 356 ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev, 357 357 fun_exposed, HID_MOUSE_FUN_NAME); 358 358 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'.", 360 360 HID_MOUSE_FUN_NAME); 361 361 return ENOMEM; … … 364 364 usb_mouse_t *mouse_dev = ddf_fun_data_alloc(fun, sizeof(usb_mouse_t)); 365 365 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."); 367 367 ddf_fun_destroy(fun); 368 368 return ENOMEM; … … 371 371 int ret = mouse_dev_init(mouse_dev, hid_dev); 372 372 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."); 374 374 return ret; 375 375 } … … 379 379 ret = ddf_fun_bind(fun); 380 380 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.", 382 382 ddf_fun_get_name(fun), str_error(ret)); 383 383 ddf_fun_destroy(fun); … … 385 385 } 386 386 387 usb_log_debug("Adding DDF function `%s' to category %s... \n",387 usb_log_debug("Adding DDF function `%s' to category %s...", 388 388 ddf_fun_get_name(fun), HID_MOUSE_CATEGORY); 389 389 ret = ddf_fun_add_to_category(fun, HID_MOUSE_CATEGORY); … … 444 444 445 445 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", 447 447 str_error(rc)); 448 448 return rc; -
uspace/drv/hid/usbhid/multimedia/multimedia.c
rc1a966e ra1732929 86 86 ipc_callid_t icallid, ipc_call_t *icall) 87 87 { 88 usb_log_debug(NAME " default_connection_handler() \n");88 usb_log_debug(NAME " default_connection_handler()"); 89 89 90 90 usb_multimedia_t *multim_dev = ddf_fun_data_get(fun); … … 95 95 if (multim_dev->console_sess == NULL) { 96 96 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", 98 98 sess); 99 99 async_answer_0(icallid, EOK); … … 137 137 }; 138 138 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); 140 140 if (multim_dev->console_sess == NULL) { 141 141 usb_log_warning( … … 149 149 async_exchange_end(exch); 150 150 } else { 151 usb_log_warning("Failed to send multimedia key. \n");151 usb_log_warning("Failed to send multimedia key."); 152 152 } 153 153 } … … 159 159 } 160 160 161 usb_log_debug(NAME " Initializing HID/multimedia structure... \n");161 usb_log_debug(NAME " Initializing HID/multimedia structure..."); 162 162 163 163 /* Create the exposed function. */ … … 165 165 hid_dev->usb_dev, fun_exposed, NAME); 166 166 if (fun == NULL) { 167 usb_log_error("Could not create DDF function node. \n");167 usb_log_error("Could not create DDF function node."); 168 168 return ENOMEM; 169 169 } … … 184 184 int rc = ddf_fun_bind(fun); 185 185 if (rc != EOK) { 186 usb_log_error("Could not bind DDF function: %s. \n",186 usb_log_error("Could not bind DDF function: %s.", 187 187 str_error(rc)); 188 188 ddf_fun_destroy(fun); … … 190 190 } 191 191 192 usb_log_debug(NAME " function created (handle: %" PRIun "). \n",192 usb_log_debug(NAME " function created (handle: %" PRIun ").", 193 193 ddf_fun_get_handle(fun)); 194 194 … … 199 199 str_error(rc)); 200 200 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.", 202 202 ddf_fun_get_name(fun)); 203 203 } else { … … 210 210 *data = fun; 211 211 212 usb_log_debug(NAME " HID/multimedia structure initialized. \n");212 usb_log_debug(NAME " HID/multimedia structure initialized."); 213 213 return EOK; 214 214 } … … 224 224 async_hangup(multim_dev->console_sess); 225 225 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.", 227 227 ddf_fun_get_name(fun)); 228 228 } else { 229 usb_log_debug2("%s unbound. \n", ddf_fun_get_name(fun));229 usb_log_debug2("%s unbound.", ddf_fun_get_name(fun)); 230 230 /* This frees multim_dev too as it was stored in 231 231 * fun->data */ … … 266 266 while (field != NULL) { 267 267 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)", 269 269 field->value, field->usage); 270 270 const unsigned key = … … 272 272 const char *key_str = 273 273 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); 275 275 usb_multimedia_push_ev(multim_dev, KEY_PRESS, key); 276 276 } -
uspace/drv/hid/usbhid/usbhid.c
rc1a966e ra1732929 134 134 usb_hid_report_path_t *usage_path = usb_hid_report_path(); 135 135 if (usage_path == NULL) { 136 usb_log_debug("Failed to create usage path. \n");136 usb_log_debug("Failed to create usage path."); 137 137 return false; 138 138 } … … 143 143 mapping->usage_path[i].usage_page, 144 144 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."); 146 146 usb_hid_report_path_free(usage_path); 147 147 return false; … … 149 149 } 150 150 151 usb_log_debug("Compare flags: %d \n", mapping->compare);151 usb_log_debug("Compare flags: %d", mapping->compare); 152 152 153 153 bool matches = false; … … 155 155 156 156 do { 157 usb_log_debug("Trying report id %u \n", report_id);157 usb_log_debug("Trying report id %u", report_id); 158 158 if (report_id != 0) { 159 159 usb_hid_report_path_set_report_id(usage_path, … … 166 166 USB_HID_REPORT_TYPE_INPUT); 167 167 168 usb_log_debug("Field: %p \n", field);168 usb_log_debug("Field: %p", field); 169 169 170 170 if (field != NULL) { … … 243 243 mapping->product_id); 244 244 if (usb_hid_ids_match(hid_dev, mapping)) { 245 usb_log_debug("IDs matched. \n");245 usb_log_debug("IDs matched."); 246 246 matched = true; 247 247 } … … 250 250 /* Check usage match. */ 251 251 if (mapping->usage_path != NULL) { 252 usb_log_debug("Comparing device against usage path. \n");252 usb_log_debug("Comparing device against usage path."); 253 253 if (usb_hid_path_matches(hid_dev, mapping)) { 254 254 /* Does not matter if IDs were matched. */ … … 258 258 259 259 if (matched) { 260 usb_log_debug("Subdriver matched. \n");260 usb_log_debug("Subdriver matched."); 261 261 subdrivers[count++] = &mapping->subdriver; 262 262 } … … 285 285 usb_device_get_mapped_ep_desc(dev, endpoints[i].desc); 286 286 if (epm && epm->present) { 287 usb_log_debug("Found: %s. \n", endpoints[i].description);287 usb_log_debug("Found: %s.", endpoints[i].description); 288 288 hid_dev->poll_pipe_mapping = epm; 289 289 return EOK; … … 301 301 302 302 do { 303 usb_log_debug("Getting size of the report. \n");303 usb_log_debug("Getting size of the report."); 304 304 const size_t size = 305 305 usb_hid_report_byte_size(&hid_dev->report, report_id, 306 306 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); 308 308 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"); 310 310 report_id = usb_hid_get_next_report_id(&hid_dev->report, 311 311 report_id, USB_HID_REPORT_TYPE_INPUT); 312 312 } while (report_id != 0); 313 313 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); 315 315 316 316 assert(hid_dev->input_report == NULL); … … 329 329 { 330 330 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."); 332 332 return false; 333 333 } … … 336 336 assert(hid_dev->input_report != NULL); 337 337 338 usb_log_debug("New data [%zu/%zu]: %s \n", buffer_size,338 usb_log_debug("New data [%zu/%zu]: %s", buffer_size, 339 339 hid_dev->max_input_report_size, 340 340 usb_debug_str_buffer(buffer, buffer_size, 0)); … … 419 419 assert(dev); 420 420 421 usb_log_debug("Initializing HID structure... \n");421 usb_log_debug("Initializing HID structure..."); 422 422 423 423 usb_hid_report_init(&hid_dev->report); … … 441 441 usb_hid_find_subdrivers(hid_dev); 442 442 } else { 443 usb_log_error("Failed to parse report descriptor: fallback. \n");443 usb_log_error("Failed to parse report descriptor: fallback."); 444 444 hid_dev->subdrivers = NULL; 445 445 hid_dev->subdriver_count = 0; 446 446 } 447 447 448 usb_log_debug("Subdriver count(before trying boot protocol): %d \n",448 usb_log_debug("Subdriver count(before trying boot protocol): %d", 449 449 hid_dev->subdriver_count); 450 450 … … 457 457 switch (hid_dev->poll_pipe_mapping->interface->interface_protocol) { 458 458 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."); 460 460 rc = usb_kbd_set_boot_protocol(hid_dev); 461 461 if (rc == EOK) { … … 464 464 break; 465 465 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."); 467 467 rc = usb_mouse_set_boot_protocol(hid_dev); 468 468 if (rc == EOK) { … … 471 471 break; 472 472 default: 473 usb_log_info("Falling back to generic HID driver. \n");473 usb_log_info("Falling back to generic HID driver."); 474 474 usb_hid_set_generic_hid_subdriver(hid_dev); 475 475 } 476 476 } 477 477 478 usb_log_debug("Subdriver count(after trying boot protocol): %d \n",478 usb_log_debug("Subdriver count(after trying boot protocol): %d", 479 479 hid_dev->subdriver_count); 480 480 … … 491 491 for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) { 492 492 if (hid_dev->subdrivers[i].init != NULL) { 493 usb_log_debug("Initializing subdriver %d. \n",i);493 usb_log_debug("Initializing subdriver %d.",i); 494 494 const int pret = hid_dev->subdrivers[i].init(hid_dev, 495 495 &hid_dev->subdrivers[i].data); … … 514 514 rc = usb_hid_init_report(hid_dev); 515 515 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)); 517 517 // FIXME: What happens now? 518 518 } … … 520 520 usb_polling_t *polling = &hid_dev->polling; 521 521 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)); 523 523 // FIXME: What happens now? 524 524 } … … 555 555 usb_polling_fini(&hid_dev->polling); 556 556 557 usb_log_debug("Subdrivers: %p, subdriver count: %d \n",557 usb_log_debug("Subdrivers: %p, subdriver count: %d", 558 558 hid_dev->subdrivers, hid_dev->subdriver_count); 559 559
Note:
See TracChangeset
for help on using the changeset viewer.
