Changes in / [06f9d8fb:c3dafe1] in mainline
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/vuhid/device.c
r06f9d8fb rc3dafe1 96 96 const char *id) 97 97 { 98 vuhid_interface_t *iface = ifaces[0]; 99 while (iface != NULL) { 100 if (str_cmp(iface->id, id) == 0) { 101 return iface; 98 if ((ifaces == NULL) || (id == NULL)) { 99 return NULL; 100 } 101 while (*ifaces != NULL) { 102 if (str_cmp((*ifaces)->id, id) == 0) { 103 return *ifaces; 102 104 } 103 iface ++;104 } 105 106 return iface;105 ifaces++; 106 } 107 108 return NULL; 107 109 } 108 110 … … 119 121 } 120 122 121 // FIXME - we shall set vuhid_data to NULL in the main() rather122 // than to depend on individual interfaces123 123 /* Already used interface. */ 124 124 if (iface->vuhid_data != NULL) { … … 166 166 * Prepare new descriptors. 167 167 */ 168 printf("preparing descriptors...\n");169 168 size_t descr_count = 0; 170 169 size_t total_descr_size = 0; … … 273 272 } 274 273 275 printf("adding extra descriptors...\n");276 274 /* Allocation is okay, we can (actually have to now) overwrite the 277 275 * original pointer. -
uspace/drv/ehci-hcd/main.c
r06f9d8fb rc3dafe1 88 88 ret = pci_disable_legacy(device, reg_base, reg_size, irq); 89 89 CHECK_RET_RETURN(ret, 90 "Failed (%d) disable legacy USB: %s.\n", ret, str_error(ret));90 "Failed to disable legacy USB: %s.\n", str_error(ret)); 91 91 92 92 ddf_fun_t *hc_fun = ddf_fun_create(device, fun_exposed, "ehci-hc"); -
uspace/drv/ehci-hcd/pci.c
r06f9d8fb rc3dafe1 35 35 */ 36 36 #include <errno.h> 37 #include <str_error.h> 37 38 #include <assert.h> 38 39 #include <as.h> … … 240 241 void *regs = NULL; 241 242 int ret = pio_enable((void*)reg_base, reg_size, ®s); 242 CHECK_RET_RETURN(ret, "Failed (%d) to map registers %p.\n",243 ret, (void *) reg_base);243 CHECK_RET_RETURN(ret, "Failed to map registers %p: %s.\n", 244 (void *) reg_base, str_error(ret)); 244 245 245 246 const uint32_t hcc_params = … … 256 257 uint32_t usblegsup; 257 258 ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup); 258 CHECK_RET_RETURN(ret, "Failed (%d) to read USBLEGSUP.\n", ret);259 usb_log_debug("USBLEGSUP: %" PRIx n".\n", usblegsup);259 CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret)); 260 usb_log_debug("USBLEGSUP: %" PRIx32 ".\n", usblegsup); 260 261 261 262 /* Request control from firmware/BIOS, by writing 1 to highest byte. … … 263 264 usb_log_debug("Requesting OS control.\n"); 264 265 ret = pci_write8(device, eecp + USBLEGSUP_OFFSET + 3, 1); 265 CHECK_RET_RETURN(ret, "Failed(%d) to request OS EHCI control.\n", ret); 266 CHECK_RET_RETURN(ret, "Failed to request OS EHCI control: %s.\n", 267 str_error(ret)); 266 268 267 269 size_t wait = 0; … … 283 285 ret = pci_write32(device, eecp + USBLEGSUP_OFFSET, 284 286 USBLEGSUP_OS_CONTROL); 285 CHECK_RET_RETURN(ret, "Failed(%d) to force OS control.\n", ret); 287 CHECK_RET_RETURN(ret, "Failed to force OS control: %s.\n", 288 str_error(ret)); 286 289 /* Check capability type here, A value of 01h 287 290 * identifies the capability as Legacy Support. … … 297 300 device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 298 301 CHECK_RET_RETURN(ret, 299 "Failed (%d) to get USBLEGCTLSTS.\n", ret);300 usb_log_debug("USBLEGCTLSTS: %" PRIx n".\n",302 "Failed to get USBLEGCTLSTS: %s.\n", str_error(ret)); 303 usb_log_debug("USBLEGCTLSTS: %" PRIx32 ".\n", 301 304 usblegctlsts); 302 305 /* Zero SMI enables in legacy control register. … … 310 313 device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 311 314 CHECK_RET_RETURN(ret, 312 "Failed(%d) to get USBLEGCTLSTS 2.\n", ret); 313 usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIxn ".\n", 315 "Failed to get USBLEGCTLSTS 2: %s.\n", 316 str_error(ret)); 317 usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIx32 ".\n", 314 318 usblegctlsts); 315 319 } … … 319 323 /* Read again Legacy Support register */ 320 324 ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup); 321 CHECK_RET_RETURN(ret, "Failed (%d) to read USBLEGSUP.\n", ret);322 usb_log_debug("USBLEGSUP: %" PRIx n".\n", usblegsup);325 CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret)); 326 usb_log_debug("USBLEGSUP: %" PRIx32 ".\n", usblegsup); 323 327 324 328 /* -
uspace/drv/ohci/hw_struct/hcca.h
r06f9d8fb rc3dafe1 37 37 #include <stdint.h> 38 38 39 /** Host controller communication area. 40 * Shared memory used for communication between the controller and the driver. 41 */ 39 42 typedef struct hcca { 40 43 uint32_t int_ep[32];
Note:
See TracChangeset
for help on using the changeset viewer.