Changes in / [0f3e68c:dd6f59f] in mainline
- Location:
- uspace/drv
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ehci-hcd/pci.c
r0f3e68c rdd6f59f 247 247 248 248 249 if ((value & USBLEGSUP_BIOS_CONTROL) == 0) {249 if ((value & USBLEGSUP_BIOS_CONTROL) != 0) { 250 250 usb_log_info("BIOS released control after %d usec.\n", wait); 251 251 } else { 252 252 /* BIOS failed to hand over control, this should not happen. */ 253 usb_log_warning( "BIOS failed to release control after 253 usb_log_warning( "BIOS failed to release control after" 254 254 "%d usecs, force it.\n", wait); 255 255 ret = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE), … … 258 258 CHECK_RET_HANGUP_RETURN(ret, 259 259 "Failed(%d) to force OS EHCI control.\n", ret); 260 /* TODO: This does not seem to work on my machine */ 260 261 } 261 262 … … 279 280 usb_log_debug2("USBLEGSUP: %x.\n", value); 280 281 281 282 * TURN OFF EHCI FOR NOW, DRIVER WILL REINITIALIZE IT 283 282 /* 283 * TURN OFF EHCI FOR NOW, REMOVE IF THE DRIVER IS IMPLEMENTED 284 */ 284 285 285 286 /* Get size of capability registers in memory space. */ -
uspace/drv/uhci-hcd/batch.c
r0f3e68c rdd6f59f 177 177 usb_log_debug("Batch(%p) found error TD(%d):%x.\n", 178 178 instance, i, instance->tds[i].status); 179 td_print_status(&instance->tds[i]);180 179 181 180 device_keeper_set_toggle(instance->manager, … … 319 318 ++packet; 320 319 } 321 instance->tds[packet - 1].status |= TD_STATUS_ IOC_FLAG;320 instance->tds[packet - 1].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG; 322 321 device_keeper_set_toggle(instance->manager, instance->target, toggle); 323 322 } … … 372 371 373 372 374 instance->tds[packet].status |= TD_STATUS_ IOC_FLAG;373 instance->tds[packet].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG; 375 374 usb_log_debug2("Control last TD status: %x.\n", 376 375 instance->tds[packet].status); -
uspace/drv/uhci-hcd/uhci.c
r0f3e68c rdd6f59f 436 436 437 437 int frnum = pio_read_16(&instance->registers->frnum) & 0x3ff; 438 usb_log_debug2("Framelist item: %d \n", frnum ); 438 439 439 440 uintptr_t expected_pa = instance->frame_list[frnum] & (~0xf); 440 441 uintptr_t real_pa = addr_to_phys(QH(interrupt)); 441 442 if (expected_pa != real_pa) { 442 usb_log_debug("Interrupt QH: %p (frame: %d)vs. %p.\n",443 expected_pa, frnum,real_pa);443 usb_log_debug("Interrupt QH: %p vs. %p.\n", 444 expected_pa, real_pa); 444 445 } 445 446 -
uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c
r0f3e68c rdd6f59f 88 88 } 89 89 90 usb_log_debug2("Created TD (%p): %X:%X:%X:%X(%p).\n",91 instance , instance->next, instance->status, instance->device,90 usb_log_debug2("Created TD: %X:%X:%X:%X(%p).\n", 91 instance->next, instance->status, instance->device, 92 92 instance->buffer_ptr, buffer); 93 td_print_status(instance);94 93 if (pid == USB_PID_SETUP) { 95 94 usb_log_debug("SETUP BUFFER: %s\n", … … 127 126 return EOK; 128 127 } 129 /*----------------------------------------------------------------------------*/130 void td_print_status(td_t *instance)131 {132 assert(instance);133 const uint32_t s = instance->status;134 usb_log_debug2("TD(%p) status(%#x):%s %d,%s%s%s%s%s%s%s%s%s%s%s %d.\n",135 instance, instance->status,136 (s & TD_STATUS_SPD_FLAG) ? " SPD," : "",137 (s >> TD_STATUS_ERROR_COUNT_POS) & TD_STATUS_ERROR_COUNT_MASK,138 (s & TD_STATUS_LOW_SPEED_FLAG) ? " LOW SPEED," : "",139 (s & TD_STATUS_ISOCHRONOUS_FLAG) ? " ISOCHRONOUS," : "",140 (s & TD_STATUS_IOC_FLAG) ? " IOC," : "",141 (s & TD_STATUS_ERROR_ACTIVE) ? " ACTIVE," : "",142 (s & TD_STATUS_ERROR_STALLED) ? " STALLED," : "",143 (s & TD_STATUS_ERROR_BUFFER) ? " BUFFER," : "",144 (s & TD_STATUS_ERROR_BABBLE) ? " BABBLE," : "",145 (s & TD_STATUS_ERROR_NAK) ? " NAK," : "",146 (s & TD_STATUS_ERROR_CRC) ? " CRC/TIMEOUT," : "",147 (s & TD_STATUS_ERROR_BIT_STUFF) ? " BIT_STUFF," : "",148 (s & TD_STATUS_ERROR_RESERVED) ? " RESERVED," : "",149 (s >> TD_STATUS_ACTLEN_POS) & TD_STATUS_ACTLEN_MASK150 );151 }152 128 /** 153 129 * @} -
uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h
r0f3e68c rdd6f59f 53 53 #define TD_STATUS_LOW_SPEED_FLAG ( 1 << 26 ) 54 54 #define TD_STATUS_ISOCHRONOUS_FLAG ( 1 << 25 ) 55 #define TD_STATUS_ IOC_FLAG ( 1 << 24 )55 #define TD_STATUS_COMPLETE_INTERRUPT_FLAG ( 1 << 24 ) 56 56 57 57 #define TD_STATUS_ERROR_ACTIVE ( 1 << 23 ) … … 127 127 return (instance->status & TD_STATUS_ERROR_ACTIVE) != 0; 128 128 } 129 130 void td_print_status(td_t *instance);131 129 #endif 132 130 /** -
uspace/drv/uhci-rhd/port.c
r0f3e68c rdd6f59f 44 44 45 45 #include "port.h" 46 #include "port_status.h" 46 47 47 48 static int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed); … … 125 126 port_status_t port_status = uhci_port_read_status(instance); 126 127 127 /* print the value if it's interesting */ 128 if (port_status & ~STATUS_ALWAYS_ONE) 129 uhci_port_print_status(instance, port_status); 128 print_port_status(instance->id_string, port_status); 130 129 131 130 if ((port_status & STATUS_CONNECTED_CHANGED) == 0) … … 159 158 /* Write one to WC bits, to ack changes */ 160 159 uhci_port_write_status(instance, port_status); 161 usb_log_debug("%s: status changeACK.\n",160 usb_log_debug("%s: Change status ACK.\n", 162 161 instance->id_string); 163 162 } -
uspace/drv/uhci-rhd/port.h
r0f3e68c rdd6f59f 36 36 37 37 #include <assert.h> 38 #include <ddf/driver.h> 38 39 #include <stdint.h> 39 #include <ddf/driver.h>40 #include <libarch/ddi.h> /* pio_read and pio_write */41 40 #include <usb/usbdevice.h> 42 41 43 typedef uint16_t port_status_t; 44 45 #define STATUS_CONNECTED (1 << 0) 46 #define STATUS_CONNECTED_CHANGED (1 << 1) 47 #define STATUS_ENABLED (1 << 2) 48 #define STATUS_ENABLED_CHANGED (1 << 3) 49 #define STATUS_LINE_D_PLUS (1 << 4) 50 #define STATUS_LINE_D_MINUS (1 << 5) 51 #define STATUS_RESUME (1 << 6) 52 #define STATUS_ALWAYS_ONE (1 << 7) 53 54 #define STATUS_LOW_SPEED (1 << 8) 55 #define STATUS_IN_RESET (1 << 9) 56 #define STATUS_SUSPEND (1 << 12) 42 #include "port_status.h" 57 43 58 44 typedef struct uhci_port … … 86 72 pio_write_16(port->address, value); 87 73 } 88 89 static inline void uhci_port_print_status(90 uhci_port_t *port, const port_status_t value)91 {92 assert(port);93 usb_log_debug2("%s Port status(%#x):%s%s%s%s%s%s%s%s%s%s%s.\n",94 port->id_string, value,95 (value & STATUS_SUSPEND) ? " SUSPENDED," : "",96 (value & STATUS_RESUME) ? " IN RESUME," : "",97 (value & STATUS_IN_RESET) ? " IN RESET," : "",98 (value & STATUS_LINE_D_MINUS) ? " VD-," : "",99 (value & STATUS_LINE_D_PLUS) ? " VD+," : "",100 (value & STATUS_LOW_SPEED) ? " LOWSPEED," : "",101 (value & STATUS_ENABLED_CHANGED) ? " ENABLED-CHANGE," : "",102 (value & STATUS_ENABLED) ? " ENABLED," : "",103 (value & STATUS_CONNECTED_CHANGED) ? " CONNECTED-CHANGE," : "",104 (value & STATUS_CONNECTED) ? " CONNECTED," : "",105 (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERROR: NO ALWAYS ONE"106 );107 }108 74 #endif 109 75 /**
Note:
See TracChangeset
for help on using the changeset viewer.