diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/uacpi.c | 13 | ||||
-rw-r--r-- | sys/dev/usb/xhci.c | 7 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/dev/acpi/uacpi.c b/sys/dev/acpi/uacpi.c index ffec436..6c2bf50 100644 --- a/sys/dev/acpi/uacpi.c +++ b/sys/dev/acpi/uacpi.c @@ -55,6 +55,9 @@ #include <vm/vm.h> #include <string.h> +#define pr_trace(fmt, ...) kprintf("acpi: " fmt, ##__VA_ARGS__) +#define pr_error(...) pr_trace(__VA_ARGS__) + typedef struct { uacpi_io_addr base; uacpi_size length; @@ -633,25 +636,25 @@ uacpi_init(void) ret = uacpi_initialize(0); if (uacpi_unlikely_error(ret)) { - kprintf("uacpi init error: %s\n", uacpi_status_to_string(ret)); + pr_error("uacpi init error: %s\n", uacpi_status_to_string(ret)); return -1; } ret = uacpi_namespace_load(); if (uacpi_unlikely_error(ret)) { - kprintf("uacpi namespace load error: %s\n", uacpi_status_to_string(ret)); + pr_error("uacpi namespace load error: %s\n", uacpi_status_to_string(ret)); return -1; } ret = uacpi_namespace_initialize(); if (uacpi_unlikely_error(ret)) { - kprintf("uacpi namespace init error: %s\n", uacpi_status_to_string(ret)); + pr_error("uacpi namespace init error: %s\n", uacpi_status_to_string(ret)); return -1; } ret = uacpi_finalize_gpe_initialization(); if (uacpi_unlikely_error(ret)) { - kprintf("uacpi GPE init error: %s\n", uacpi_status_to_string(ret)); + pr_error("uacpi GPE init error: %s\n", uacpi_status_to_string(ret)); return -1; } @@ -661,7 +664,7 @@ uacpi_init(void) ); if (uacpi_unlikely_error(ret)) { - kprintf("failed to install power button event: %s\n", + pr_error("failed to install power button event: %s\n", uacpi_status_to_string(ret) ); return -1; diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 5a8da86..e14cb44 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -340,6 +340,13 @@ xhci_reset(struct xhci_hc *hc) return error; } + /* Wait longer if the xHC is not ready */ + error = xhci_poll32(&opregs->usbsts, USBSTS_CNR, false); + if (error < 0) { + pr_error("xhci_reset: xHC ready wait timeout\n"); + return error; + } + return 0; } |