Changeset 691130cf in mainline


Ignore:
Timestamp:
2015-08-25T04:15:27Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8351f9a4
Parents:
ff0258f
Message:

ehci/rh: Make debug messages more informative

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_rh.c

    rff0258f r691130cf  
    9999 */
    100100int ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps, ehci_regs_t *regs,
    101 const char *name)
     101    const char *name)
    102102{
    103103        assert(instance);
     
    116116                usb_log_info("RH(%p): No power switching.", instance);
    117117        }
     118        for (unsigned i = 0; i < instance->port_count; ++i)
     119                usb_log_debug2("RH(%p-%u): status: %"PRIx32, instance, i,
     120                    EHCI_RD(regs->portsc[i]));
    118121
    119122        for (unsigned i = 0; i < EHCI_MAX_PORTS; ++i) {
     
    295298        /* Note feature numbers for test and indicator feature do not
    296299         * correspond to the port status bit locations */
    297         usb_log_debug2("RH(%p-%u) port status: %"PRIx32, hub, port, status);
     300        usb_log_debug2("RH(%p-%u) port status: %"PRIx32"(%"PRIx32")", hub, port,
     301            status, reg);
    298302        memcpy(data, &status, sizeof(status));
    299303        *act_size = sizeof(status);
     
    324328            USB_PORTSC_ENABLED_FLAG)) {
    325329                usb_log_info("RH(%p-%u): Port not enabled after reset (%"PRIX32
    326                 "), giving up ownership", job->hub, job->port,
    327                 EHCI_RD(job->hub->registers->portsc[job->port]));
     330                    "), giving up ownership", job->hub, job->port,
     331                    EHCI_RD(job->hub->registers->portsc[job->port]));
    328332                EHCI_SET(job->hub->registers->portsc[job->port],
    329333                    USB_PORTSC_PORT_OWNER_FLAG);
     
    516520                /* Write-clean bits are those that indicate change */
    517521                uint32_t status = EHCI_RD(hub->registers->portsc[port]);
    518                 if ((status & USB_PORTSC_WC_MASK)
    519                     || hub->reset_flag[port] || hub->reset_flag[port]) {
     522                if ((status & USB_PORTSC_WC_MASK) || hub->reset_flag[port]) {
    520523                        /* Ignore new LS device */
    521524                        if ((status & USB_PORTSC_CONNECT_CH_FLAG) &&
Note: See TracChangeset for help on using the changeset viewer.