Changeset 9d3536e in mainline for uspace/drv/bus/usb/usbhub/port.c


Ignore:
Timestamp:
2018-01-20T22:17:40Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
defaab2
Parents:
d648e83
Message:

usbhub: clear ignored changes and report them only once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhub/port.c

    rd648e83 r9d3536e  
    255255        }
    256256
    257         for (uint32_t feature = 0; feature < sizeof(usb_port_status_t) * 8; ++feature) {
     257        for (uint32_t feature = 16; feature < sizeof(usb_port_status_t) * 8; ++feature) {
    258258                uint32_t mask = 1 << feature;
    259259
     
    261261                        continue;
    262262
     263                /* Clear the change so it won't come again */
     264                usb_hub_clear_port_feature(port->hub, port->port_number, feature);
     265
    263266                if (!port_change_handlers[feature])
    264267                        continue;
     
    266269                /* ACK this change */
    267270                status &= ~mask;
    268                 usb_hub_clear_port_feature(port->hub, port->port_number, feature);
    269271
    270272                port_change_handlers[feature](port, status);
    271273        }
    272274
    273         port_log(debug2, port, "Port status after handling: %#08" PRIx32, status);
     275        /* Check for changes we ignored */
     276        if (status & 0xffff0000) {
     277                port_log(debug, port, "Port status change igored. Status: %#08" PRIx32, status);
     278        }
    274279}
    275280
Note: See TracChangeset for help on using the changeset viewer.