Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f088c00 in mainline


Ignore:
Timestamp:
2010-12-19T10:28:41Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
bf5a3be
Parents:
18e35a7
Message:

fix: enable port AFTER reserving default address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/root_hub/root_hub.c

    r18e35a7 rf088c00  
    100100        uhci_t *uhci_instance = (uhci_t*)hc->driver_data;
    101101
     102        /* get default address */
     103        usb_address_keeping_reserve_default( &uhci_instance->address_manager );
     104
    102105        /* enable port */
    103106        {
     
    123126                return ENOMEM;
    124127        }
     128        /* release default address */
     129        usb_address_keeping_release_default( &uhci_instance->address_manager );
    125130
    126131        /* report to devman */
     
    146151          &uhci_instance->address_manager );
    147152
    148         /* get default address */
    149         usb_address_keeping_reserve_default( &uhci_instance->address_manager );
    150 
    151153        /* assign new address */
    152154        /* TODO send new address*/
    153155        usb_dprintf( NAME, 3, "Assigned address 0x%x.\n", usb_address );
    154 
    155         /* release default address */
    156         usb_address_keeping_release_default( &uhci_instance->address_manager );
    157156
    158157        return usb_address;
Note: See TracChangeset for help on using the changeset viewer.