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

Changeset 1f1fa64 in mainline for uspace/drv/bus/usb/uhci/hc.c


Ignore:
Timestamp:
2014-07-28T21:53:11Z (7 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master
Children:
c3b25985, f2f4c00
Parents:
cbfece7 (diff), 7eb6c96 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Make MAC address change possible on ethip side. Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    rcbfece7 r1f1fa64  
    230230 *
    231231 * @param[in] instance Memory place to initialize.
     232 * @param[in] HC function node
    232233 * @param[in] regs Range of device's I/O control registers.
    233234 * @param[in] interrupts True if hw interrupts should be used.
     
    238239 * interrupt fibrils.
    239240 */
    240 int hc_init(hc_t *instance, addr_range_t *regs, bool interrupts)
     241int hc_init(hc_t *instance, ddf_fun_t *fun, addr_range_t *regs, bool interrupts)
    241242{
    242243        assert(regs->size >= sizeof(uhci_regs_t));
     
    266267        }
    267268
    268         hcd_init(&instance->generic, USB_SPEED_FULL,
     269        instance->generic = ddf_fun_data_alloc(fun, sizeof(hcd_t));
     270        if (instance->generic == NULL) {
     271                usb_log_error("Out of memory.\n");
     272                return ENOMEM;
     273        }
     274
     275        hcd_init(instance->generic, USB_SPEED_FULL,
    269276            BANDWIDTH_AVAILABLE_USB11, bandwidth_count_usb11);
    270277
    271         instance->generic.private_data = instance;
    272         instance->generic.schedule = hc_schedule;
    273         instance->generic.ep_add_hook = NULL;
     278        instance->generic->private_data = instance;
     279        instance->generic->schedule = hc_schedule;
     280        instance->generic->ep_add_hook = NULL;
    274281
    275282        hc_init_hw(instance);
Note: See TracChangeset for help on using the changeset viewer.