Changeset eff60ca in mainline


Ignore:
Timestamp:
2017-07-23T21:42:19Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60f7c590
Parents:
2e7692f
Message:

Refactored the code to ease up the load of irrelevant information in the log and added some log entries for trb/command lifetime monitoring.

Location:
uspace/drv/bus/usb/xhci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/commands.c

    r2e7692f reff60ca  
    408408        command->slot_id = slot_id;
    409409
    410         usb_log_debug2("Completed command trb:");
    411         xhci_dump_trb(command_trb);
     410        usb_log_debug2("Completed command trb: %s", xhci_trb_str_type(TRB_TYPE(*command_trb)));
    412411        if (TRB_TYPE(*command_trb) != XHCI_TRB_TYPE_NO_OP_CMD) {
    413412                if (code != XHCI_TRBC_SUCCESS) {
     
    441440                break;
    442441        default:
    443                 usb_log_debug2("Unsupported command trb.");
    444                 xhci_dump_trb(command_trb);
     442                usb_log_debug2("Unsupported command trb: %s", xhci_trb_str_type(TRB_TYPE(*command_trb)));
    445443
    446444                command->completed = true;
     
    451449
    452450        if (!command->has_owner) {
     451                usb_log_debug2("Command has no owner, deallocating.");
    453452                xhci_free_command(command);
    454453        } else {
     454                usb_log_debug2("Command has owner, don't forget to deallocate!");
    455455                /* Copy the trb for later use so that we can free space on the cmd ring. */
    456456                command->trb = malloc32(sizeof(xhci_trb_t));
  • uspace/drv/bus/usb/xhci/hc.c

    r2e7692f reff60ca  
    357357        //       stuff, remove it.
    358358        xhci_cmd_t *cmd = xhci_alloc_command();
    359         xhci_dump_state(hc);
    360359        xhci_send_no_op_command(hc, cmd);
    361360        xhci_wait_for_command(cmd, 1000000);
    362361        xhci_free_command(cmd);
    363 
    364         xhci_dump_state(hc);
    365362
    366363        for (int i = 0; i < 10; ++i) {
     
    372369        }
    373370
    374 
    375         xhci_dump_trb(hc->event_ring.dequeue_trb);
    376371        return EOK;
    377372}
     
    402397        while (err != ENOENT) {
    403398                if (err == EOK) {
    404                         usb_log_debug2("Dequeued from event ring.");
    405                         xhci_dump_trb(&trb);
     399                        usb_log_debug2("Dequeued trb from event ring: %s",
     400                                        xhci_trb_str_type(TRB_TYPE(trb)));
    406401
    407402                        hc_handle_event(hc, &trb);
Note: See TracChangeset for help on using the changeset viewer.