Changeset 96323d2 in mainline for uspace/drv/bus/usb/usbhub/port.h


Ignore:
Timestamp:
2015-07-01T02:56:08Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b303275
Parents:
c4ba645d
Message:

usbhub: Handle device disappearing during reset

Rework reset status handling (should probably include all of port status handling).
Improve logging.

File:
1 edited

Legend:

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

    rc4ba645d r96323d2  
    5252        /** CV for waiting to port reset completion. */
    5353        fibril_condvar_t reset_cv;
    54         /** Whether port reset is completed.
     54        /** Port reset status.
    5555         * Guarded by @c reset_mutex.
    5656         */
    57         bool reset_completed;
    58         /** Whether to announce the port reset as successful. */
    59         bool reset_okay;
     57        enum {
     58                NO_RESET,
     59                IN_RESET,
     60                RESET_OK,
     61                RESET_FAIL,
     62        } reset_status;
    6063        /** Device reported to USB bus driver */
    6164        bool device_attached;
     
    7275        port->port_number = port_number;
    7376        port->control_pipe = control_pipe;
    74         port->reset_completed = false;
    75         port->reset_okay = false;
     77        port->reset_status = NO_RESET;
    7678        port->device_attached = false;
    7779        fibril_mutex_initialize(&port->mutex);
Note: See TracChangeset for help on using the changeset viewer.