summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi_init.c8
-rw-r--r--sys/dev/ic/ahci.c10
-rw-r--r--sys/dev/ic/nvme.c20
-rw-r--r--sys/dev/pci/pci.c5
-rw-r--r--sys/dev/usb/xhci.c20
5 files changed, 32 insertions, 31 deletions
diff --git a/sys/dev/acpi/acpi_init.c b/sys/dev/acpi/acpi_init.c
index f3de87d..bc8be77 100644
--- a/sys/dev/acpi/acpi_init.c
+++ b/sys/dev/acpi/acpi_init.c
@@ -54,7 +54,7 @@ acpi_init_hpet(void)
{
#if defined(__x86_64__)
if (hpet_init() != 0) {
- panic("Could not init HPET\n");
+ panic("could not init HPET\n");
}
#endif
}
@@ -107,14 +107,14 @@ acpi_init(void)
/* Fetch the root SDT */
if (rsdp->revision >= 2) {
root_sdt = PHYS_TO_VIRT(rsdp->xsdt_addr);
- pr_trace("Using XSDT as root SDT\n");
+ pr_trace("using XSDT as root SDT\n");
} else {
root_sdt = PHYS_TO_VIRT(rsdp->rsdt_addr);
- pr_trace("Using RSDT as root SDT\n");
+ pr_trace("using RSDT as root SDT\n");
}
if (acpi_checksum(&root_sdt->hdr) != 0) {
- panic("Root SDT checksum is invalid!\n");
+ panic("root SDT checksum is invalid!\n");
}
root_sdt_entries = (root_sdt->hdr.length - sizeof(root_sdt->hdr)) / 4;
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index ec7e68a..5c85013 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -131,7 +131,7 @@ ahci_hba_init(struct ahci_hba *hba)
return error;
}
- pr_trace("Successfully performed a hard reset.\n");
+ pr_trace("successfully performed a hard reset\n");
/*
* The HBA provides backwards compatibility with
@@ -166,25 +166,25 @@ ahci_init(void)
* devices to the PCI bus, acting as an interface
* between them.
*/
- pr_trace("Detected AHCI HBA (%x:%x.%x, slot=%d)\n",
+ pr_trace("IDE storage ctrl <hba? at pci%d:%x.%x.%d>\n",
ahci_dev->bus, ahci_dev->device_id, ahci_dev->func,
ahci_dev->slot);
/* Try to request a general purpose timer */
if (req_timer(TIMER_GP, &tmr) != TMRR_SUCCESS) {
- pr_error("Failed to fetch general purpose timer\n");
+ pr_error("failed to fetch general purpose timer\n");
return -ENODEV;
}
/* Ensure it has get_time_usec() */
if (tmr.get_time_usec == NULL) {
- pr_error("General purpose timer has no get_time_usec()\n");
+ pr_error("general purpose timer has no get_time_usec()\n");
return -ENODEV;
}
/* We also need msleep() */
if (tmr.msleep == NULL) {
- pr_error("General purpose timer has no msleep()\n");
+ pr_error("general purpose timer has no msleep()\n");
return -ENODEV;
}
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 4e1a487..749ac93 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -219,7 +219,7 @@ nvme_stop_ctrl(struct nvme_bar *bar)
mmio_write32(&bar->config, config);
if (nvme_poll_reg(bar, &bar->status, STATUS_RDY, false) < 0) {
- pr_error("Controller reset timeout\n");
+ pr_error("controller reset timeout\n");
return -ETIME;
}
@@ -246,7 +246,7 @@ nvme_start_ctrl(struct nvme_bar *bar)
mmio_write32(&bar->config, config);
if (nvme_poll_reg(bar, &bar->status, STATUS_RDY, true) < 0) {
- pr_error("Controller startup timeout\n");
+ pr_error("controller startup timeout\n");
return -ETIME;
}
@@ -292,7 +292,7 @@ nvme_poll_submit_cmd(struct nvme_queue *q, struct nvme_cmd cmd)
/* Check for timeout */
if (spins > 5) {
- pr_error("Hang while polling phase bit, giving up\n");
+ pr_error("hang while polling phase bit, giving up\n");
return -ETIME;
}
@@ -350,9 +350,9 @@ nvme_log_ctrl_id(struct nvme_id *id)
sn[i] = id->sn[i];
}
- pr_trace("Model number: %s\n", mn);
- pr_trace("Serial number: %s\n", sn);
- pr_trace("Firmware revision: %s\n", fr);
+ pr_trace("model number: %s\n", mn);
+ pr_trace("serial number: %s\n", sn);
+ pr_trace("firmware revision: %s\n", fr);
}
/*
@@ -601,7 +601,7 @@ nvme_init_ctrl(struct nvme_bar *bar)
}
if (nvme_init_ns(&ctrl, nsids[i]) != 0) {
- pr_error("Failed to initialize NSID %d\n", nsids[i]);
+ pr_error("failed to initialize NSID %d\n", nsids[i]);
}
}
@@ -627,19 +627,19 @@ nvme_init(void)
/* Try to request a general purpose timer */
if (req_timer(TIMER_GP, &tmr) != TMRR_SUCCESS) {
- pr_error("Failed to fetch general purpose timer\n");
+ pr_error("failed to fetch general purpose timer\n");
return -ENODEV;
}
/* Ensure it has get_time_usec() */
if (tmr.get_time_usec == NULL) {
- pr_error("General purpose timer has no get_time_usec()\n");
+ pr_error("general purpose timer has no get_time_usec()\n");
return -ENODEV;
}
/* We also need msleep() */
if (tmr.msleep == NULL) {
- pr_error("General purpose timer has no msleep()\n");
+ pr_error("general purpose timer has no msleep()\n");
return -ENODEV;
}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 585480f..8328ffc 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -265,11 +265,12 @@ pci_get_device(struct pci_lookup lookup, uint16_t lookup_type)
int
pci_init(void)
{
+ size_t ndev;
TAILQ_INIT(&device_list);
- pr_trace("Scanning each bus...\n");
/* Recursively scan bus 0 */
pci_scan_bus(0);
-
+ ndev = TAILQ_NELEM(&device_list);
+ pr_trace("detected %d devices at pci*\n", ndev);
return 0;
}
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 550d9b4..67a1e4e 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -58,7 +58,7 @@ static struct timer tmr;
__attribute__((__interrupt__)) static void
xhci_common_isr(void *sf)
{
- pr_trace("Received xHCI interrupt (via PCI MSI-X)\n");
+ pr_trace("received xHCI interrupt (via PCI MSI-X)\n");
}
/*
@@ -145,7 +145,7 @@ xhci_parse_ecp(struct xhci_hc *hc)
break;
case XHCI_ECAP_USBLEGSUP:
/* Begin xHC BIOS handoff to us */
- pr_trace("Establishing xHC ownership...\n");
+ pr_trace("establishing xHC ownership...\n");
val |= XHCI_OS_SEM;
mmio_write32(p, val);
@@ -184,10 +184,10 @@ xhci_init_scratchpads(struct xhci_hc *hc)
return 0;
}
- pr_trace("Using %d pages for xHC scratchpads\n");
+ pr_trace("using %d pages for xHC scratchpads\n");
bufarr = dynalloc_memalign(sizeof(uintptr_t)*max_bufs, 0x1000);
if (bufarr == NULL) {
- pr_error("Failed to allocate scratchpad buffer array\n");
+ pr_error("failed to allocate scratchpad buffer array\n");
return -1;
}
@@ -196,7 +196,7 @@ xhci_init_scratchpads(struct xhci_hc *hc)
memset(PHYS_TO_VIRT(tmp), 0, 0x1000);
if (tmp == 0) {
/* TODO: Shutdown, free memory */
- pr_error("Failed to fill scratchpad buffer array\n");
+ pr_error("failed to fill scratchpad buffer array\n");
return -1;
}
bufarr[i] = tmp;
@@ -392,8 +392,8 @@ xhci_init_ports(struct xhci_hc *hc)
devtype = (ISSET(portsc, XHCI_PORTSC_DR))
? "removable" : "non-removable";
- pr_trace("Detected %s USB device on port %d\n", devtype, i);
- pr_trace("Resetting port %d...\n", i);
+ pr_trace("detected %s USB device on port %d\n", devtype, i);
+ pr_trace("resetting port %d...\n", i);
portsc |= XHCI_PORTSC_PR;
mmio_write32(portsc_p, portsc);
}
@@ -432,7 +432,7 @@ xhci_init_hc(struct xhci_hc *hc)
return -1;
}
- pr_trace("Resetting xHC chip...\n");
+ pr_trace("resetting xHC chip...\n");
if ((error = xhci_reset(hc)) != 0) {
return error;
}
@@ -492,13 +492,13 @@ xhci_init(void)
/* Try to request a general purpose timer */
if (req_timer(TIMER_GP, &tmr) != TMRR_SUCCESS) {
- pr_error("Failed to fetch general purpose timer\n");
+ pr_error("failed to fetch general purpose timer\n");
return -ENODEV;
}
/* Ensure it has get_time_usec() */
if (tmr.get_time_usec == NULL) {
- pr_error("General purpose timer has no get_time_usec()\n");
+ pr_error("general purpose timer has no get_time_usec()\n");
return -ENODEV;
}