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

Changeset a5361fb in mainline


Ignore:
Timestamp:
2014-01-18T21:39:55Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
4bfcf22
Parents:
3e200736
Message:

ohci: Don't enable device interrupts if interrupt setup failed.

Location:
uspace/drv/bus/usb/ohci
Files:
2 edited

Legend:

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

    r3e200736 ra5361fb  
    172172        list_initialize(&instance->pending_batches);
    173173        fibril_mutex_initialize(&instance->guard);
     174        instance->hw_interrupts = interrupts;
    174175
    175176        ret = hc_init_memory(instance);
     
    485486
    486487        /* Enable interrupts */
    487         OHCI_WR(instance->registers->interrupt_enable, OHCI_USED_INTERRUPTS);
    488         usb_log_debug("Enabled interrupts: %x.\n",
    489             OHCI_RD(instance->registers->interrupt_enable));
    490         OHCI_WR(instance->registers->interrupt_enable, I_MI);
     488        if (instance->hw_interrupts) {
     489                OHCI_WR(instance->registers->interrupt_enable,
     490                    OHCI_USED_INTERRUPTS);
     491                usb_log_debug("Enabled interrupts: %x.\n",
     492                    OHCI_RD(instance->registers->interrupt_enable));
     493                OHCI_WR(instance->registers->interrupt_enable, I_MI);
     494        }
    491495
    492496        /* Set periodic start to 90% */
  • uspace/drv/bus/usb/ohci/hc.h

    r3e200736 ra5361fb  
    7171        fibril_mutex_t guard;
    7272
     73        /** interrupts available */
     74        bool hw_interrupts;
     75
    7376        /** USB hub emulation structure */
    7477        ohci_rh_t rh;
Note: See TracChangeset for help on using the changeset viewer.