aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c2
-rw-r--r--sys/dev/aic7xxx/aic79xx.c6
-rw-r--r--sys/dev/aic7xxx/aic7xxx.c4
-rw-r--r--sys/dev/ale/if_ale.c2
-rw-r--r--sys/dev/amdtemp/amdtemp.c2
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c2
-rw-r--r--sys/dev/bwi/if_bwi.c2
-rw-r--r--sys/dev/cesa/cesa.c4
-rw-r--r--sys/dev/ciss/ciss.c2
-rw-r--r--sys/dev/gpio/acpi_gpiobus.c17
-rw-r--r--sys/dev/gpio/gpiobus.c4
-rw-r--r--sys/dev/gpio/gpiobus_internal.h1
-rw-r--r--sys/dev/igc/if_igc.c2
-rw-r--r--sys/dev/isci/scil/scic_sds_remote_node_context.c4
-rw-r--r--sys/dev/mfi/mfi.c2
-rw-r--r--sys/dev/nvme/nvme_ctrlr.c9
-rw-r--r--sys/dev/nvme/nvme_pci.c48
-rw-r--r--sys/dev/nvme/nvme_private.h6
-rw-r--r--sys/dev/nvmf/controller/nvmft_controller.c2
-rw-r--r--sys/dev/oce/oce_sysctl.c12
-rw-r--r--sys/dev/random/fenestrasX/fx_pool.c3
-rw-r--r--sys/dev/random/random_harvestq.c6
-rw-r--r--sys/dev/thunderbolt/nhi.c1
-rw-r--r--sys/dev/thunderbolt/nhi_pci.c10
-rw-r--r--sys/dev/thunderbolt/nhi_var.h1
-rw-r--r--sys/dev/uart/uart_bus_fdt.c6
-rw-r--r--sys/dev/uart/uart_dev_snps.c10
-rw-r--r--sys/dev/usb/serial/u3g.c2
-rw-r--r--sys/dev/usb/usbdevs2
-rw-r--r--sys/dev/usb/wlan/if_upgt.c6
-rw-r--r--sys/dev/usb/wlan/if_zyd.c2
-rw-r--r--sys/dev/vnic/nicvf_main.c2
32 files changed, 132 insertions, 52 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 3913ec612f79..2fadd6cd32ee 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -179,7 +179,7 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context)
switch (res->Type) {
case ACPI_RESOURCE_TYPE_START_DEPENDENT:
case ACPI_RESOURCE_TYPE_END_DEPENDENT:
- panic("host bridge has depenedent resources");
+ panic("host bridge has dependent resources");
case ACPI_RESOURCE_TYPE_ADDRESS16:
case ACPI_RESOURCE_TYPE_ADDRESS32:
case ACPI_RESOURCE_TYPE_ADDRESS64:
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c
index cee45fa5cc8a..d25f5de282d0 100644
--- a/sys/dev/aic7xxx/aic79xx.c
+++ b/sys/dev/aic7xxx/aic79xx.c
@@ -2015,7 +2015,7 @@ ahd_handle_lqiphase_error(struct ahd_softc *ahd, u_int lqistat1)
ahd_outb(ahd, CLRINT, CLRSCSIINT);
ahd_unpause(ahd);
} else {
- printf("Reseting Channel for LQI Phase error\n");
+ printf("Resetting Channel for LQI Phase error\n");
AHD_CORRECTABLE_ERROR(ahd);
ahd_dump_card_state(ahd);
ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE);
@@ -8179,7 +8179,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
AHD_UNCORRECTABLE_ERROR(ahd);
break;
case SIU_PFC_TMF_NOT_SUPPORTED:
- printf("TMF not supportd\n");
+ printf("TMF not supported\n");
AHD_UNCORRECTABLE_ERROR(ahd);
break;
case SIU_PFC_TMF_FAILED:
@@ -8313,7 +8313,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb)
break;
}
case SCSI_STATUS_OK:
- printf("%s: Interrupted for staus of 0???\n",
+ printf("%s: Interrupted for status of 0???\n",
ahd_name(ahd));
/* FALLTHROUGH */
default:
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c
index 18f68b806948..ce7f8a062b49 100644
--- a/sys/dev/aic7xxx/aic7xxx.c
+++ b/sys/dev/aic7xxx/aic7xxx.c
@@ -78,7 +78,7 @@ struct ahc_hard_error_entry {
static struct ahc_hard_error_entry ahc_hard_errors[] = {
{ ILLHADDR, "Illegal Host Access" },
- { ILLSADDR, "Illegal Sequencer Address referrenced" },
+ { ILLSADDR, "Illegal Sequencer Address referenced" },
{ ILLOPCODE, "Illegal Opcode in sequencer program" },
{ SQPARERR, "Sequencer Parity Error" },
{ DPARERR, "Data-path Parity Error" },
@@ -476,7 +476,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
aic_set_scsi_status(scb, hscb->shared_data.status.scsi_status);
switch (hscb->shared_data.status.scsi_status) {
case SCSI_STATUS_OK:
- printf("%s: Interrupted for staus of 0???\n",
+ printf("%s: Interrupted for status of 0???\n",
ahc_name(ahc));
break;
case SCSI_STATUS_CMD_TERMINATED:
diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c
index fa2306f1525e..09e0820d2c74 100644
--- a/sys/dev/ale/if_ale.c
+++ b/sys/dev/ale/if_ale.c
@@ -813,7 +813,7 @@ ale_sysctl_node(struct ale_softc *sc)
/* Misc statistics. */
ALE_SYSCTL_STAT_ADD32(ctx, child, "reset_brk_seq",
&stats->reset_brk_seq,
- "Controller resets due to broken Rx sequnce number");
+ "Controller resets due to broken Rx sequence number");
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats",
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "ATE statistics");
diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c
index 79ccdc8c79fb..b1ecb014a2b0 100644
--- a/sys/dev/amdtemp/amdtemp.c
+++ b/sys/dev/amdtemp/amdtemp.c
@@ -642,7 +642,7 @@ amdtemp_intrhook(void *arg)
OID_AUTO, "temperature",
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
dev, sensor, amdtemp_sysctl, "IK",
- "Current temparature");
+ "Current temperature");
}
}
if (sc->sc_ich.ich_arg != NULL)
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c b/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c
index a0c27828bbc1..50d7cc0aa7a8 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c
@@ -76,7 +76,7 @@ ar5416IQCalibration(struct ath_hal *ah, uint8_t numChains)
HALDEBUG(ah, HAL_DEBUG_PERCAL,
"Start IQ Cal and Correction for Chain %d\n", i);
HALDEBUG(ah, HAL_DEBUG_PERCAL,
- "Orignal: iq_corr_meas = 0x%08x\n", iqCorrMeas);
+ "Original: iq_corr_meas = 0x%08x\n", iqCorrMeas);
iqCorrNeg = 0;
/* iqCorrMeas is always negative. */
diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c
index 85146d4c4010..80fc5e9e47af 100644
--- a/sys/dev/bwi/if_bwi.c
+++ b/sys/dev/bwi/if_bwi.c
@@ -2900,7 +2900,7 @@ bwi_plcp_header(const struct ieee80211_rate_table *rt,
else if (modtype == IEEE80211_T_DS)
bwi_ds_plcp_header(plcp, pkt_len, rate);
else
- panic("unsupport modulation type %u\n", modtype);
+ panic("unsupported modulation type %u\n", modtype);
}
static int
diff --git a/sys/dev/cesa/cesa.c b/sys/dev/cesa/cesa.c
index 405b619d6e5b..7439dcdbc1ee 100644
--- a/sys/dev/cesa/cesa.c
+++ b/sys/dev/cesa/cesa.c
@@ -286,7 +286,7 @@ cesa_alloc_tdesc(struct cesa_softc *sc)
CESA_GENERIC_ALLOC_LOCKED(sc, ctd, tdesc);
if (!ctd)
- device_printf(sc->sc_dev, "TDMA descriptors pool exhaused. "
+ device_printf(sc->sc_dev, "TDMA descriptors pool exhausted. "
"Consider increasing CESA_TDMA_DESCRIPTORS.\n");
return (ctd);
@@ -299,7 +299,7 @@ cesa_alloc_sdesc(struct cesa_softc *sc, struct cesa_request *cr)
CESA_GENERIC_ALLOC_LOCKED(sc, csd, sdesc);
if (!csd) {
- device_printf(sc->sc_dev, "SA descriptors pool exhaused. "
+ device_printf(sc->sc_dev, "SA descriptors pool exhausted. "
"Consider increasing CESA_SA_DESCRIPTORS.\n");
return (NULL);
}
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index d4ede91f6b35..dd3df631119a 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -3140,7 +3140,7 @@ ciss_cam_action(struct cam_sim *sim, union ccb *ccb)
}
default: /* we can't do this */
- debug(1, "unspported func_code = 0x%x", ccb->ccb_h.func_code);
+ debug(1, "unsupported func_code = 0x%x", ccb->ccb_h.func_code);
ccb->ccb_h.status = CAM_REQ_INVALID;
break;
}
diff --git a/sys/dev/gpio/acpi_gpiobus.c b/sys/dev/gpio/acpi_gpiobus.c
index 0d2455cab399..0c31f4fec16d 100644
--- a/sys/dev/gpio/acpi_gpiobus.c
+++ b/sys/dev/gpio/acpi_gpiobus.c
@@ -304,6 +304,12 @@ acpi_gpiobus_attach_aei(struct acpi_gpiobus_softc *sc, ACPI_HANDLE handle)
devi->gpiobus.pins[i] = pins[i + 1];
free(pins, M_DEVBUF);
+ status = AcpiAttachData(aei_handle, acpi_fake_objhandler, child);
+ if (ACPI_FAILURE(status)) {
+ printf("WARNING: Unable to attach object data to %s - %s\n",
+ acpi_name(aei_handle), AcpiFormatException(status));
+ }
+
bus_attach_children(sc->super_sc.sc_busdev);
}
@@ -427,6 +433,16 @@ acpi_gpiobus_child_location(device_t bus, device_t child, struct sbuf *sb)
return (0);
}
+static void
+acpi_gpiobus_child_deleted(device_t bus, device_t child)
+{
+ struct acpi_gpiobus_ivar *devi = device_get_ivars(child);
+
+ if (acpi_get_device(devi->handle) == child)
+ AcpiDetachData(devi->handle, acpi_fake_objhandler);
+ gpiobus_child_deleted(bus, child);
+}
+
static device_method_t acpi_gpiobus_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, acpi_gpiobus_probe),
@@ -437,6 +453,7 @@ static device_method_t acpi_gpiobus_methods[] = {
DEVMETHOD(bus_read_ivar, acpi_gpiobus_read_ivar),
DEVMETHOD(bus_add_child, acpi_gpiobus_add_child),
DEVMETHOD(bus_child_location, acpi_gpiobus_child_location),
+ DEVMETHOD(bus_child_deleted, acpi_gpiobus_child_deleted),
DEVMETHOD_END
};
diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c
index 698b5e5fdd01..596e468d35f3 100644
--- a/sys/dev/gpio/gpiobus.c
+++ b/sys/dev/gpio/gpiobus.c
@@ -618,7 +618,7 @@ gpiobus_detach(device_t dev)
("gpiobus mutex not initialized"));
GPIOBUS_LOCK_DESTROY(sc);
- if ((err = bus_detach_children(dev)) != 0)
+ if ((err = bus_generic_detach(dev)) != 0)
return (err);
rman_fini(&sc->sc_intr_rman);
@@ -734,7 +734,7 @@ gpiobus_add_child(device_t dev, u_int order, const char *name, int unit)
sizeof(struct gpiobus_ivar)));
}
-static void
+void
gpiobus_child_deleted(device_t dev, device_t child)
{
struct gpiobus_ivar *devi;
diff --git a/sys/dev/gpio/gpiobus_internal.h b/sys/dev/gpio/gpiobus_internal.h
index 58f862343403..be76450b2432 100644
--- a/sys/dev/gpio/gpiobus_internal.h
+++ b/sys/dev/gpio/gpiobus_internal.h
@@ -43,6 +43,7 @@ int gpiobus_read_ivar(device_t, device_t, int, uintptr_t *);
int gpiobus_acquire_pin(device_t, uint32_t);
void gpiobus_release_pin(device_t, uint32_t);
int gpiobus_child_location(device_t, device_t, struct sbuf *);
+void gpiobus_child_deleted(device_t, device_t);
device_t gpiobus_add_child_common(device_t, u_int, const char *, int, size_t);
int gpiobus_add_gpioc(device_t);
diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
index f199a128c783..d6c06803990f 100644
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -2816,7 +2816,7 @@ igc_add_hw_stats(struct igc_softc *sc)
"Oversized Packets Received");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_jabber",
CTLFLAG_RD, &sc->stats.rjc,
- "Recevied Jabber");
+ "Received Jabber");
SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_errs",
CTLFLAG_RD, &sc->stats.rxerrc,
"Receive Errors");
diff --git a/sys/dev/isci/scil/scic_sds_remote_node_context.c b/sys/dev/isci/scil/scic_sds_remote_node_context.c
index aa1e8d840282..42dd81aa1874 100644
--- a/sys/dev/isci/scil/scic_sds_remote_node_context.c
+++ b/sys/dev/isci/scil/scic_sds_remote_node_context.c
@@ -663,7 +663,7 @@ SCI_STATUS scic_sds_remote_node_context_invalidating_state_event_handler(
SCIC_LOG_OBJECT_SSP_REMOTE_TARGET |
SCIC_LOG_OBJECT_SMP_REMOTE_TARGET |
SCIC_LOG_OBJECT_STP_REMOTE_TARGET,
- "SCIC Remote Node Context 0x%x was suspeneded by hardware while being invalidated.\n",
+ "SCIC Remote Node Context 0x%x was suspended by hardware while being invalidated.\n",
this_rnc
));
status = SCI_SUCCESS;
@@ -718,7 +718,7 @@ SCI_STATUS scic_sds_remote_node_context_resuming_state_event_handler(
SCIC_LOG_OBJECT_SSP_REMOTE_TARGET |
SCIC_LOG_OBJECT_SMP_REMOTE_TARGET |
SCIC_LOG_OBJECT_STP_REMOTE_TARGET,
- "SCIC Remote Node Context 0x%x was suspeneded by hardware while being resumed.\n",
+ "SCIC Remote Node Context 0x%x was suspended by hardware while being resumed.\n",
this_rnc
));
status = SCI_SUCCESS;
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c
index 13e5dfc84fd1..a7d98f06aea3 100644
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -2829,7 +2829,7 @@ mfi_check_command_post(struct mfi_softc *sc, struct mfi_command *cm)
if (ld->ld_id == cm->cm_frame->dcmd.mbox[0])
break;
}
- KASSERT(ld != NULL, ("volume dissappeared"));
+ KASSERT(ld != NULL, ("volume disappeared"));
if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) {
mtx_unlock(&sc->mfi_io_lock);
bus_topo_lock();
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index f212759a5500..e607667decf5 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1762,9 +1762,14 @@ noadminq:
bus_release_resource(ctrlr->dev, SYS_RES_IRQ,
rman_get_rid(ctrlr->res), ctrlr->res);
- if (ctrlr->bar4_resource != NULL) {
+ if (ctrlr->msix_table_resource != NULL) {
bus_release_resource(dev, SYS_RES_MEMORY,
- ctrlr->bar4_resource_id, ctrlr->bar4_resource);
+ ctrlr->msix_table_resource_id, ctrlr->msix_table_resource);
+ }
+
+ if (ctrlr->msix_pba_resource != NULL) {
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ ctrlr->msix_pba_resource_id, ctrlr->msix_pba_resource);
}
bus_release_resource(dev, SYS_RES_MEMORY,
diff --git a/sys/dev/nvme/nvme_pci.c b/sys/dev/nvme/nvme_pci.c
index c07a68d2f0dc..cecb05ca0a92 100644
--- a/sys/dev/nvme/nvme_pci.c
+++ b/sys/dev/nvme/nvme_pci.c
@@ -152,11 +152,15 @@ static int
nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr)
{
ctrlr->resource_id = PCIR_BAR(0);
+ ctrlr->msix_table_resource_id = -1;
+ ctrlr->msix_table_resource = NULL;
+ ctrlr->msix_pba_resource_id = -1;
+ ctrlr->msix_pba_resource = NULL;
ctrlr->resource = bus_alloc_resource_any(ctrlr->dev, SYS_RES_MEMORY,
&ctrlr->resource_id, RF_ACTIVE);
- if(ctrlr->resource == NULL) {
+ if (ctrlr->resource == NULL) {
nvme_printf(ctrlr, "unable to allocate pci resource\n");
return (ENOMEM);
}
@@ -166,15 +170,32 @@ nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr)
ctrlr->regs = (struct nvme_registers *)ctrlr->bus_handle;
/*
- * The NVMe spec allows for the MSI-X table to be placed behind
- * BAR 4/5, separate from the control/doorbell registers. Always
- * try to map this bar, because it must be mapped prior to calling
- * pci_alloc_msix(). If the table isn't behind BAR 4/5,
- * bus_alloc_resource() will just return NULL which is OK.
+ * The NVMe spec allows for the MSI-X tables to be placed behind
+ * BAR 4 and/or 5, separate from the control/doorbell registers.
*/
- ctrlr->bar4_resource_id = PCIR_BAR(4);
- ctrlr->bar4_resource = bus_alloc_resource_any(ctrlr->dev, SYS_RES_MEMORY,
- &ctrlr->bar4_resource_id, RF_ACTIVE);
+
+ ctrlr->msix_table_resource_id = pci_msix_table_bar(ctrlr->dev);
+ ctrlr->msix_pba_resource_id = pci_msix_pba_bar(ctrlr->dev);
+
+ if (ctrlr->msix_table_resource_id >= 0 &&
+ ctrlr->msix_table_resource_id != ctrlr->resource_id) {
+ ctrlr->msix_table_resource = bus_alloc_resource_any(ctrlr->dev,
+ SYS_RES_MEMORY, &ctrlr->msix_table_resource_id, RF_ACTIVE);
+ if (ctrlr->msix_table_resource == NULL) {
+ nvme_printf(ctrlr, "unable to allocate msi-x table resource\n");
+ return (ENOMEM);
+ }
+ }
+ if (ctrlr->msix_pba_resource_id >= 0 &&
+ ctrlr->msix_pba_resource_id != ctrlr->resource_id &&
+ ctrlr->msix_pba_resource_id != ctrlr->msix_table_resource_id) {
+ ctrlr->msix_pba_resource = bus_alloc_resource_any(ctrlr->dev,
+ SYS_RES_MEMORY, &ctrlr->msix_pba_resource_id, RF_ACTIVE);
+ if (ctrlr->msix_pba_resource == NULL) {
+ nvme_printf(ctrlr, "unable to allocate msi-x pba resource\n");
+ return (ENOMEM);
+ }
+ }
return (0);
}
@@ -200,9 +221,14 @@ bad:
ctrlr->resource_id, ctrlr->resource);
}
- if (ctrlr->bar4_resource != NULL) {
+ if (ctrlr->msix_table_resource != NULL) {
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ ctrlr->msix_table_resource_id, ctrlr->msix_table_resource);
+ }
+
+ if (ctrlr->msix_pba_resource != NULL) {
bus_release_resource(dev, SYS_RES_MEMORY,
- ctrlr->bar4_resource_id, ctrlr->bar4_resource);
+ ctrlr->msix_pba_resource_id, ctrlr->msix_pba_resource);
}
if (ctrlr->tag)
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 04a47d799350..dd45e1acd0aa 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -235,8 +235,10 @@ struct nvme_controller {
* separate from the control registers which are in BAR 0/1. These
* members track the mapping of BAR 4/5 for that reason.
*/
- int bar4_resource_id;
- struct resource *bar4_resource;
+ int msix_table_resource_id;
+ struct resource *msix_table_resource;
+ int msix_pba_resource_id;
+ struct resource *msix_pba_resource;
int msi_count;
uint32_t enable_aborts;
diff --git a/sys/dev/nvmf/controller/nvmft_controller.c b/sys/dev/nvmf/controller/nvmft_controller.c
index 390467534ca2..e618972f46cf 100644
--- a/sys/dev/nvmf/controller/nvmft_controller.c
+++ b/sys/dev/nvmf/controller/nvmft_controller.c
@@ -31,7 +31,7 @@ nvmft_printf(struct nvmft_controller *ctrlr, const char *fmt, ...)
va_list ap;
size_t retval;
- sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN);
+ sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN | SBUF_INCLUDENUL);
sbuf_set_drain(&sb, sbuf_printf_drain, &retval);
sbuf_printf(&sb, "nvmft%u: ", ctrlr->cntlid);
diff --git a/sys/dev/oce/oce_sysctl.c b/sys/dev/oce/oce_sysctl.c
index 1b903d8d027a..544bec9438c4 100644
--- a/sys/dev/oce/oce_sysctl.c
+++ b/sys/dev/oce/oce_sysctl.c
@@ -716,7 +716,7 @@ oce_add_stats_sysctls_be3(POCE_SOFTC sc,
"Total Received Bytes");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "total_frags",
CTLFLAG_RD, &stats->rx.t_rx_frags, 0,
- "Total Received Fragements");
+ "Total Received Fragments");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "total_mcast_pkts",
CTLFLAG_RD, &stats->rx.t_rx_mcast_pkts, 0,
"Total Received Multicast Packets");
@@ -748,7 +748,7 @@ oce_add_stats_sysctls_be3(POCE_SOFTC sc,
"Receive Packets");
SYSCTL_ADD_QUAD(ctx, queue_stats_list, OID_AUTO, "rx_bytes",
CTLFLAG_RD, &sc->rq[i]->rx_stats.rx_bytes,
- "Recived Bytes");
+ "Received Bytes");
SYSCTL_ADD_UINT(ctx, queue_stats_list, OID_AUTO, "rx_frags",
CTLFLAG_RD, &sc->rq[i]->rx_stats.rx_frags, 0,
"Received Fragments");
@@ -786,7 +786,7 @@ oce_add_stats_sysctls_be3(POCE_SOFTC sc,
"ERX Errors");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "alignment_errors",
CTLFLAG_RD, &stats->u0.be.rx_drops_too_many_frags, 0,
- "RX Alignmnet Errors");
+ "RX Alignment Errors");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "in_range_errors",
CTLFLAG_RD, &stats->u0.be.rx_in_range_errors, 0,
"In Range Errors");
@@ -932,7 +932,7 @@ oce_add_stats_sysctls_xe201(POCE_SOFTC sc,
"Total Received Bytes");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "total_frags",
CTLFLAG_RD, &stats->rx.t_rx_frags, 0,
- "Total Received Fragements");
+ "Total Received Fragments");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "total_mcast_pkts",
CTLFLAG_RD, &stats->rx.t_rx_mcast_pkts, 0,
"Total Received Multicast Packets");
@@ -961,7 +961,7 @@ oce_add_stats_sysctls_xe201(POCE_SOFTC sc,
"Receive Packets");
SYSCTL_ADD_QUAD(ctx, queue_stats_list, OID_AUTO, "rx_bytes",
CTLFLAG_RD, &sc->rq[i]->rx_stats.rx_bytes,
- "Recived Bytes");
+ "Received Bytes");
SYSCTL_ADD_UINT(ctx, queue_stats_list, OID_AUTO, "rx_frags",
CTLFLAG_RD, &sc->rq[i]->rx_stats.rx_frags, 0,
"Received Fragments");
@@ -989,7 +989,7 @@ oce_add_stats_sysctls_xe201(POCE_SOFTC sc,
"CRC Errors");
SYSCTL_ADD_UQUAD(ctx, rx_stat_list, OID_AUTO, "alignment_errors",
CTLFLAG_RD, &stats->u0.xe201.rx_alignment_errors,
- "RX Alignmnet Errors");
+ "RX Alignment Errors");
SYSCTL_ADD_UINT(ctx, rx_stat_list, OID_AUTO, "in_range_errors",
CTLFLAG_RD, &stats->u0.xe201.rx_in_range_errors, 0,
"In Range Errors");
diff --git a/sys/dev/random/fenestrasX/fx_pool.c b/sys/dev/random/fenestrasX/fx_pool.c
index 8e63b345a1bd..b6ffc202769e 100644
--- a/sys/dev/random/fenestrasX/fx_pool.c
+++ b/sys/dev/random/fenestrasX/fx_pool.c
@@ -127,7 +127,7 @@ static const struct fxrng_ent_cls fxrng_garbage = {
*/
static const struct fxrng_ent_char {
const struct fxrng_ent_cls *entc_cls;
-} fxrng_ent_char[ENTROPYSOURCE] = {
+} fxrng_ent_char[/*ENTROPYSOURCE*/] = {
[RANDOM_CACHED] = {
.entc_cls = &fxrng_hi_push,
},
@@ -213,6 +213,7 @@ static const struct fxrng_ent_char {
.entc_cls = &fxrng_hi_pull,
},
};
+CTASSERT(nitems(fxrng_ent_char) == ENTROPYSOURCE);
/* Useful for single-bit-per-source state. */
BITSET_DEFINE(fxrng_bits, ENTROPYSOURCE);
diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c
index 643dbac1fc8b..b591ffd3b544 100644
--- a/sys/dev/random/random_harvestq.c
+++ b/sys/dev/random/random_harvestq.c
@@ -88,7 +88,7 @@ static void random_sources_feed(void);
static __read_mostly bool epoch_inited;
static __read_mostly epoch_t rs_epoch;
-static const char *random_source_descr[ENTROPYSOURCE];
+static const char *random_source_descr[];
/*
* How many events to queue up. We create this many items in
@@ -109,6 +109,7 @@ volatile int random_kthread_control;
* Updates are synchronized by the harvest mutex.
*/
__read_frequently u_int hc_source_mask;
+CTASSERT(ENTROPYSOURCE <= sizeof(hc_source_mask) * NBBY);
struct random_sources {
CK_LIST_ENTRY(random_sources) rrs_entries;
@@ -647,7 +648,7 @@ SYSCTL_PROC(_kern_random_harvest, OID_AUTO, mask_bin,
random_print_harvestmask, "A",
"Entropy harvesting mask (printable)");
-static const char *random_source_descr[ENTROPYSOURCE] = {
+static const char *random_source_descr[/*ENTROPYSOURCE*/] = {
[RANDOM_CACHED] = "CACHED",
[RANDOM_ATTACH] = "ATTACH",
[RANDOM_KEYBOARD] = "KEYBOARD",
@@ -678,6 +679,7 @@ static const char *random_source_descr[ENTROPYSOURCE] = {
[RANDOM_PURE_ARM_TRNG] = "PURE_ARM_TRNG",
/* "ENTROPYSOURCE" */
};
+CTASSERT(nitems(random_source_descr) == ENTROPYSOURCE);
static int
random_print_harvestmask_symbolic(SYSCTL_HANDLER_ARGS)
diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c
index 205e69c16253..30a72652535a 100644
--- a/sys/dev/thunderbolt/nhi.c
+++ b/sys/dev/thunderbolt/nhi.c
@@ -322,6 +322,7 @@ nhi_detach(struct nhi_softc *sc)
tbdev_remove_interface(sc);
nhi_pci_disable_interrupts(sc);
+ nhi_pci_free_interrupts(sc);
nhi_free_ring0(sc);
diff --git a/sys/dev/thunderbolt/nhi_pci.c b/sys/dev/thunderbolt/nhi_pci.c
index 7dacff523cef..865963e275ec 100644
--- a/sys/dev/thunderbolt/nhi_pci.c
+++ b/sys/dev/thunderbolt/nhi_pci.c
@@ -67,7 +67,7 @@ static int nhi_pci_suspend(device_t);
static int nhi_pci_resume(device_t);
static void nhi_pci_free(struct nhi_softc *);
static int nhi_pci_allocate_interrupts(struct nhi_softc *);
-static void nhi_pci_free_interrupts(struct nhi_softc *);
+static void nhi_pci_free_resources(struct nhi_softc *);
static int nhi_pci_icl_poweron(struct nhi_softc *);
static device_method_t nhi_methods[] = {
@@ -253,7 +253,7 @@ static void
nhi_pci_free(struct nhi_softc *sc)
{
- nhi_pci_free_interrupts(sc);
+ nhi_pci_free_resources(sc);
if (sc->parent_dmat != NULL) {
bus_dma_tag_destroy(sc->parent_dmat);
@@ -307,7 +307,7 @@ nhi_pci_allocate_interrupts(struct nhi_softc *sc)
return (error);
}
-static void
+void
nhi_pci_free_interrupts(struct nhi_softc *sc)
{
int i;
@@ -319,7 +319,11 @@ nhi_pci_free_interrupts(struct nhi_softc *sc)
}
pci_release_msi(sc->dev);
+}
+static void
+nhi_pci_free_resources(struct nhi_softc *sc)
+{
if (sc->irq_table != NULL) {
bus_release_resource(sc->dev, SYS_RES_MEMORY,
sc->irq_table_rid, sc->irq_table);
diff --git a/sys/dev/thunderbolt/nhi_var.h b/sys/dev/thunderbolt/nhi_var.h
index 2b9e878af47d..e79ecc954c1f 100644
--- a/sys/dev/thunderbolt/nhi_var.h
+++ b/sys/dev/thunderbolt/nhi_var.h
@@ -217,6 +217,7 @@ struct nhi_dispatch {
int nhi_pci_configure_interrupts(struct nhi_softc *sc);
void nhi_pci_enable_interrupt(struct nhi_ring_pair *r);
void nhi_pci_disable_interrupts(struct nhi_softc *sc);
+void nhi_pci_free_interrupts(struct nhi_softc *sc);
int nhi_pci_get_uuid(struct nhi_softc *sc);
int nhi_read_lc_mailbox(struct nhi_softc *, u_int reg, uint32_t *val);
int nhi_write_lc_mailbox(struct nhi_softc *, u_int reg, uint32_t val);
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c
index 431f2962adb2..e9a7e04e4e0c 100644
--- a/sys/dev/uart/uart_bus_fdt.c
+++ b/sys/dev/uart/uart_bus_fdt.c
@@ -239,6 +239,12 @@ uart_cpu_fdt_probe(struct uart_class **classp, bus_space_tag_t *bst,
}
/*
+ * Grab the default rclk from the uart class.
+ */
+ if (clk == 0)
+ clk = class->uc_rclk;
+
+ /*
* Retrieve serial attributes.
*/
if (uart_fdt_get_shift(node, &shift) != 0)
diff --git a/sys/dev/uart/uart_dev_snps.c b/sys/dev/uart/uart_dev_snps.c
index 6067920e3c2a..0372a220282b 100644
--- a/sys/dev/uart/uart_dev_snps.c
+++ b/sys/dev/uart/uart_dev_snps.c
@@ -113,7 +113,17 @@ struct uart_class uart_snps_class = {
.uc_rclk = 0,
};
+struct uart_class uart_snps_jh7110_class = {
+ "snps",
+ snps_methods,
+ sizeof(struct snps_softc),
+ .uc_ops = &uart_ns8250_ops,
+ .uc_range = 8,
+ .uc_rclk = 24000000,
+};
+
static struct ofw_compat_data compat_data[] = {
+ { "starfive,jh7110-uart", (uintptr_t)&uart_snps_jh7110_class },
{ "snps,dw-apb-uart", (uintptr_t)&uart_snps_class },
{ "marvell,armada-38x-uart", (uintptr_t)&uart_snps_class },
{ NULL, (uintptr_t)NULL }
diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c
index a549f93b2af1..0fc774d83ee1 100644
--- a/sys/dev/usb/serial/u3g.c
+++ b/sys/dev/usb/serial/u3g.c
@@ -531,6 +531,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(QUECTEL, RG520, 0),
U3G_DEV(QUECTEL, EC200, 0),
U3G_DEV(QUECTEL, EC200S, 0),
+ U3G_DEV(QUECTEL, EM060K, 0),
U3G_DEV(QUECTEL, EC200T, 0),
U3G_DEV(QUECTEL, UC200, 0),
U3G_DEV(SIERRA, AC402, 0),
@@ -600,6 +601,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(SIERRA, EM7455_2, 0),
U3G_DEV(SIERRA, EM7565, 0),
U3G_DEV(SIERRA, EM7565_2, 0),
+ U3G_DEV(SIERRA, EM7590, 0),
U3G_DEV(SILABS, SAEL, U3GINIT_SAEL_M460),
U3G_DEV(STELERA, C105, 0),
U3G_DEV(STELERA, E1003, 0),
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 2318e6bd0017..bb039f59ce19 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -4070,6 +4070,7 @@ product QUECTEL RG500 0x0800 Quectel RG500/RM500/RG510/RM510
product QUECTEL RG520 0x0801 Quectel RG520/RM520/SG520
product QUECTEL EC200 0x6000 Quectel EC200/UC200
product QUECTEL EC200S 0x6002 Quectel EC200S
+product QUECTEL EM060K 0x6008 Quectel EM060K
product QUECTEL EC200T 0x6026 Quectel EC200T
product QUECTEL UC200 0x6120 Quectel UC200
@@ -4431,6 +4432,7 @@ product SIERRA EM7455 0x9078 Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-
product SIERRA EM7455_2 0x9079 Sierra Wireless EM7455 Qualcomm Snapdragon X7 LTE-A
product SIERRA EM7565 0x9090 Sierra Wireless EM7565 Qualcomm Snapdragon X7 LTE-A
product SIERRA EM7565_2 0x9091 Sierra Wireless EM7565 Qualcomm Snapdragon X7 LTE-A
+product SIERRA EM7590 0xc081 Sierra Wireless EM7590 Qualcomm Snapdragon X7 LTE-A
/* Sigmatel products */
product SIGMATEL WBT_3052 0x4200 WBT-3052 IrDA/USB Bridge
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c
index 1ab833301b3c..a860cc3e0fa9 100644
--- a/sys/dev/usb/wlan/if_upgt.c
+++ b/sys/dev/usb/wlan/if_upgt.c
@@ -1174,7 +1174,7 @@ upgt_eeprom_parse_freq3(struct upgt_softc *sc, uint8_t *data, int len)
sc->sc_eeprom_freq3[channel] = freq3[i];
- DPRINTF(sc, UPGT_DEBUG_FW, "frequence=%d, channel=%d\n",
+ DPRINTF(sc, UPGT_DEBUG_FW, "frequency=%d, channel=%d\n",
le16toh(sc->sc_eeprom_freq3[channel].freq), channel);
}
}
@@ -1216,7 +1216,7 @@ upgt_eeprom_parse_freq4(struct upgt_softc *sc, uint8_t *data, int len)
sc->sc_eeprom_freq4[channel][j].pad = 0;
}
- DPRINTF(sc, UPGT_DEBUG_FW, "frequence=%d, channel=%d\n",
+ DPRINTF(sc, UPGT_DEBUG_FW, "frequency=%d, channel=%d\n",
le16toh(freq4_1[i].freq), channel);
}
}
@@ -1244,7 +1244,7 @@ upgt_eeprom_parse_freq6(struct upgt_softc *sc, uint8_t *data, int len)
sc->sc_eeprom_freq6[channel] = freq6[i];
- DPRINTF(sc, UPGT_DEBUG_FW, "frequence=%d, channel=%d\n",
+ DPRINTF(sc, UPGT_DEBUG_FW, "frequency=%d, channel=%d\n",
le16toh(sc->sc_eeprom_freq6[channel].freq), channel);
}
}
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c
index 7affdcdce089..b7dfc941224d 100644
--- a/sys/dev/usb/wlan/if_zyd.c
+++ b/sys/dev/usb/wlan/if_zyd.c
@@ -827,7 +827,7 @@ zyd_cmd(struct zyd_softc *sc, uint16_t code, const void *idata, int ilen,
if (error)
device_printf(sc->sc_dev, "command timeout\n");
STAILQ_REMOVE(&sc->sc_rqh, &rq, zyd_rq, rq);
- DPRINTF(sc, ZYD_DEBUG_CMD, "finsihed cmd %p, error = %d \n",
+ DPRINTF(sc, ZYD_DEBUG_CMD, "finished cmd %p, error = %d \n",
&rq, error);
return (error);
diff --git a/sys/dev/vnic/nicvf_main.c b/sys/dev/vnic/nicvf_main.c
index dd44e420c78f..59f7abeacdd5 100644
--- a/sys/dev/vnic/nicvf_main.c
+++ b/sys/dev/vnic/nicvf_main.c
@@ -1402,7 +1402,7 @@ nicvf_allocate_net_interrupts(struct nicvf *nic)
/* MSI-X must be configured by now */
if (!nic->msix_enabled) {
- device_printf(nic->dev, "Cannot alloacte queue interrups. "
+ device_printf(nic->dev, "Cannot alloacte queue interrupts. "
"MSI-X interrupts disabled.\n");
return (ENXIO);
}