Changeset a1732929 in mainline for uspace/drv/bus/usb/uhci/hc.c
- Timestamp:
- 2018-01-15T17:04:34Z (7 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.