Changes in uspace/drv/ehci-hcd/pci.c [109d55c:c060090] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ehci-hcd/pci.c
r109d55c rc060090 35 35 */ 36 36 #include <errno.h> 37 #include <str_error.h>38 37 #include <assert.h> 39 38 #include <as.h> … … 241 240 void *regs = NULL; 242 241 int ret = pio_enable((void*)reg_base, reg_size, ®s); 243 CHECK_RET_RETURN(ret, "Failed to map registers %p: %s.\n",244 (void *) reg_base, str_error(ret));242 CHECK_RET_RETURN(ret, "Failed(%d) to map registers %p.\n", 243 ret, (void *) reg_base); 245 244 246 245 const uint32_t hcc_params = … … 257 256 uint32_t usblegsup; 258 257 ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup); 259 CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret));258 CHECK_RET_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret); 260 259 usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup); 261 260 … … 264 263 usb_log_debug("Requesting OS control.\n"); 265 264 ret = pci_write8(device, eecp + USBLEGSUP_OFFSET + 3, 1); 266 CHECK_RET_RETURN(ret, "Failed to request OS EHCI control: %s.\n", 267 str_error(ret)); 265 CHECK_RET_RETURN(ret, "Failed(%d) to request OS EHCI control.\n", ret); 268 266 269 267 size_t wait = 0; … … 285 283 ret = pci_write32(device, eecp + USBLEGSUP_OFFSET, 286 284 USBLEGSUP_OS_CONTROL); 287 CHECK_RET_RETURN(ret, "Failed to force OS control: %s.\n", 288 str_error(ret)); 285 CHECK_RET_RETURN(ret, "Failed(%d) to force OS control.\n", ret); 289 286 /* Check capability type here, A value of 01h 290 287 * identifies the capability as Legacy Support. … … 300 297 device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 301 298 CHECK_RET_RETURN(ret, 302 "Failed to get USBLEGCTLSTS: %s.\n", str_error(ret));299 "Failed(%d) to get USBLEGCTLSTS.\n", ret); 303 300 usb_log_debug("USBLEGCTLSTS: %" PRIxn ".\n", 304 301 usblegctlsts); … … 313 310 device, eecp + USBLEGCTLSTS_OFFSET, &usblegctlsts); 314 311 CHECK_RET_RETURN(ret, 315 "Failed to get USBLEGCTLSTS 2: %s.\n", 316 str_error(ret)); 312 "Failed(%d) to get USBLEGCTLSTS 2.\n", ret); 317 313 usb_log_debug("Zeroed USBLEGCTLSTS: %" PRIxn ".\n", 318 314 usblegctlsts); … … 323 319 /* Read again Legacy Support register */ 324 320 ret = pci_read32(device, eecp + USBLEGSUP_OFFSET, &usblegsup); 325 CHECK_RET_RETURN(ret, "Failed to read USBLEGSUP: %s.\n", str_error(ret));321 CHECK_RET_RETURN(ret, "Failed(%d) to read USBLEGSUP.\n", ret); 326 322 usb_log_debug("USBLEGSUP: %" PRIxn ".\n", usblegsup); 327 323
Note:
See TracChangeset
for help on using the changeset viewer.