Changeset d1984e0 in mainline for uspace/drv/uhci/uhci.c
- Timestamp:
- 2011-01-28T15:47:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 54229db
- Parents:
- a8e96683
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/uhci.c
ra8e96683 rd1984e0 55 55 56 56 uhci_print_verbose("Initializing frame list.\n"); 57 instance->frame_list = 58 memallign32(sizeof(link_pointer_t) * UHCI_FRAME_LIST_COUNT, 4096);57 instance->frame_list = get_page(); 58 // memalign32(sizeof(link_pointer_t) * UHCI_FRAME_LIST_COUNT, 4096); 59 59 if (instance->frame_list == NULL) { 60 60 uhci_print_error("Failed to allocate frame list pointer.\n"); … … 79 79 instance->cleaner = fibril_create(uhci_clean_finished, instance); 80 80 fibril_add_ready(instance->cleaner); 81 82 uhci_print_verbose("Starting UHCI HC.\n"); 83 uint16_t cmd = pio_read_16(&instance->registers->usbcmd); 84 cmd |= UHCI_CMD_RUN_STOP | UHCI_CMD_CONFIGURE; 85 pio_write_16(&instance->registers->usbcmd, cmd); 81 86 82 87 device->driver_data = instance; … … 177 182 178 183 while(1) { 179 uhci_print_verbose("Running cleaning fibril on %p.\n", instance);184 uhci_print_verbose("Running cleaning fibril on: %p.\n", instance); 180 185 /* iterate all transfer queues */ 181 usb_transfer_type_t i = USB_TRANSFER_BULK;182 for (; i > USB_TRANSFER_ISOCHRONOUS; --i) {186 int i = 1; 187 for (; i < TRANSFER_QUEUES; ++i) { 183 188 /* Remove inactive transfers from the top of the queue 184 189 * TODO: should I reach queue head or is this enough? */ 190 uhci_print_verbose("Running cleaning fibril on queue: %p.\n", 191 &instance->transfers[i]); 185 192 while (instance->transfers[i].first && 186 193 !(instance->transfers[i].first->status & TD_STATUS_ERROR_ACTIVE)) {
Note:
See TracChangeset
for help on using the changeset viewer.