Changeset c9467b0 in mainline for uspace/drv/bus/usb/usbhub/usbhub.c


Ignore:
Timestamp:
2013-01-07T17:30:03Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a5a470c
Parents:
e6becb9
Message:

usbhub: Fix after porting to new usb ops.

Check attached handle instead of attached device function.
Release default address after successful enumeration.
Decrease pending ops count after device enumeration.

Remove attached_device member.
usb_hub_port_fini is safe to call on ports withou attached devices.

File:
1 edited

Legend:

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

    re6becb9 rc9467b0  
    200200
    201201        for (size_t port = 0; port < hub->port_count; ++port) {
    202                 if (hub->ports[port].attached_device.fun) {
    203                         const int ret =
    204                             usb_hub_port_fini(&hub->ports[port], hub);
    205                         if (ret != EOK)
    206                                 return ret;
    207                 }
     202                const int ret = usb_hub_port_fini(&hub->ports[port], hub);
     203                if (ret != EOK)
     204                        return ret;
    208205        }
    209206        free(hub->ports);
Note: See TracChangeset for help on using the changeset viewer.