Changeset 5a6cc679 in mainline for uspace/drv/bus/usb/uhci/hc.c


Ignore:
Timestamp:
2018-01-31T02:21:24Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

File:
1 edited

Legend:

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

    r132ab5d1 r5a6cc679  
    9797
    9898static void hc_init_hw(const hc_t *instance);
    99 static int hc_init_mem_structures(hc_t *instance);
    100 static int hc_init_transfer_lists(hc_t *instance);
    101 
    102 static int hc_debug_checker(void *arg);
     99static errno_t hc_init_mem_structures(hc_t *instance);
     100static errno_t hc_init_transfer_lists(hc_t *instance);
     101
     102static errno_t hc_debug_checker(void *arg);
    103103
    104104
     
    110110 * @return Error code.
    111111 */
    112 int hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
     112errno_t hc_gen_irq_code(irq_code_t *code, hc_device_t *hcd, const hw_res_list_parsed_t *hw_res, int *irq)
    113113{
    114114        assert(code);
     
    207207 * interrupt fibrils.
    208208 */
    209 int hc_add(hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
     209errno_t hc_add(hc_device_t *hcd, const hw_res_list_parsed_t *hw_res)
    210210{
    211211        hc_t *instance = hcd_to_hc(hcd);
     
    218218
    219219        /* allow access to hc control registers */
    220         int ret = pio_enable_range(&hw_res->io_ranges.ranges[0],
     220        errno_t ret = pio_enable_range(&hw_res->io_ranges.ranges[0],
    221221            (void **) &instance->registers);
    222222        if (ret != EOK) {
     
    327327}
    328328
    329 static int endpoint_register(endpoint_t *ep)
     329static errno_t endpoint_register(endpoint_t *ep)
    330330{
    331331        hc_t * const hc = bus_to_hc(endpoint_get_bus(ep));
    332332
    333         const int err = usb2_bus_endpoint_register(&hc->bus_helper, ep);
     333        const errno_t err = usb2_bus_endpoint_register(&hc->bus_helper, ep);
    334334        if (err)
    335335                return err;
     
    449449 *  - frame list page (needs to be one UHCI hw accessible 4K page)
    450450 */
    451 int hc_init_mem_structures(hc_t *instance)
     451errno_t hc_init_mem_structures(hc_t *instance)
    452452{
    453453        assert(instance);
     
    468468
    469469        /* Init transfer lists */
    470         int ret = hc_init_transfer_lists(instance);
     470        errno_t ret = hc_init_transfer_lists(instance);
    471471        if (ret != EOK) {
    472472                usb_log_error("Failed to initialize transfer lists.");
     
    498498 * USB scheduling. Sets pointer table for quick access.
    499499 */
    500 int hc_init_transfer_lists(hc_t *instance)
     500errno_t hc_init_transfer_lists(hc_t *instance)
    501501{
    502502        assert(instance);
    503503#define SETUP_TRANSFER_LIST(type, name) \
    504504do { \
    505         int ret = transfer_list_init(&instance->transfers_##type, name); \
     505        errno_t ret = transfer_list_init(&instance->transfers_##type, name); \
    506506        if (ret != EOK) { \
    507507                usb_log_error("Failed to setup %s transfer list: %s.", \
     
    550550}
    551551
    552 static int hc_status(bus_t *bus, uint32_t *status)
     552static errno_t hc_status(bus_t *bus, uint32_t *status)
    553553{
    554554        hc_t *instance = bus_to_hc(bus);
     
    571571 * @return Error code
    572572 */
    573 static int hc_schedule(usb_transfer_batch_t *batch)
     573static errno_t hc_schedule(usb_transfer_batch_t *batch)
    574574{
    575575        uhci_transfer_batch_t *uhci_batch = uhci_transfer_batch_get(batch);
     
    586586                return ENOTSUP;
    587587
    588         int err;
     588        errno_t err;
    589589        if ((err = uhci_transfer_batch_prepare(uhci_batch)))
    590590                return err;
     
    598598 * @return EOK (should never return)
    599599 */
    600 int hc_debug_checker(void *arg)
     600errno_t hc_debug_checker(void *arg)
    601601{
    602602        hc_t *instance = arg;
Note: See TracChangeset for help on using the changeset viewer.