Changeset f20f9e2 in mainline


Ignore:
Timestamp:
2011-02-25T16:38:21Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d37c42
Parents:
b4875e6
Message:

Disable ports on startup

remove device on connection change

Location:
uspace/drv
Files:
2 edited

Legend:

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

    rb4875e6 rf20f9e2  
    9191        int ret =
    9292            pci_get_my_registers(device, &io_reg_base, &io_reg_size, &irq);
     93        io_reg_size = sizeof(regs_t);
    9394
    9495        CHECK_RET_RETURN(ret,
  • uspace/drv/uhci-rhd/port.c

    rb4875e6 rf20f9e2  
    9191        assert(port_instance);
    9292
     93        /* disable port, to avoid device confusion */
     94        uhci_port_set_enabled(port, false);
     95
    9396        while (1) {
    9497                /* read register value */
     
    109112                        }
    110113
     114                        /* remove any old device */
     115                        if (port_instance->attached_device) {
     116                                uhci_port_remove_device(port_instance);
     117                        }
     118
    111119                        if (port_status & STATUS_CONNECTED) {
    112120                                /* new device */
    113121                                uhci_port_new_device(port_instance);
    114                         } else {
    115                                 uhci_port_remove_device(port_instance);
    116122                        }
    117123
Note: See TracChangeset for help on using the changeset viewer.