Changeset eb292a0 in mainline
- Timestamp:
- 2011-02-26T02:08:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0063838
- Parents:
- 86c2ccd
- Location:
- uspace/drv/uhci-hcd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci.c
r86c2ccd reb292a0 153 153 void uhci_init_hw(uhci_t *instance) 154 154 { 155 /* reset hc, who knows what touched it before us */155 /* reset everything, who knows what touched it before us */ 156 156 pio_write_16(&instance->registers->usbcmd, UHCI_CMD_GLOBAL_RESET); 157 157 async_usleep(10000); /* 10ms according to USB spec */ 158 158 pio_write_16(&instance->registers->usbcmd, 0); 159 160 /* reset hc, all states and counters */ 161 pio_write_16(&instance->registers->usbcmd, UHCI_CMD_HCRESET); 162 while ((pio_read_16(&instance->registers->usbcmd) & UHCI_CMD_HCRESET) != 0) 163 { async_usleep(10); } 159 164 160 165 /* set framelist pointer */ … … 284 289 if ((status & (UHCI_STATUS_INTERRUPT | UHCI_STATUS_ERROR_INTERRUPT)) == 0) 285 290 return; 286 usb_log_debug ("UHCI interrupt: %X.\n", status);291 usb_log_debug2("UHCI interrupt: %X.\n", status); 287 292 transfer_list_remove_finished(&instance->transfers_interrupt); 288 293 transfer_list_remove_finished(&instance->transfers_control_slow); … … 299 304 while (1) { 300 305 uint16_t status = pio_read_16(&instance->registers->usbsts); 301 usb_log_debug ("UHCI status: %x.\n", status);306 usb_log_debug2("UHCI status: %x.\n", status); 302 307 status |= 1; 303 308 uhci_interrupt(instance, status); -
uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c
r86c2ccd reb292a0 77 77 78 78 if ((instance->status & TD_STATUS_ERROR_STALLED) != 0) 79 return E IO;79 return ESTALL; 80 80 81 81 if ((instance->status & TD_STATUS_ERROR_CRC) != 0) 82 return E AGAIN;82 return EBADCHECKSUM; 83 83 84 84 if ((instance->status & TD_STATUS_ERROR_BUFFER) != 0)
Note:
See TracChangeset
for help on using the changeset viewer.