Changes in uspace/drv/ehci-hcd/pci.c [c060090:109d55c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ehci-hcd/pci.c
rc060090 r109d55c 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 CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret)); 259 260 usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup); 260 261 … … 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);302 "Failed to get USBLEGCTLSTS: %s.\n", str_error(ret)); 300 303 usb_log_debug("USBLEGCTLSTS: %" PRIxn ".\n", 301 304 usblegctlsts); … … 310 313 device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 311 314 CHECK_RET_RETURN(ret, 312 "Failed(%d) to get USBLEGCTLSTS 2.\n", ret); 315 "Failed to get USBLEGCTLSTS 2: %s.\n", 316 str_error(ret)); 313 317 usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIxn ".\n", 314 318 usblegctlsts); … … 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);325 CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret)); 322 326 usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup); 323 327
Note:
See TracChangeset
for help on using the changeset viewer.