Changeset b375bb8 in mainline for uspace/drv/uhci-hcd/main.c


Ignore:
Timestamp:
2011-03-01T22:58:58Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e2fdcf
Parents:
9ef0d6d
Message:

Refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/main.c

    r9ef0d6d rb375bb8  
    5050
    5151static int uhci_add_device(ddf_dev_t *device);
    52 
    5352/*----------------------------------------------------------------------------*/
    5453static driver_ops_t uhci_driver_ops = {
     
    9998            "Failed(%d) disable legacy USB: %s.\n", ret, str_error(ret));
    10099
    101 //      ret = pci_enable_interrupts(device);
    102 //      CHECK_RET_FREE_HC_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret);
     100#if 0
     101        ret = pci_enable_interrupts(device);
     102        if (ret != EOK) {
     103                usb_log_warning(
     104                    "Failed(%d) to enable interrupts, fall back to polling.\n",
     105                    ret);
     106        }
     107#endif
    103108
    104109        hcd = malloc(sizeof(uhci_t));
    105110        ret = (hcd != NULL) ? EOK : ENOMEM;
    106         CHECK_RET_FREE_HC_RETURN(ret, "Failed(%d) to allocate memory for uhci hcd.\n",
    107             ret);
     111        CHECK_RET_FREE_HC_RETURN(ret,
     112            "Failed(%d) to allocate memory for uhci hcd.\n", ret);
    108113
    109114        ret = uhci_init(hcd, device, (void*)io_reg_base, io_reg_size);
     
    131136}
    132137
     138        /* It does no harm if we register this on polling */
    133139        ret = register_interrupt_handler(device, irq, irq_handler,
    134140            &hcd->interrupt_code);
    135         CHECK_RET_FINI_FREE_RETURN(ret, "Failed(%d) to register interrupt handler.\n",
    136             ret);
     141        CHECK_RET_FINI_FREE_RETURN(ret,
     142            "Failed(%d) to register interrupt handler.\n", ret);
    137143
    138144        ret = setup_root_hub(&rh, device);
    139         CHECK_RET_FINI_FREE_RETURN(ret, "Failed(%d) to setup UHCI root hub.\n",
    140             ret);
     145        CHECK_RET_FINI_FREE_RETURN(ret,
     146            "Failed(%d) to setup UHCI root hub.\n", ret);
    141147        rh->driver_data = hcd->ddf_instance;
    142148
    143149        ret = ddf_fun_bind(rh);
    144         CHECK_RET_FINI_FREE_RETURN(ret, "Failed(%d) to register UHCI root hub.\n",
    145             ret);
     150        CHECK_RET_FINI_FREE_RETURN(ret,
     151            "Failed(%d) to register UHCI root hub.\n", ret);
    146152
    147153        return EOK;
Note: See TracChangeset for help on using the changeset viewer.