From 65428aad141bde884e789e4d5f90c9335eaa3fec Mon Sep 17 00:00:00 2001 From: purplerain Date: Tue, 14 May 2024 02:40:21 +0000 Subject: [PATCH] Cada dia es una batalla mas --- regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c | 4 +- sys/arch/amd64/amd64/process_machdep.c | 6 +- sys/arch/amd64/amd64/vmm_machdep.c | 3 +- sys/arch/amd64/pci/acpipci.c | 3 +- sys/arch/amd64/pci/pci_machdep.c | 86 ++++- sys/arch/arm/armv7/armv7var.h | 2 - sys/arch/arm64/dev/agintc.c | 4 +- sys/arch/arm64/dev/apldart.c | 4 +- sys/arch/arm64/dev/aplefuse.c | 3 +- sys/arch/arm64/dev/aplspi.c | 3 +- sys/arch/armv7/exynos/exiic.c | 1 - sys/arch/armv7/exynos/exmct.c | 4 +- sys/arch/armv7/omap/amdisplay.c | 3 +- sys/arch/armv7/omap/omapid.c | 3 +- sys/arch/armv7/omap/omdisplay.c | 3 +- sys/arch/armv7/omap/omehci.c | 7 +- sys/arch/armv7/omap/prcm.c | 3 +- sys/arch/armv7/omap/prcmvar.h | 3 +- sys/arch/armv7/sunxi/sxitimer.c | 3 +- sys/arch/i386/i386/mpbios.c | 3 +- sys/arch/i386/isa/clock.c | 3 +- sys/arch/i386/isa/npx.c | 3 +- sys/arch/i386/pci/pcibiosvar.h | 4 +- sys/ddb/db_command.c | 3 +- sys/ddb/db_extern.h | 3 +- sys/dev/acpi/acpi.c | 14 +- sys/dev/acpi/acpi_x86.c | 4 +- sys/dev/acpi/acpibtn.c | 6 +- sys/dev/acpi/acpidebug.c | 6 +- sys/dev/acpi/acpidmar.h | 1 - sys/dev/acpi/acpitz.c | 3 +- sys/dev/acpi/acpivar.h | 8 +- sys/dev/acpi/dsdt.c | 9 +- sys/dev/acpi/dsdt.h | 5 +- sys/dev/acpi/dwgpio.c | 3 +- sys/dev/acpi/glkgpio.c | 3 +- sys/dev/acpi/tpm.c | 4 +- sys/dev/adb/ams.c | 3 +- sys/dev/ata/atascsi.c | 3 +- sys/dev/ata/atavar.h | 3 +- sys/dev/cons.h | 3 +- sys/dev/fdt/amlusbphy.c | 4 +- sys/dev/fdt/if_mvpp.c | 4 +- sys/dev/fdt/imxspi.c | 3 +- sys/dev/fdt/qccpu.c | 3 +- sys/dev/fdt/qcgpio_fdt.c | 3 +- sys/dev/fdt/qcrtc.c | 4 +- sys/dev/fdt/qcspmi.c | 3 +- sys/dev/fdt/rkdrm.c | 9 +- sys/dev/fdt/rkspi.c | 3 +- sys/dev/fdt/ssdfb.c | 3 +- sys/dev/fdt/sximmc.c | 3 +- sys/dev/gpio/gpiodcf.c | 3 +- sys/dev/i2c/ietp.h | 4 +- sys/dev/i2c/imt.c | 3 +- sys/dev/i2c/pca9548.c | 3 +- sys/dev/ic/anvar.h | 4 +- sys/dev/ic/atw.c | 6 +- sys/dev/ic/com.c | 3 +- sys/dev/ic/dc.c | 3 +- sys/dev/ic/gemvar.h | 10 +- sys/dev/ic/nvme.c | 303 +++++++++++++++++- sys/dev/ic/nvmereg.h | 44 ++- sys/dev/ic/nvmevar.h | 4 +- sys/dev/ic/qwxvar.h | 4 +- sys/dev/ic/rtl81x9reg.h | 3 +- sys/dev/ic/rtwvar.h | 3 +- sys/dev/ic/siopvar.h | 3 +- sys/dev/ic/smc91cxx.c | 3 +- sys/dev/ic/trm.c | 4 +- sys/dev/isa/fd.c | 3 +- sys/dev/midi.c | 3 +- sys/dev/mii/brswphy.c | 3 +- sys/dev/mii/tqphy.c | 3 +- sys/dev/ofw/openfirm.h | 8 +- sys/dev/pci/agp_i810.c | 5 +- sys/dev/pci/agpvar.h | 8 +- sys/dev/pci/auacer.c | 3 +- sys/dev/pci/auglx.c | 3 +- sys/dev/pci/fms.c | 3 +- sys/dev/pci/gcu.c | 3 +- sys/dev/pci/i82365_pci.c | 4 +- sys/dev/pci/if_aq_pci.c | 5 +- sys/dev/pci/if_em.c | 3 +- sys/dev/pci/if_em_hw.h | 19 +- sys/dev/pci/if_iwn.c | 3 +- sys/dev/pci/if_iwx.c | 3 +- sys/dev/pci/if_ix.c | 4 +- sys/dev/pci/if_vmx.c | 4 +- sys/dev/pci/if_wb.c | 3 +- sys/dev/pci/igc_base.h | 3 +- sys/dev/pci/igc_hw.h | 11 +- sys/dev/pci/ixgb_hw.h | 3 +- sys/dev/pci/ixgbe_82598.c | 3 +- sys/dev/pci/ixgbe_x550.c | 4 +- sys/dev/pci/neo.c | 3 +- sys/dev/pci/pccbb.c | 4 +- sys/dev/pci/pciide.c | 5 +- sys/dev/pci/pciidevar.h | 4 +- sys/dev/pci/pcireg.h | 5 +- sys/dev/pci/pcivar.h | 3 +- sys/dev/pci/ufshci_pci.c | 3 +- sys/dev/pcmcia/com_pcmcia.c | 3 +- sys/dev/pcmcia/pcmcia.c | 3 +- sys/dev/pv/viogpu.c | 4 +- sys/dev/pv/virtiovar.h | 3 +- sys/dev/sbus/agten.c | 3 +- sys/dev/sbus/be.c | 3 +- sys/dev/sbus/zx.c | 4 +- sys/dev/softraid_raid6.c | 3 +- sys/dev/usb/ulpt.c | 4 +- sys/dev/usb/umt.c | 3 +- sys/dev/vscsi.c | 3 +- sys/isofs/cd9660/cd9660_node.h | 3 +- sys/isofs/udf/udf_vnops.c | 4 +- sys/kern/vfs_sync.c | 4 +- sys/kern/vfs_vops.c | 14 +- sys/miscfs/fuse/fuse_vnops.c | 7 +- sys/msdosfs/msdosfs_vnops.c | 8 +- sys/msdosfs/msdosfsmount.h | 3 +- sys/net/if_gif.c | 4 +- sys/net/if_mpw.c | 10 +- sys/net/if_pfsync.h | 3 +- sys/net/if_spppsubr.c | 5 +- sys/net/if_trunk.h | 3 +- sys/net/if_vlan_var.h | 3 +- sys/net/pf_ioctl.c | 3 +- sys/net/pfkeyv2.h | 3 +- sys/net/pfvar.h | 6 +- sys/net/rtable.h | 4 +- sys/net80211/ieee80211_input.c | 3 +- sys/netinet/icmp6.h | 4 +- sys/netinet/ip_gre.h | 4 +- sys/netinet/tcp_var.h | 4 +- sys/netinet6/in6.h | 3 +- sys/netinet6/in6_var.h | 5 +- sys/netinet6/ip6_var.h | 3 +- sys/nfs/nfs_vnops.c | 7 +- sys/ntfs/ntfs_subr.h | 5 +- sys/ntfs/ntfs_vnops.c | 4 +- sys/scsi/mpath.c | 3 +- sys/tmpfs/tmpfs_vnops.c | 11 +- sys/ufs/ext2fs/ext2fs_vnops.c | 7 +- sys/ufs/ffs/ffs_extern.h | 3 +- sys/ufs/ufs/ufs_extern.h | 3 +- sys/ufs/ufs/ufs_vnops.c | 7 +- sys/uvm/uvm_addr.c | 8 +- sys/uvm/uvm_page.h | 3 +- usr.bin/tmux/arguments.c | 8 +- usr.sbin/smtpd/smtpc.c | 3 +- usr.sbin/smtpd/util.c | 20 +- 151 files changed, 617 insertions(+), 465 deletions(-) diff --git a/regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c b/regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c index 22761e2c2..f4e967e02 100644 --- a/regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c +++ b/regress/usr.bin/mandoc/db/dbm_dump/dbm_dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dbm_dump.c,v 1.2 2016/08/30 22:20:03 schwarze Exp $ */ +/* $OpenBSD: dbm_dump.c,v 1.3 2024/05/14 00:31:48 schwarze Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * @@ -196,7 +196,7 @@ dump_str(const char **cp) printf("(NULL)"); return; } - if (**cp <= (char)NAME_MASK) { + if ((unsigned char)**cp <= NAME_MASK) { putchar('['); if (**cp & NAME_FILE) putchar('f'); diff --git a/sys/arch/amd64/amd64/process_machdep.c b/sys/arch/amd64/amd64/process_machdep.c index 363dad2b9..c67d4844b 100644 --- a/sys/arch/amd64/amd64/process_machdep.c +++ b/sys/arch/amd64/amd64/process_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process_machdep.c,v 1.16 2018/06/05 06:39:10 guenther Exp $ */ +/* $OpenBSD: process_machdep.c,v 1.17 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: process_machdep.c,v 1.1 2003/04/26 18:39:31 fvdl Exp $ */ /*- @@ -65,10 +65,6 @@ static __inline struct trapframe *process_frame(struct proc *); static __inline struct fxsave64 *process_fpframe(struct proc *); -#if 0 -static __inline int verr_gdt(struct pmap *, int sel); -static __inline int verr_ldt(struct pmap *, int sel); -#endif static __inline struct trapframe * process_frame(struct proc *p) diff --git a/sys/arch/amd64/amd64/vmm_machdep.c b/sys/arch/amd64/amd64/vmm_machdep.c index b2b7c3401..9487ed98f 100644 --- a/sys/arch/amd64/amd64/vmm_machdep.c +++ b/sys/arch/amd64/amd64/vmm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm_machdep.c,v 1.26 2024/05/03 13:48:29 dv Exp $ */ +/* $OpenBSD: vmm_machdep.c,v 1.27 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2014 Mike Larkin * @@ -115,7 +115,6 @@ int vmm_inject_ud(struct vcpu *); int vmm_inject_gp(struct vcpu *); int vmm_inject_db(struct vcpu *); void vmx_handle_intr(struct vcpu *); -void vmx_handle_intwin(struct vcpu *); void vmx_handle_misc_enable_msr(struct vcpu *); int vmm_get_guest_memtype(struct vm *, paddr_t); int vmx_get_guest_faulttype(void); diff --git a/sys/arch/amd64/pci/acpipci.c b/sys/arch/amd64/pci/acpipci.c index b2808a9ef..f4fb49b4c 100644 --- a/sys/arch/amd64/pci/acpipci.c +++ b/sys/arch/amd64/pci/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.7 2022/02/21 11:03:39 mpi Exp $ */ +/* $OpenBSD: acpipci.c,v 1.8 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -85,7 +85,6 @@ const char *acpipci_hids[] = { NULL }; -void acpipci_attach_deferred(struct device *); int acpipci_print(void *, const char *); int acpipci_parse_resources(int, union acpi_resource *, void *); void acpipci_osc(struct acpipci_softc *); diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index 16d2362f4..30257ab7d 100644 --- a/sys/arch/amd64/pci/pci_machdep.c +++ b/sys/arch/amd64/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.79 2024/02/02 21:13:35 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.80 2024/05/13 10:01:53 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -349,11 +349,55 @@ struct pic msi_pic = { void msi_hwmask(struct pic *pic, int pin) { + pci_chipset_tag_t pc = NULL; /* XXX */ + pcitag_t tag = PCI_MSI_TAG(pin); + int vec = PCI_MSI_VEC(pin); + pcireg_t reg, mask; + int off; + + if (pci_get_capability(pc, tag, PCI_CAP_MSIX, &off, ®) == 0) + return; + + /* We can't mask if per-vector masking isn't implemented. */ + if ((reg & PCI_MSI_MC_PVMASK) == 0) + return; + + if (reg & PCI_MSI_MC_C64) { + mask = pci_conf_read(pc, tag, off + PCI_MSI_MASK64); + pci_conf_write(pc, tag, off + PCI_MSI_MASK64, + mask | (1U << vec)); + } else { + mask = pci_conf_read(pc, tag, off + PCI_MSI_MASK32); + pci_conf_write(pc, tag, off + PCI_MSI_MASK32, + mask | (1U << vec)); + } } void msi_hwunmask(struct pic *pic, int pin) { + pci_chipset_tag_t pc = NULL; /* XXX */ + pcitag_t tag = PCI_MSI_TAG(pin); + int vec = PCI_MSI_VEC(pin); + pcireg_t reg, mask; + int off; + + if (pci_get_capability(pc, tag, PCI_CAP_MSIX, &off, ®) == 0) + return; + + /* We can't mask if per-vector masking isn't implemented. */ + if ((reg & PCI_MSI_MC_PVMASK) == 0) + return; + + if (reg & PCI_MSI_MC_C64) { + mask = pci_conf_read(pc, tag, off + PCI_MSI_MASK64); + pci_conf_write(pc, tag, off + PCI_MSI_MASK64, + mask & ~(1U << vec)); + } else { + mask = pci_conf_read(pc, tag, off + PCI_MSI_MASK32); + pci_conf_write(pc, tag, off + PCI_MSI_MASK32, + mask & ~(1U << vec)); + } } void @@ -531,11 +575,51 @@ struct pic msix_pic = { void msix_hwmask(struct pic *pic, int pin) { + pci_chipset_tag_t pc = NULL; /* XXX */ + bus_space_tag_t memt = X86_BUS_SPACE_MEM; /* XXX */ + bus_space_handle_t memh; + pcitag_t tag = PCI_MSI_TAG(pin); + int entry = PCI_MSI_VEC(pin); + pcireg_t reg; + uint32_t ctrl; + + if (pci_get_capability(pc, tag, PCI_CAP_MSIX, NULL, ®) == 0) + return; + + KASSERT(entry <= PCI_MSIX_MC_TBLSZ(reg)); + + if (pci_msix_table_map(pc, tag, memt, &memh)) + panic("%s: cannot map registers", __func__); + + ctrl = bus_space_read_4(memt, memh, PCI_MSIX_VC(entry)); + bus_space_write_4(memt, memh, PCI_MSIX_VC(entry), + ctrl | PCI_MSIX_VC_MASK); + + pci_msix_table_unmap(pc, tag, memt, memh); } void msix_hwunmask(struct pic *pic, int pin) { + pci_chipset_tag_t pc = NULL; /* XXX */ + bus_space_tag_t memt = X86_BUS_SPACE_MEM; /* XXX */ + bus_space_handle_t memh; + pcitag_t tag = PCI_MSI_TAG(pin); + int entry = PCI_MSI_VEC(pin); + pcireg_t reg; + uint32_t ctrl; + + if (pci_get_capability(pc, tag, PCI_CAP_MSIX, NULL, ®) == 0) + return; + + if (pci_msix_table_map(pc, tag, memt, &memh)) + panic("%s: cannot map registers", __func__); + + ctrl = bus_space_read_4(memt, memh, PCI_MSIX_VC(entry)); + bus_space_write_4(memt, memh, PCI_MSIX_VC(entry), + ctrl & ~PCI_MSIX_VC_MASK); + + pci_msix_table_unmap(pc, tag, memt, memh); } void diff --git a/sys/arch/arm/armv7/armv7var.h b/sys/arch/arm/armv7/armv7var.h index fca402f7f..06955322c 100644 --- a/sys/arch/arm/armv7/armv7var.h +++ b/sys/arch/arm/armv7/armv7var.h @@ -1,3 +1 @@ extern struct bus_space armv7_bs_tag; - -void armv7_intr_bootstrap(vaddr_t); diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index dc04b7e5d..4e7b238a8 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.55 2024/02/03 10:37:25 kettenis Exp $ */ +/* $OpenBSD: agintc.c,v 1.56 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn * Copyright (c) 2018 Mark Kettenis @@ -255,9 +255,7 @@ void agintc_route(struct agintc_softc *, int, int, struct cpu_info *); void agintc_route_irq(void *, int, struct cpu_info *); void agintc_intr_barrier(void *); -void agintc_wait_rwp(struct agintc_softc *sc); void agintc_r_wait_rwp(struct agintc_softc *sc); -uint32_t agintc_r_ictlr(void); int agintc_ipi_ddb(void *v); int agintc_ipi_halt(void *v); diff --git a/sys/arch/arm64/dev/apldart.c b/sys/arch/arm64/dev/apldart.c index 3d285ec6c..c8dbc15ce 100644 --- a/sys/arch/arm64/dev/apldart.c +++ b/sys/arch/arm64/dev/apldart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apldart.c,v 1.20 2024/01/20 11:22:46 kettenis Exp $ */ +/* $OpenBSD: apldart.c,v 1.21 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -241,8 +241,6 @@ int apldart_dmamap_load_raw(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *, int, bus_size_t, int); void apldart_dmamap_unload(bus_dma_tag_t, bus_dmamap_t); -void apldart_write(struct apldart_softc *sc, bus_size_t, uint32_t); - int apldart_match(struct device *parent, void *match, void *aux) { diff --git a/sys/arch/arm64/dev/aplefuse.c b/sys/arch/arm64/dev/aplefuse.c index 53eb1e4e3..b05d82210 100644 --- a/sys/arch/arm64/dev/aplefuse.c +++ b/sys/arch/arm64/dev/aplefuse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplefuse.c,v 1.1 2022/12/17 11:56:44 kettenis Exp $ */ +/* $OpenBSD: aplefuse.c,v 1.2 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -47,7 +47,6 @@ struct cfdriver aplefuse_cd = { }; int aplefuse_nvmem_read(void *, bus_addr_t, void *, bus_size_t); -int aplefuse_nvmem_write(void *, bus_addr_t, const void *, bus_size_t); int aplefuse_match(struct device *parent, void *match, void *aux) diff --git a/sys/arch/arm64/dev/aplspi.c b/sys/arch/arm64/dev/aplspi.c index 4ac110de2..9d1beb21c 100644 --- a/sys/arch/arm64/dev/aplspi.c +++ b/sys/arch/arm64/dev/aplspi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplspi.c,v 1.5 2023/07/23 11:17:50 kettenis Exp $ */ +/* $OpenBSD: aplspi.c,v 1.6 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -89,7 +89,6 @@ int aplspi_acquire_bus(void *, int); void aplspi_release_bus(void *, int); void aplspi_set_cs(struct aplspi_softc *, int, int); -int aplspi_wait_state(struct aplspi_softc *, uint32_t, uint32_t); void aplspi_scan(struct aplspi_softc *); diff --git a/sys/arch/armv7/exynos/exiic.c b/sys/arch/armv7/exynos/exiic.c index 85f59451c..b2d872438 100644 --- a/sys/arch/armv7/exynos/exiic.c +++ b/sys/arch/armv7/exynos/exiic.c @@ -82,7 +82,6 @@ int exiic_detach(struct device *, int); void exiic_scan(struct device *, struct i2cbus_attach_args *, void *); void exiic_setspeed(struct exiic_softc *, int); int exiic_wait_state(struct exiic_softc *, uint32_t, uint32_t, uint32_t); -int exiic_start(struct exiic_softc *, int, int, void *, int); void exiic_xfer_start(struct exiic_softc *); int exiic_xfer_wait(struct exiic_softc *); diff --git a/sys/arch/armv7/exynos/exmct.c b/sys/arch/armv7/exynos/exmct.c index ec30381b8..c32413a18 100644 --- a/sys/arch/armv7/exynos/exmct.c +++ b/sys/arch/armv7/exynos/exmct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exmct.c,v 1.6 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: exmct.c,v 1.7 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -45,8 +45,6 @@ struct exmct_softc *exmct_sc; int exmct_match(struct device *, void *, void *); void exmct_attach(struct device *, struct device *, void *); -void exmct_stop(void); -void exmct_reset(void); const struct cfattach exmct_ca = { sizeof (struct exmct_softc), exmct_match, exmct_attach diff --git a/sys/arch/armv7/omap/amdisplay.c b/sys/arch/armv7/omap/amdisplay.c index 551fb3b18..a85e67e48 100644 --- a/sys/arch/armv7/omap/amdisplay.c +++ b/sys/arch/armv7/omap/amdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdisplay.c,v 1.17 2022/07/15 17:57:25 kettenis Exp $ */ +/* $OpenBSD: amdisplay.c,v 1.18 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2016 Ian Sutton * @@ -91,7 +91,6 @@ struct amdisplay_softc { int amdisplay_match(struct device *, void *, void *); void amdisplay_attach(struct device *, struct device *, void *); int amdisplay_detach(struct device *, int); -int amdisplay_activate(struct device *, int); int amdisplay_intr(void *); int amdisplay_ioctl(void *, u_long, caddr_t, int, struct proc *); diff --git a/sys/arch/armv7/omap/omapid.c b/sys/arch/armv7/omap/omapid.c index 7de7818d7..e2d7d87db 100644 --- a/sys/arch/armv7/omap/omapid.c +++ b/sys/arch/armv7/omap/omapid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omapid.c,v 1.5 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: omapid.c,v 1.6 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2013 Dale Rahn * @@ -44,7 +44,6 @@ struct omapid_softc *omapid_sc; void omapid_attach(struct device *parent, struct device *self, void *args); -void omapid_wpending(int flags); const struct cfattach omapid_ca = { sizeof (struct omapid_softc), NULL, omapid_attach diff --git a/sys/arch/armv7/omap/omdisplay.c b/sys/arch/armv7/omap/omdisplay.c index 66d18cf1e..203bafc01 100644 --- a/sys/arch/armv7/omap/omdisplay.c +++ b/sys/arch/armv7/omap/omdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omdisplay.c,v 1.10 2022/07/15 17:57:25 kettenis Exp $ */ +/* $OpenBSD: omdisplay.c,v 1.11 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2007 Dale Rahn * @@ -453,7 +453,6 @@ void omdisplay_free_screen(void *v, void *cookie); void omdisplay_start(struct omdisplay_softc *sc); void omdisplay_stop(struct omdisplay_softc *sc); int omdisplay_intr(void *v); -void omdisplay_dumpreg(struct omdisplay_softc *sc); const struct cfattach omdisplay_ca = { sizeof (struct omdisplay_softc), omdisplay_match, omdisplay_attach, diff --git a/sys/arch/armv7/omap/omehci.c b/sys/arch/armv7/omap/omehci.c index 9a871aefa..60500b675 100644 --- a/sys/arch/armv7/omap/omehci.c +++ b/sys/arch/armv7/omap/omehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omehci.c,v 1.9 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: omehci.c,v 1.10 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -85,11 +85,6 @@ struct omehci_softc { int omehci_init(struct omehci_softc *); void omehci_soft_phy_reset(struct omehci_softc *sc, unsigned int port); -void omehci_enable(struct omehci_softc *); -void omehci_disable(struct omehci_softc *); -void omehci_utmi_init(struct omehci_softc *sc, unsigned int en_mask); -void misc_setup(struct omehci_softc *sc); -void omehci_uhh_init(struct omehci_softc *sc); const struct cfattach omehci_ca = { sizeof (struct omehci_softc), omehci_match, omehci_attach, diff --git a/sys/arch/armv7/omap/prcm.c b/sys/arch/armv7/omap/prcm.c index 25090c29a..027b8d1a7 100644 --- a/sys/arch/armv7/omap/prcm.c +++ b/sys/arch/armv7/omap/prcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prcm.c,v 1.18 2021/10/24 17:52:28 mpi Exp $ */ +/* $OpenBSD: prcm.c,v 1.19 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * @@ -88,7 +88,6 @@ struct prcm_softc { uint32_t cm2_avail; }; -int prcm_match(struct device *, void *, void *); void prcm_attach(struct device *, struct device *, void *); int prcm_setup_dpll5(struct prcm_softc *); uint32_t prcm_v3_bit(int mod); diff --git a/sys/arch/armv7/omap/prcmvar.h b/sys/arch/armv7/omap/prcmvar.h index 0e823de4c..e65c44a04 100644 --- a/sys/arch/armv7/omap/prcmvar.h +++ b/sys/arch/armv7/omap/prcmvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: prcmvar.h,v 1.8 2020/04/05 13:11:13 kettenis Exp $ */ +/* $OpenBSD: prcmvar.h,v 1.9 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * @@ -17,7 +17,6 @@ void prcm_setclock(int clock, int speed); void prcm_enablemodule(int mod); -void prcm_disablemodule(int mod); #define PRCM_CLK_SPEED_32 0 #define PRCM_CLK_SPEED_SYS 1 diff --git a/sys/arch/armv7/sunxi/sxitimer.c b/sys/arch/armv7/sunxi/sxitimer.c index 267668076..1f4f1e2fb 100644 --- a/sys/arch/armv7/sunxi/sxitimer.c +++ b/sys/arch/armv7/sunxi/sxitimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxitimer.c,v 1.24 2023/09/17 14:50:51 cheloha Exp $ */ +/* $OpenBSD: sxitimer.c,v 1.25 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2013 Raphael Graf @@ -75,7 +75,6 @@ int sxitimer_match(struct device *, void *, void *); void sxitimer_attach(struct device *, struct device *, void *); int sxitimer_tickintr(void *); -int sxitimer_statintr(void *); void sxitimer_cpu_initclocks(void); void sxitimer_cpu_startclock(void); void sxitimer_setstatclockrate(int); diff --git a/sys/arch/i386/i386/mpbios.c b/sys/arch/i386/i386/mpbios.c index 25e07d88d..fb1b70357 100644 --- a/sys/arch/i386/i386/mpbios.c +++ b/sys/arch/i386/i386/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.45 2023/01/30 10:49:05 jsg Exp $ */ +/* $OpenBSD: mpbios.c,v 1.46 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: mpbios.c,v 1.2 2002/10/01 12:56:57 fvdl Exp $ */ /*- @@ -152,7 +152,6 @@ struct mp_map int mp_print(void *, const char *); int mp_match(struct device *, void *, void *); -int mpbios_cpu_start(struct cpu_info *); const void *mpbios_search(struct device *, paddr_t, int, struct mp_map *); static __inline int mpbios_cksum(const void *, int); diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c index a9d198a8e..3363ba15f 100644 --- a/sys/arch/i386/isa/clock.c +++ b/sys/arch/i386/isa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.68 2023/09/17 14:50:51 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.69 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */ /*- @@ -105,7 +105,6 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -void spinwait(int); int clockintr(void *); int gettick(void); int rtcget(mc_todregs *); diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c index c20ded735..ff2afb190 100644 --- a/sys/arch/i386/isa/npx.c +++ b/sys/arch/i386/isa/npx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npx.c,v 1.75 2024/04/29 00:29:48 jsg Exp $ */ +/* $OpenBSD: npx.c,v 1.76 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: npx.c,v 1.57 1996/05/12 23:12:24 mycroft Exp $ */ #if 0 @@ -157,7 +157,6 @@ npxdna_notset(struct cpu_info *ci) int (*npxdna_func)(struct cpu_info *) = npxdna_notset; int npxdna_s87(struct cpu_info *); int npxdna_xmm(struct cpu_info *); -void npxexit(void); /* * Special interrupt handlers. Someday intr0-intr15 will be used to count diff --git a/sys/arch/i386/pci/pcibiosvar.h b/sys/arch/i386/pci/pcibiosvar.h index a03ed2c2a..3bfbe60ba 100644 --- a/sys/arch/i386/pci/pcibiosvar.h +++ b/sys/arch/i386/pci/pcibiosvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcibiosvar.h,v 1.18 2010/07/02 16:11:19 jsg Exp $ */ +/* $OpenBSD: pcibiosvar.h,v 1.19 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: pcibios.h,v 1.2 2000/04/28 17:15:16 uch Exp $ */ /* @@ -105,8 +105,6 @@ struct pcibios_pir_header { #define PIR_DEVFUNC_FUNCTION(devfunc) ((devfunc) & 7) #define PIR_DEVFUNC_COMPOSE(dev,func) ((((dev) &0x1f) << 3) | ((func) & 7)) -void pcibios_init(void); - extern struct pcibios_pir_header pcibios_pir_header; extern struct pcibios_intr_routing *pcibios_pir_table; extern int pcibios_pir_table_nentries; diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index ca4226c51..562053d11 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.100 2023/09/19 11:35:30 claudio Exp $ */ +/* $OpenBSD: db_command.c,v 1.101 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -115,7 +115,6 @@ void db_stack_trace_cmd(db_expr_t, int, db_expr_t, char *); void db_dmesg_cmd(db_expr_t, int, db_expr_t, char *); void db_show_panic_cmd(db_expr_t, int, db_expr_t, char *); void db_bcstats_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_struct_offset_cmd(db_expr_t, int, db_expr_t, char *); void db_ctf_show_struct(db_expr_t, int, db_expr_t, char *); void db_show_regs(db_expr_t, int, db_expr_t, char *); void db_write_cmd(db_expr_t, int, db_expr_t, char *); diff --git a/sys/ddb/db_extern.h b/sys/ddb/db_extern.h index 20b8a3bce..172b9c4e9 100644 --- a/sys/ddb/db_extern.h +++ b/sys/ddb/db_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_extern.h,v 1.21 2019/11/07 13:16:25 mpi Exp $ */ +/* $OpenBSD: db_extern.h,v 1.22 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: db_extern.h,v 1.1 1996/02/05 01:57:00 christos Exp $ */ /* @@ -55,7 +55,6 @@ int db_readline(char *, int); void db_trap(int, int); /* db_prof.c */ -void db_prof_init(void); int db_prof_enable(void); void db_prof_disable(void); diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 70b67bb8f..f53c84e14 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.426 2024/01/08 19:52:29 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.428 2024/05/13 19:56:37 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -106,8 +106,6 @@ void acpi_create_thread(void *); void acpi_init_pm(struct acpi_softc *); int acpi_founddock(struct aml_node *, void *); -int acpi_foundpss(struct aml_node *, void *); -int acpi_foundtmp(struct aml_node *, void *); int acpi_foundprw(struct aml_node *, void *); int acpi_foundvideo(struct aml_node *, void *); int acpi_foundsbs(struct aml_node *node, void *); @@ -1965,6 +1963,12 @@ acpi_sleep_task(void *arg0, int sleepmode) #endif /* SMALL_KERNEL */ +int +acpi_resuming(struct acpi_softc *sc) +{ + return (getuptime() < sc->sc_resume_time + 10); +} + void acpi_reset(void) { @@ -2031,6 +2035,10 @@ acpi_pbtn_task(void *arg0, int dummy) en | ACPI_PM1_PWRBTN_EN); splx(s); + /* Ignore button events if we're resuming. */ + if (acpi_resuming(sc)) + return; + switch (pwr_action) { case 0: break; diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index a9a9b838b..78140b245 100644 --- a/sys/dev/acpi/acpi_x86.c +++ b/sys/dev/acpi/acpi_x86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_x86.c,v 1.17 2023/07/06 06:58:07 deraadt Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.18 2024/05/13 19:56:37 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -114,6 +114,8 @@ sleep_resume(void *v) { struct acpi_softc *sc = v; + sc->sc_resume_time = getuptime(); + acpibtn_disable_psw(); /* disable _LID for wakeup */ /* 3rd resume AML step: _TTS(runstate) */ diff --git a/sys/dev/acpi/acpibtn.c b/sys/dev/acpi/acpibtn.c index 373f05e13..bda94a9a4 100644 --- a/sys/dev/acpi/acpibtn.c +++ b/sys/dev/acpi/acpibtn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpibtn.c,v 1.51 2023/06/29 20:58:08 dv Exp $ */ +/* $OpenBSD: acpibtn.c,v 1.52 2024/05/13 19:56:37 kettenis Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * @@ -229,6 +229,10 @@ acpibtn_notify(struct aml_node *node, int notify_type, void *arg) dnprintf(10, "acpibtn_notify: %.2x %s\n", notify_type, sc->sc_devnode->name); + /* Ignore button events if we're resuming. */ + if (acpi_resuming(sc->sc_acpi)) + return (0); + switch (sc->sc_btn_type) { case ACPIBTN_LID: #ifndef SMALL_KERNEL diff --git a/sys/dev/acpi/acpidebug.c b/sys/dev/acpi/acpidebug.c index e9dfeec95..673371d6a 100644 --- a/sys/dev/acpi/acpidebug.c +++ b/sys/dev/acpi/acpidebug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpidebug.c,v 1.33 2022/08/10 16:58:16 patrick Exp $ */ +/* $OpenBSD: acpidebug.c,v 1.34 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * @@ -48,10 +48,6 @@ void db_aml_showvalue(struct aml_value *); void db_aml_walktree(struct aml_node *); void db_disprint(void *, const char *, ...); -const char *db_aml_fieldacc(int); -const char *db_aml_fieldlock(int); -const char *db_aml_fieldupdate(int); - /* name of scope for lexer */ char scope[80]; diff --git a/sys/dev/acpi/acpidmar.h b/sys/dev/acpi/acpidmar.h index 55dba87b9..61d02248a 100644 --- a/sys/dev/acpi/acpidmar.h +++ b/sys/dev/acpi/acpidmar.h @@ -531,6 +531,5 @@ enum { void acpidmar_pci_hook(pci_chipset_tag_t, struct pci_attach_args *); void dmar_ptmap(bus_dma_tag_t, bus_addr_t); -void acpidmar_sw(int); #define __EXTRACT(v,m) (((v) >> m##_SHIFT) & m##_MASK) diff --git a/sys/dev/acpi/acpitz.c b/sys/dev/acpi/acpitz.c index 392305793..4099b3b33 100644 --- a/sys/dev/acpi/acpitz.c +++ b/sys/dev/acpi/acpitz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpitz.c,v 1.59 2022/08/10 16:58:16 patrick Exp $ */ +/* $OpenBSD: acpitz.c,v 1.60 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2006 Can Erkin Acar * Copyright (c) 2005 Marco Peereboom @@ -78,7 +78,6 @@ struct cfdriver acpitz_cd = { void acpitz_init_perf(void *); void acpitz_setperf(int); -void acpitz_monitor(struct acpitz_softc *); void acpitz_refresh(void *); int acpitz_notify(struct aml_node *, int, void *); int acpitz_gettempreading(struct acpitz_softc *, char *); diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 20521653b..b29c9a6b3 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.125 2023/11/29 03:41:31 jsg Exp $ */ +/* $OpenBSD: acpivar.h,v 1.127 2024/05/13 19:56:37 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -269,6 +269,7 @@ struct acpi_softc { struct aml_node *sc_sst; struct aml_node *sc_wak; int sc_state; + time_t sc_resume_time; struct acpiec_softc *sc_ec; /* XXX assume single EC */ struct acpi_ac_head sc_ac; @@ -340,7 +341,7 @@ int acpi_sleep_cpu(struct acpi_softc *, int); void acpi_sleep_pm(struct acpi_softc *, int); void acpi_resume_pm(struct acpi_softc *, int); void acpi_resume_cpu(struct acpi_softc *, int); -void acpi_sleep_walk(struct acpi_softc *, int); +int acpi_resuming(struct acpi_softc *); #define ACPI_IOREAD 0 #define ACPI_IOWRITE 1 @@ -354,12 +355,9 @@ void acpi_register_gsb(struct acpi_softc *, struct aml_node *); int acpi_set_gpehandler(struct acpi_softc *, int, int (*)(struct acpi_softc *, int, void *), void *, int); -void acpi_enable_gpe(struct acpi_softc *, uint32_t); -int acpiec_intr(struct acpiec_softc *); void acpiec_read(struct acpiec_softc *, uint8_t, int, uint8_t *); void acpiec_write(struct acpiec_softc *, uint8_t, int, uint8_t *); -void acpiec_handle_events(struct acpiec_softc *); #if NACPIPWRRES > 0 int acpipwrres_ref_incr(struct acpipwrres_softc *, struct aml_node *); diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index 654a37c09..d95cba6bb 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.266 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: dsdt.c,v 1.267 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave * @@ -78,13 +78,6 @@ void aml_bufcpy(void *, int, const void *, int, int); int aml_pc(uint8_t *); -struct aml_value *aml_parseop(struct aml_scope *, struct aml_value *,int); -struct aml_value *aml_parsetarget(struct aml_scope *, struct aml_value *, - struct aml_value **); -struct aml_value *aml_parseterm(struct aml_scope *, struct aml_value *); - -struct aml_value *aml_evaltarget(struct aml_scope *scope, - struct aml_value *res); int aml_evalterm(struct aml_scope *scope, struct aml_value *raw, struct aml_value *dst); diff --git a/sys/dev/acpi/dsdt.h b/sys/dev/acpi/dsdt.h index f63d8b4ac..b28a24e91 100644 --- a/sys/dev/acpi/dsdt.h +++ b/sys/dev/acpi/dsdt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.h,v 1.81 2024/01/08 19:52:29 kettenis Exp $ */ +/* $OpenBSD: dsdt.h,v 1.82 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2005 Marco Peereboom * @@ -51,8 +51,6 @@ struct aml_value *aml_allocvalue(int, int64_t, const void *); void aml_freevalue(struct aml_value *); void aml_notify(struct aml_node *, int); void aml_showvalue(struct aml_value *); -void aml_walkroot(void); -void aml_walktree(struct aml_node *); void aml_find_node(struct aml_node *, const char *, int (*)(struct aml_node *, void *), void *); @@ -325,7 +323,6 @@ const char *aml_val_to_string(const struct aml_value *); void aml_disasm(struct aml_scope *scope, int lvl, void (*dbprintf)(void *, const char *, ...), void *arg); -int aml_getpci(struct aml_node *, int64_t *); int aml_evalhid(struct aml_node *, struct aml_value *); int acpi_walkmem(int, const char *); diff --git a/sys/dev/acpi/dwgpio.c b/sys/dev/acpi/dwgpio.c index 87a3cbc61..58542d0d6 100644 --- a/sys/dev/acpi/dwgpio.c +++ b/sys/dev/acpi/dwgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwgpio.c,v 1.7 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: dwgpio.c,v 1.8 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -91,7 +91,6 @@ int dwgpio_found_hid(struct aml_node *, void *); int dwgpio_read_pin(void *, int); void dwgpio_write_pin(void *, int, int); void dwgpio_intr_establish(void *, int, int, int (*)(void *), void *); -int dwgpio_pin_intr(struct dwgpio_softc *, int); int dwgpio_intr(void *); int diff --git a/sys/dev/acpi/glkgpio.c b/sys/dev/acpi/glkgpio.c index 5eccb72e4..0c99e94fa 100644 --- a/sys/dev/acpi/glkgpio.c +++ b/sys/dev/acpi/glkgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glkgpio.c,v 1.6 2022/10/20 20:40:57 kettenis Exp $ */ +/* $OpenBSD: glkgpio.c,v 1.7 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * Copyright (c) 2019 James Hastings @@ -73,7 +73,6 @@ const char *glkgpio_hids[] = { NULL }; -int glkgpio_parse_resources(int, union acpi_resource *, void *); int glkgpio_read_pin(void *, int); void glkgpio_write_pin(void *, int, int); void glkgpio_intr_establish(void *, int, int, int (*)(void *), void *); diff --git a/sys/dev/acpi/tpm.c b/sys/dev/acpi/tpm.c index a00368c38..e4bf6dc60 100644 --- a/sys/dev/acpi/tpm.c +++ b/sys/dev/acpi/tpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tpm.c,v 1.18 2023/08/15 08:27:29 miod Exp $ */ +/* $OpenBSD: tpm.c,v 1.19 2024/05/13 01:15:50 jsg Exp $ */ /* * Minimal interface to Trusted Platform Module chips implementing the @@ -218,8 +218,6 @@ int tpm_request_locality_tis(struct tpm_softc *, int); int tpm_request_locality_crb(struct tpm_softc *, int); void tpm_release_locality_tis(struct tpm_softc *); void tpm_release_locality_crb(struct tpm_softc *); -int tpm_getburst_tis(struct tpm_softc *); -int tpm_getburst_crb(struct tpm_softc *); uint8_t tpm_status(struct tpm_softc *); uint32_t tpm2_start_method(struct acpi_softc *); diff --git a/sys/dev/adb/ams.c b/sys/dev/adb/ams.c index 7b79b78c0..791f8f357 100644 --- a/sys/dev/adb/ams.c +++ b/sys/dev/adb/ams.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ams.c,v 1.8 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: ams.c,v 1.9 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */ /* @@ -70,7 +70,6 @@ const struct wsmouse_accessops ams_accessops = { void ems_init(struct ams_softc *); void ms_adbcomplete(caddr_t buffer, caddr_t data_area, int adb_command); -void ms_handoff(adb_event_t *event, struct ams_softc *); void ms_processevent(adb_event_t *event, struct ams_softc *); int diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 934ed4256..029354e13 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.153 2022/04/16 19:19:58 naddy Exp $ */ +/* $OpenBSD: atascsi.c,v 1.154 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -128,7 +128,6 @@ void atascsi_atapi_cmd(struct scsi_xfer *); void atascsi_atapi_cmd_done(struct ata_xfer *); void atascsi_pmp_cmd(struct scsi_xfer *); -void atascsi_pmp_cmd_done(struct ata_xfer *); void atascsi_pmp_sense(struct scsi_xfer *xs); void atascsi_pmp_inq(struct scsi_xfer *xs); diff --git a/sys/dev/ata/atavar.h b/sys/dev/ata/atavar.h index 0ee4c95c3..5622beedf 100644 --- a/sys/dev/ata/atavar.h +++ b/sys/dev/ata/atavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atavar.h,v 1.22 2022/01/09 05:42:37 jsg Exp $ */ +/* $OpenBSD: atavar.h,v 1.23 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: atavar.h,v 1.13 1999/03/10 13:11:43 bouyer Exp $ */ /* @@ -168,7 +168,6 @@ void wdc_reset_channel(struct ata_drive_datas *, int); int wdc_ata_addref(struct ata_drive_datas *); void wdc_ata_delref(struct ata_drive_datas *); -void wdc_ata_kill_pending(struct ata_drive_datas *); int ata_get_params(struct ata_drive_datas*, u_int8_t, struct ataparams *); diff --git a/sys/dev/cons.h b/sys/dev/cons.h index 7dedd481a..0626c8037 100644 --- a/sys/dev/cons.h +++ b/sys/dev/cons.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cons.h,v 1.19 2022/07/02 08:50:41 visa Exp $ */ +/* $OpenBSD: cons.h,v 1.20 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: cons.h,v 1.14 1996/03/14 19:08:35 christos Exp $ */ /* @@ -86,7 +86,6 @@ int cngetc(void); void cnputc(int); void cnpollc(int); void cnbell(u_int, u_int, u_int); -void cnrint(void); void nullcnpollc(dev_t, int); /* console-specific types */ diff --git a/sys/dev/fdt/amlusbphy.c b/sys/dev/fdt/amlusbphy.c index 9ceb64afb..67e354da0 100644 --- a/sys/dev/fdt/amlusbphy.c +++ b/sys/dev/fdt/amlusbphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amlusbphy.c,v 1.3 2022/01/09 05:42:37 jsg Exp $ */ +/* $OpenBSD: amlusbphy.c,v 1.4 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2019 Mark Kettenis * @@ -109,8 +109,6 @@ struct cfdriver amlusbphy_cd = { }; int amlusbphy_enable(void *, uint32_t *); -uint16_t amlusbphy_read(struct amlusbphy_softc *, bus_addr_t); -void amlusbphy_write(struct amlusbphy_softc *, bus_addr_t, uint16_t); int amlusbphy_match(struct device *parent, void *match, void *aux) diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c index f3347fa38..e9c2cd220 100644 --- a/sys/dev/fdt/if_mvpp.c +++ b/sys/dev/fdt/if_mvpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvpp.c,v 1.52 2024/03/18 21:37:44 patrick Exp $ */ +/* $OpenBSD: if_mvpp.c,v 1.53 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis * Copyright (c) 2017, 2020 Patrick Wildt @@ -284,7 +284,6 @@ void mvpp2_inband_statchg(struct mvpp2_port *); void mvpp2_port_change(struct mvpp2_port *); void mvpp2_tick(void *); -void mvpp2_rxtick(void *); int mvpp2_link_intr(void *); int mvpp2_intr(void *); @@ -322,7 +321,6 @@ struct mvpp2_dmamem * mvpp2_dmamem_alloc(struct mvpp2_softc *, bus_size_t, bus_size_t); void mvpp2_dmamem_free(struct mvpp2_softc *, struct mvpp2_dmamem *); struct mbuf *mvpp2_alloc_mbuf(struct mvpp2_softc *, bus_dmamap_t); -void mvpp2_fill_rx_ring(struct mvpp2_softc *); void mvpp2_interrupts_enable(struct mvpp2_port *, int); void mvpp2_interrupts_disable(struct mvpp2_port *, int); diff --git a/sys/dev/fdt/imxspi.c b/sys/dev/fdt/imxspi.c index 705baaeae..9b0922a4c 100644 --- a/sys/dev/fdt/imxspi.c +++ b/sys/dev/fdt/imxspi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxspi.c,v 1.4 2022/02/14 00:53:40 jsg Exp $ */ +/* $OpenBSD: imxspi.c,v 1.5 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2018 Patrick Wildt * @@ -106,7 +106,6 @@ int imxspi_match(struct device *, void *, void *); void imxspi_attach(struct device *, struct device *, void *); void imxspi_attachhook(struct device *); int imxspi_detach(struct device *, int); -int imxspi_intr(void *); void imxspi_config(void *, struct spi_config *); uint32_t imxspi_clkdiv(struct imxspi_softc *, uint32_t); diff --git a/sys/dev/fdt/qccpu.c b/sys/dev/fdt/qccpu.c index 5732dfaa0..8e953c4cf 100644 --- a/sys/dev/fdt/qccpu.c +++ b/sys/dev/fdt/qccpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qccpu.c,v 1.2 2023/07/01 18:59:11 drahn Exp $ */ +/* $OpenBSD: qccpu.c,v 1.3 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2023 Dale Rahn * @@ -78,7 +78,6 @@ struct qccpu_softc { int qccpu_match(struct device *, void *, void *); void qccpu_attach(struct device *, struct device *, void *); -void qccpu_enable(void *, uint32_t *, int); int qccpu_set_frequency(void *, uint32_t *, uint32_t); uint32_t qccpu_get_frequency(void *, uint32_t *); uint32_t qccpu_lut_to_freq(struct qccpu_softc *, int, uint32_t); diff --git a/sys/dev/fdt/qcgpio_fdt.c b/sys/dev/fdt/qcgpio_fdt.c index 6af1f684b..ac1f673d4 100644 --- a/sys/dev/fdt/qcgpio_fdt.c +++ b/sys/dev/fdt/qcgpio_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qcgpio_fdt.c,v 1.2 2022/11/08 11:51:34 patrick Exp $ */ +/* $OpenBSD: qcgpio_fdt.c,v 1.3 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -93,7 +93,6 @@ void qcgpio_fdt_intr_disestablish(void *); void qcgpio_fdt_intr_enable(void *); void qcgpio_fdt_intr_disable(void *); void qcgpio_fdt_intr_barrier(void *); -int qcgpio_fdt_pin_intr(struct qcgpio_softc *, int); int qcgpio_fdt_intr(void *); int diff --git a/sys/dev/fdt/qcrtc.c b/sys/dev/fdt/qcrtc.c index 22783cd82..de2921084 100644 --- a/sys/dev/fdt/qcrtc.c +++ b/sys/dev/fdt/qcrtc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qcrtc.c,v 1.3 2023/07/22 22:48:35 patrick Exp $ */ +/* $OpenBSD: qcrtc.c,v 1.4 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2022 Patrick Wildt * @@ -60,8 +60,6 @@ struct cfdriver qcrtc_cd = { int qcrtc_gettime(struct todr_chip_handle *, struct timeval *); int qcrtc_settime(struct todr_chip_handle *, struct timeval *); -void qcrtc_tick(void *); - extern int qcscm_uefi_rtc_get(uint32_t *); extern int qcscm_uefi_rtc_set(uint32_t); diff --git a/sys/dev/fdt/qcspmi.c b/sys/dev/fdt/qcspmi.c index f99e888ca..abf1c2395 100644 --- a/sys/dev/fdt/qcspmi.c +++ b/sys/dev/fdt/qcspmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qcspmi.c,v 1.3 2022/12/21 23:26:54 patrick Exp $ */ +/* $OpenBSD: qcspmi.c,v 1.4 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2022 Patrick Wildt * @@ -165,7 +165,6 @@ void qcspmi_intr_disestablish(void *); void qcspmi_intr_enable(void *); void qcspmi_intr_disable(void *); void qcspmi_intr_barrier(void *); -int qcspmi_pin_intr(struct qcspmi_softc *, int); int qcspmi_intr(void *); const struct cfattach qcspmi_ca = { diff --git a/sys/dev/fdt/rkdrm.c b/sys/dev/fdt/rkdrm.c index 16f4374ca..c3f189da6 100644 --- a/sys/dev/fdt/rkdrm.c +++ b/sys/dev/fdt/rkdrm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkdrm.c,v 1.21 2024/02/15 09:48:03 jsg Exp $ */ +/* $OpenBSD: rkdrm.c,v 1.22 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: rk_drm.c,v 1.3 2019/12/15 01:00:58 mrg Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -51,11 +51,6 @@ int rkdrm_match(struct device *, void *, void *); void rkdrm_attach(struct device *, struct device *, void *); void rkdrm_attachhook(struct device *); -#ifdef notyet -vmem_t *rkdrm_alloc_cma_pool(struct drm_device *, size_t); -#endif - -int rkdrm_load(struct drm_device *, unsigned long); int rkdrm_unload(struct drm_device *); struct drm_driver rkdrm_driver = { @@ -212,8 +207,6 @@ int rkdrm_show_screen(void *, void *, int, void (*)(void *, int, int), void *); void rkdrm_doswitch(void *); void rkdrm_enter_ddb(void *, void *); -int rkdrm_get_param(struct wsdisplay_param *); -int rkdrm_set_param(struct wsdisplay_param *); struct wsscreen_descr rkdrm_stdscreen = { "std", diff --git a/sys/dev/fdt/rkspi.c b/sys/dev/fdt/rkspi.c index 0f0fc4d30..bd3fdd93d 100644 --- a/sys/dev/fdt/rkspi.c +++ b/sys/dev/fdt/rkspi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkspi.c,v 1.1 2024/03/02 19:50:30 kettenis Exp $ */ +/* $OpenBSD: rkspi.c,v 1.2 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2018,2023 Patrick Wildt * Copyright (c) 2024 Mark Kettenis @@ -105,7 +105,6 @@ struct rkspi_softc { int rkspi_match(struct device *, void *, void *); void rkspi_attach(struct device *, struct device *, void *); int rkspi_detach(struct device *, int); -int rkspi_intr(void *); void rkspi_config(void *, struct spi_config *); int rkspi_transfer(void *, char *, char *, int, int); diff --git a/sys/dev/fdt/ssdfb.c b/sys/dev/fdt/ssdfb.c index 6a172850b..692f1ef25 100644 --- a/sys/dev/fdt/ssdfb.c +++ b/sys/dev/fdt/ssdfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssdfb.c,v 1.13 2022/07/15 17:57:26 kettenis Exp $ */ +/* $OpenBSD: ssdfb.c,v 1.14 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2018 Patrick Wildt * @@ -119,7 +119,6 @@ void ssdfb_write_command(struct ssdfb_softc *, char *, size_t); void ssdfb_write_data(struct ssdfb_softc *, char *, size_t); void ssdfb_init(struct ssdfb_softc *); -void ssdfb_update(void *); void ssdfb_partial(struct ssdfb_softc *, uint32_t, uint32_t, uint32_t, uint32_t); diff --git a/sys/dev/fdt/sximmc.c b/sys/dev/fdt/sximmc.c index 2ab7fbe37..657d4b5b8 100644 --- a/sys/dev/fdt/sximmc.c +++ b/sys/dev/fdt/sximmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sximmc.c,v 1.14 2024/02/07 22:35:08 kettenis Exp $ */ +/* $OpenBSD: sximmc.c,v 1.15 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: awin_mmc.c,v 1.23 2015/11/14 10:32:40 bouyer Exp $ */ /*- @@ -214,7 +214,6 @@ int sximmc_host_reset(sdmmc_chipset_handle_t); uint32_t sximmc_host_ocr(sdmmc_chipset_handle_t); int sximmc_host_maxblklen(sdmmc_chipset_handle_t); int sximmc_card_detect(sdmmc_chipset_handle_t); -int sximmc_write_protect(sdmmc_chipset_handle_t); int sximmc_bus_power(sdmmc_chipset_handle_t, uint32_t); int sximmc_bus_clock(sdmmc_chipset_handle_t, int, int); int sximmc_bus_width(sdmmc_chipset_handle_t, int); diff --git a/sys/dev/gpio/gpiodcf.c b/sys/dev/gpio/gpiodcf.c index 35b4b7d29..84069a910 100644 --- a/sys/dev/gpio/gpiodcf.c +++ b/sys/dev/gpio/gpiodcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpiodcf.c,v 1.10 2022/07/02 08:50:42 visa Exp $ */ +/* $OpenBSD: gpiodcf.c,v 1.11 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -89,7 +89,6 @@ struct gpiodcf_softc { #define T_WARN 300000 /* degrade sensor status to warning (5min) */ #define T_CRIT 900000 /* degrade sensor status to critical (15min) */ -void gpiodcf_intr(void *); void gpiodcf_probe(void *); void gpiodcf_bv_probe(void *); void gpiodcf_mg_probe(void *); diff --git a/sys/dev/i2c/ietp.h b/sys/dev/i2c/ietp.h index c0ba21632..854a1283c 100644 --- a/sys/dev/i2c/ietp.h +++ b/sys/dev/i2c/ietp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ietp.h,v 1.1 2023/07/08 02:43:02 jcs Exp $ */ +/* $OpenBSD: ietp.h,v 1.2 2024/05/13 01:15:50 jsg Exp $ */ /* * Elantech touchpad I2C driver * @@ -59,8 +59,6 @@ struct ietp_softc { bool is_clickpad; }; -int ietp_open(struct ietp_softc *); -void ietp_close(struct ietp_softc *); int ietp_ioctl(void *, u_long, caddr_t, int, struct proc *); int ietp_enable(void *dev); void ietp_disable(void *dev); diff --git a/sys/dev/i2c/imt.c b/sys/dev/i2c/imt.c index 5bd389489..5dcdbed57 100644 --- a/sys/dev/i2c/imt.c +++ b/sys/dev/i2c/imt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imt.c,v 1.5 2020/07/09 21:01:56 jcs Exp $ */ +/* $OpenBSD: imt.c,v 1.6 2024/05/13 01:15:50 jsg Exp $ */ /* * HID-over-i2c multitouch trackpad driver for devices conforming to * Windows Precision Touchpad standard @@ -45,7 +45,6 @@ struct imt_softc { }; int imt_enable(void *); -int imt_open(struct ihidev *); void imt_intr(struct ihidev *, void *, u_int); void imt_disable(void *); int imt_ioctl(void *, u_long, caddr_t, int, struct proc *); diff --git a/sys/dev/i2c/pca9548.c b/sys/dev/i2c/pca9548.c index c28717a4d..8c50534b1 100644 --- a/sys/dev/i2c/pca9548.c +++ b/sys/dev/i2c/pca9548.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pca9548.c,v 1.6 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: pca9548.c,v 1.7 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -93,7 +93,6 @@ void pcamux_attach_acpi(struct pcamux_softc *, struct i2c_attach_args *); int pcamux_attach_acpi_mux(struct aml_node *, void *); void pcamux_acpi_bus_scan(struct device *, struct i2cbus_attach_args *, void *); -int pcamux_acpi_found_channel(struct aml_node *, void *); int pcamux_acpi_found_hid(struct aml_node *, void *); int pcamux_acpi_parse_crs(int, union acpi_resource *, void *); #endif diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index 71e97ac40..a54a3eb3a 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: anvar.h,v 1.23 2009/10/13 19:33:16 pirofti Exp $ */ +/* $OpenBSD: anvar.h,v 1.24 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: anvar.h,v 1.10 2005/02/27 00:27:00 perry Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -161,8 +161,6 @@ struct an_softc { int an_attach(struct an_softc *); int an_detach(struct an_softc *); -int an_activate(struct device *, int); -void an_power(int, void *); int an_intr(void *); int an_init(struct ifnet *); void an_stop(struct ifnet *, int); diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index c3deba59d..239bc37b7 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.100 2022/04/21 21:03:02 stsp Exp $ */ +/* $OpenBSD: atw.c,v 1.101 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -163,10 +163,6 @@ void atw_si4126_print(struct atw_softc *); #define DPRINTF3(sc, x) /* nothing */ #endif -#ifdef ATW_STATS -void atw_print_stats(struct atw_softc *); -#endif - const char *atw_printmac(u_int8_t); /* ifnet methods */ diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index a1b494096..c672db289 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.178 2023/09/11 08:41:26 mvs Exp $ */ +/* $OpenBSD: com.c,v 1.179 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -94,7 +94,6 @@ static u_char tiocm_xxx2mcr(int); void compwroff(struct com_softc *); void cominit(bus_space_tag_t, bus_space_handle_t, int, int); -int com_is_console(bus_space_tag_t, bus_addr_t); struct cfdriver com_cd = { NULL, "com", DV_TTY diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index d52ee1906..5ba861e94 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.156 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: dc.c,v 1.157 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -134,7 +134,6 @@ #endif int dc_intr(void *); -struct dc_type *dc_devtype(void *); int dc_newbuf(struct dc_softc *, int, struct mbuf *); int dc_encap(struct dc_softc *, bus_dmamap_t, struct mbuf *, u_int32_t *); diff --git a/sys/dev/ic/gemvar.h b/sys/dev/ic/gemvar.h index 14c01e897..e4847c98e 100644 --- a/sys/dev/ic/gemvar.h +++ b/sys/dev/ic/gemvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: gemvar.h,v 1.31 2015/11/28 09:42:10 jmatthew Exp $ */ +/* $OpenBSD: gemvar.h,v 1.32 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: gemvar.h,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -272,15 +272,7 @@ do { \ } while (0) #ifdef _KERNEL -void gem_attach(struct gem_softc *, const u_int8_t *); -int gem_activate(struct device *, int); -int gem_detach(struct gem_softc *); int gem_intr(void *); -int gem_read_srom(struct gem_softc *); -int gem_srom_crcok(const u_int8_t *); -int gem_isv_srom(const u_int8_t *); -int gem_isv_srom_enaddr(struct gem_softc *, u_int8_t *); -int gem_parse_old_srom(struct gem_softc *, u_int8_t *); int gem_mediachange(struct ifnet *); void gem_mediastatus(struct ifnet *, struct ifmediareq *); diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index a741a8532..997c5e40d 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.110 2024/05/10 21:23:32 krw Exp $ */ +/* $OpenBSD: nvme.c,v 1.111 2024/05/13 11:41:52 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -16,7 +16,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "bio.h" + #include +#include #include #include #include @@ -25,6 +28,7 @@ #include #include #include +#include #include @@ -33,7 +37,9 @@ #include #include #include +#include +#include #include #include @@ -83,17 +89,27 @@ void nvme_scsi_cmd(struct scsi_xfer *); void nvme_minphys(struct buf *, struct scsi_link *); int nvme_scsi_probe(struct scsi_link *); void nvme_scsi_free(struct scsi_link *); -uint64_t nvme_scsi_size(struct nvm_identify_namespace *); +uint64_t nvme_scsi_size(const struct nvm_identify_namespace *); #ifdef HIBERNATE #include #include -#include #include int nvme_hibernate_io(dev_t, daddr_t, vaddr_t, size_t, int, void *); #endif +#if NBIO > 0 +void nvme_bio_status(struct bio_status *, const char *, ...); + +const char *nvme_bioctl_sdname(const struct nvme_softc *, int); + +int nvme_bioctl(struct device *, u_long, caddr_t); +int nvme_bioctl_inq(struct nvme_softc *, struct bioc_inq *); +int nvme_bioctl_vol(struct nvme_softc *, struct bioc_vol *); +int nvme_bioctl_disk(struct nvme_softc *, struct bioc_disk *); +#endif /* NBIO > 0 */ + const struct scsi_adapter nvme_switch = { nvme_scsi_cmd, nvme_minphys, nvme_scsi_probe, nvme_scsi_free, NULL }; @@ -283,6 +299,7 @@ nvme_attach(struct nvme_softc *sc) u_int nccbs = 0; mtx_init(&sc->sc_ccb_mtx, IPL_BIO); + rw_init(&sc->sc_lock, "nvme_lock"); SIMPLEQ_INIT(&sc->sc_ccb_list); scsi_iopool_init(&sc->sc_iopool, sc, nvme_ccb_get, nvme_ccb_put); if (sc->sc_ops == NULL) @@ -384,7 +401,12 @@ nvme_attach(struct nvme_softc *sc) saa.saa_quirks = saa.saa_flags = 0; saa.saa_wwpn = saa.saa_wwnn = 0; - config_found(&sc->sc_dev, &saa, scsiprint); + sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, + &saa, scsiprint); +#if NBIO > 0 + if (bio_register(&sc->sc_dev, nvme_bioctl) != 0) + printf("%s: unable to register bioctl\n", DEVNAME(sc)); +#endif /* NBIO > 0 */ return (0); @@ -889,7 +911,7 @@ nvme_scsi_free(struct scsi_link *link) } uint64_t -nvme_scsi_size(struct nvm_identify_namespace *ns) +nvme_scsi_size(const struct nvm_identify_namespace *ns) { uint64_t ncap, nsze; @@ -1716,3 +1738,274 @@ nvme_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size, } #endif + +#if NBIO > 0 +int +nvme_bioctl(struct device *self, u_long cmd, caddr_t data) +{ + struct nvme_softc *sc = (struct nvme_softc *)self; + int error = 0; + + rw_enter_write(&sc->sc_lock); + + switch (cmd) { + case BIOCINQ: + error = nvme_bioctl_inq(sc, (struct bioc_inq *)data); + break; + case BIOCVOL: + error = nvme_bioctl_vol(sc, (struct bioc_vol *)data); + break; + case BIOCDISK: + error = nvme_bioctl_disk(sc, (struct bioc_disk *)data); + break; + default: + printf("nvme_bioctl() Unknown command (%lu)\n", cmd); + error = ENOTTY; + } + + rw_exit_write(&sc->sc_lock); + + return error; +} + +void +nvme_bio_status(struct bio_status *bs, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + bio_status(bs, 0, BIO_MSG_INFO, fmt, &ap); + va_end(ap); +} + +const char * +nvme_bioctl_sdname(const struct nvme_softc *sc, int target) +{ + const struct scsi_link *link; + const struct sd_softc *sd; + + link = scsi_get_link(sc->sc_scsibus, target, 0); + if (link) { + sd = (struct sd_softc *)(link->device_softc); + if (ISSET(link->state, SDEV_S_DYING) || sd == NULL || + ISSET(sd->flags, SDF_DYING)) + return NULL; + } + + if (nvme_read4(sc, NVME_VS) == 0xffffffff) + return NULL; + + return DEVNAME(sd); +} + +int +nvme_bioctl_inq(struct nvme_softc *sc, struct bioc_inq *bi) +{ + char sn[41], mn[81], fr[17]; + struct nvm_identify_controller *idctrl = &sc->sc_identify; + struct bio_status *bs; + unsigned int nn; + uint32_t cc, csts, vs; + + /* Don't tell bioctl about namespaces > last configured namespace. */ + for (nn = sc->sc_nn; nn > 0; nn--) { + if (sc->sc_namespaces[nn].ident) + break; + } + bi->bi_novol = bi->bi_nodisk = nn; + strlcpy(bi->bi_dev, DEVNAME(sc), sizeof(bi->bi_dev)); + + bs = &bi->bi_bio.bio_status; + bio_status_init(bs, &sc->sc_dev); + bs->bs_status = BIO_STATUS_SUCCESS; + + scsi_strvis(sn, idctrl->sn, sizeof(idctrl->sn)); + scsi_strvis(mn, idctrl->mn, sizeof(idctrl->mn)); + scsi_strvis(fr, idctrl->fr, sizeof(idctrl->fr)); + + nvme_bio_status(bs, "%s, %s, %s", mn, fr, sn); + nvme_bio_status(bs, "Max i/o %zu bytes%s%s%s, Sanitize 0x%b", + sc->sc_mdts, + ISSET(idctrl->lpa, NVM_ID_CTRL_LPA_PE) ? + ", Persisent Event Log" : "", + ISSET(idctrl->fna, NVM_ID_CTRL_FNA_CRYPTOFORMAT) ? + ", CryptoFormat" : "", + ISSET(idctrl->vwc, NVM_ID_CTRL_VWC_PRESENT) ? + ", Volatile Write Cache" : "", + lemtoh32(&idctrl->sanicap), NVM_ID_CTRL_SANICAP_FMT + ); + + if (idctrl->ctratt != 0) + nvme_bio_status(bs, "Features 0x%b", lemtoh32(&idctrl->ctratt), + NVM_ID_CTRL_CTRATT_FMT); + + if (idctrl->oacs || idctrl->oncs) { + nvme_bio_status(bs, "Admin commands 0x%b, NVM commands 0x%b", + lemtoh16(&idctrl->oacs), NVM_ID_CTRL_OACS_FMT, + lemtoh16(&idctrl->oncs), NVM_ID_CTRL_ONCS_FMT); + } + + cc = nvme_read4(sc, NVME_CC); + csts = nvme_read4(sc, NVME_CSTS); + vs = nvme_read4(sc, NVME_VS); + + if (vs == 0xffffffff) { + nvme_bio_status(bs, "Invalid PCIe register mapping"); + return 0; + } + + nvme_bio_status(bs, "NVMe %u.%u%s%s%sabled, %sReady%s%s%s%s", + NVME_VS_MJR(vs), NVME_VS_MNR(vs), + (NVME_CC_CSS_R(cc) == NVME_CC_CSS_NVM) ? ", NVM I/O command set" : "", + (NVME_CC_CSS_R(cc) == 0x7) ? ", Admin command set only" : "", + ISSET(cc, NVME_CC_EN) ? ", En" : "Dis", + ISSET(csts, NVME_CSTS_RDY) ? "" : "Not ", + ISSET(csts, NVME_CSTS_CFS) ? ", Fatal Error, " : "", + (NVME_CC_SHN_R(cc) == NVME_CC_SHN_NORMAL) ? ", Normal shutdown" : "", + (NVME_CC_SHN_R(cc) == NVME_CC_SHN_ABRUPT) ? ", Abrupt shutdown" : "", + ISSET(csts, NVME_CSTS_SHST_DONE) ? " complete" : ""); + + return 0; +} + +int +nvme_bioctl_vol(struct nvme_softc *sc, struct bioc_vol *bv) +{ + const struct nvm_identify_namespace *idns; + const char *sd; + int target; + unsigned int lbaf; + + target = bv->bv_volid + 1; + if (target > sc->sc_nn) { + bv->bv_status = BIOC_SVINVALID; + return 0; + } + + bv->bv_level = 'c'; + bv->bv_nodisk = 1; + + idns = sc->sc_namespaces[target].ident; + if (idns == NULL) { + bv->bv_status = BIOC_SVINVALID; + return 0; + } + + lbaf = NVME_ID_NS_FLBAS(idns->flbas); + if (idns->nlbaf > 16) + lbaf |= (idns->flbas >> 1) & 0x3f; + bv->bv_size = nvme_scsi_size(idns) << idns->lbaf[lbaf].lbads; + + sd = nvme_bioctl_sdname(sc, target); + if (sd) { + strlcpy(bv->bv_dev, sd, sizeof(bv->bv_dev)); + bv->bv_status = BIOC_SVONLINE; + } else + bv->bv_status = BIOC_SVOFFLINE; + + return 0; +} + +int +nvme_bioctl_disk(struct nvme_softc *sc, struct bioc_disk *bd) +{ + const char *rpdesc[4] = { + " (Best)", + " (Better)", + " (Good)", + " (Degraded)" + }; + const char *protection[4] = { + "not enabled", + "Type 1", + "Type 2", + "Type 3", + }; + char buf[32], msg[BIO_MSG_LEN]; + struct nvm_identify_namespace *idns; + struct bio_status *bs; + uint64_t id1, id2; + unsigned int i, lbaf, target; + uint16_t ms; + uint8_t dps; + + target = bd->bd_volid + 1; + if (target > sc->sc_nn) + return EINVAL; + bd->bd_channel = sc->sc_scsibus->sc_dev.dv_unit; + bd->bd_target = target; + bd->bd_lun = 0; + snprintf(bd->bd_procdev, sizeof(bd->bd_procdev), "Namespace %u", target); + + bs = &bd->bd_bio.bio_status; + bs->bs_status = BIO_STATUS_SUCCESS; + snprintf(bs->bs_controller, sizeof(bs->bs_controller), "%11u", + bd->bd_diskid); + + idns = sc->sc_namespaces[target].ident; + if (idns == NULL) { + bd->bd_status = BIOC_SDUNUSED; + return 0; + } + + lbaf = NVME_ID_NS_FLBAS(idns->flbas); + if (idns->nlbaf > nitems(idns->lbaf)) + lbaf |= (idns->flbas >> 1) & 0x3f; + bd->bd_size = lemtoh64(&idns->nsze) << idns->lbaf[lbaf].lbads; + + if (memcmp(idns->nguid, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16)) { + memcpy(&id1, idns->nguid, sizeof(uint64_t)); + memcpy(&id2, idns->nguid + sizeof(uint64_t), sizeof(uint64_t)); + snprintf(bd->bd_serial, sizeof(bd->bd_serial), "%08llx%08llx", + id1, id2); + } else if (memcmp(idns->eui64, "\0\0\0\0\0\0\0\0", 8)) { + memcpy(&id1, idns->eui64, sizeof(uint64_t)); + snprintf(bd->bd_serial, sizeof(bd->bd_serial), "%08llx", id1); + } + + msg[0] = '\0'; + for (i = 0; i <= idns->nlbaf; i++) { + if (idns->lbaf[i].lbads == 0) + continue; + snprintf(buf, sizeof(buf), "%s%s%u", + strlen(msg) ? ", " : "", (i == lbaf) ? "*" : "", + 1 << idns->lbaf[i].lbads); + strlcat(msg, buf, sizeof(msg)); + ms = lemtoh16(&idns->lbaf[i].ms); + if (ms) { + snprintf(buf, sizeof(buf), "+%u", ms); + strlcat(msg, buf, sizeof(msg)); + } + strlcat(msg, rpdesc[idns->lbaf[i].rp], sizeof(msg)); + } + nvme_bio_status(bs, "Formats %s", msg); + + if (idns->nsfeat) + nvme_bio_status(bs, "Features 0x%b", idns->nsfeat, + NVME_ID_NS_NSFEAT_FMT); + + if (idns->dps) { + dps = idns->dps; + snprintf(msg, sizeof(msg), "Data Protection (0x%02x) " + "Protection Data in ", dps); + if (ISSET(dps, NVME_ID_NS_DPS_PIP)) + strlcat(msg, "first", sizeof(msg)); + else + strlcat(msg, "last", sizeof(msg)); + strlcat(msg, "bytes of metadata, Protection ", sizeof(msg)); + if (NVME_ID_NS_DPS_TYPE(dps) >= nitems(protection)) + strlcat(msg, "Type unknown", sizeof(msg)); + else + strlcat(msg, protection[NVME_ID_NS_DPS_TYPE(dps)], + sizeof(msg)); + nvme_bio_status(bs, "%s", msg); + } + + if (nvme_bioctl_sdname(sc, target) == NULL) + bd->bd_status = BIOC_SDOFFLINE; + else + bd->bd_status = BIOC_SDONLINE; + + return 0; +} +#endif /* NBIO > 0 */ diff --git a/sys/dev/ic/nvmereg.h b/sys/dev/ic/nvmereg.h index ce54afeb7..c8f0b4d09 100644 --- a/sys/dev/ic/nvmereg.h +++ b/sys/dev/ic/nvmereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nvmereg.h,v 1.13 2023/12/20 13:37:25 krw Exp $ */ +/* $OpenBSD: nvmereg.h,v 1.14 2024/05/13 11:41:52 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -290,16 +290,30 @@ struct nvm_identify_controller { u_int8_t mdts; /* Maximum Data Transfer Size */ u_int16_t cntlid; /* Controller ID */ - u_int8_t _reserved1[176]; + u_int8_t _reserved1[16]; + u_int32_t ctratt; +#define NVM_ID_CTRL_CTRATT_FMT "\020" \ + "\016DELEG" "\017DEVNVM" "\020ELBAS" "\005ENDURGRPS" \ + "\014FIXCAPMGMT" "\001HOSTID" "\013MDS" "\002NOPSPM" \ + "\010NSGRAN" "\003NVMSETS" "\006PREDLATENCY" "\004READRCVRY" \ + "\011SQASSOC" "\007TBKAS" "\012UUIDLIST" "\015VARCAPMGMT" + + u_int8_t _reserved9[156]; /* Admin Command Set Attributes & Optional Controller Capabilities */ u_int16_t oacs; /* Optional Admin Command Support */ +#define NVM_ID_CTRL_OACS_FMT "\020" \ + "\013CAFL" "\011DBBC" "\006DIREC" "\005DST" "\012GLBAS" \ + "\002FORMAT" "\003FWCD" "\007MISR" "\004NSMGMT" "\001SECSR" \ + "\010VM" + u_int8_t acl; /* Abort Command Limit */ u_int8_t aerl; /* Asynchronous Event Request Limit */ u_int8_t frmw; /* Firmware Updates */ u_int8_t lpa; /* Log Page Attributes */ +#define NVM_ID_CTRL_LPA_PE (1 << 4) u_int8_t elpe; /* Error Log Page Entries */ u_int8_t npss; /* Number of Power States Support */ @@ -308,7 +322,11 @@ struct nvm_identify_controller { u_int8_t apsta; /* Autonomous Power State Transition Attributes */ - u_int8_t _reserved2[246]; + u_int8_t _reserved2[62]; + u_int32_t sanicap; +#define NVM_ID_CTRL_SANICAP_FMT "\020" \ + "\002BlockErase" "\001CryptoErase" "\003Overwrite" + u_int8_t _reserved10[180]; /* NVM Command Set Attributes */ @@ -319,10 +337,16 @@ struct nvm_identify_controller { u_int32_t nn; /* Number of Namespaces */ u_int16_t oncs; /* Optional NVM Command Support */ +#define NVM_ID_CTRL_ONCS_FMT "\020" \ + "\006RSV" "\001SCMP" "\011SCPY" "\003SDMGMT" "\005SF" \ + "\010SV" "\002SWU" "\004SWZ" "\007TS" + u_int16_t fuses; /* Fused Operation Support */ u_int8_t fna; /* Format NVM Attributes */ +#define NVM_ID_CTRL_FNA_CRYPTOFORMAT (1 << 2) u_int8_t vwc; /* Volatile Write Cache */ +#define NVM_ID_CTRL_VWC_PRESENT (1 << 0) u_int16_t awun; /* Atomic Write Unit Normal */ u_int16_t awupf; /* Atomic Write Unit Power Fail */ @@ -364,16 +388,24 @@ struct nvm_identify_namespace { u_int8_t nsfeat; /* Namespace Features */ #define NVME_ID_NS_NSFEAT_THIN_PROV (1 << 0) +#define NVME_ID_NS_NSFEAT_FMT "\020" \ + "\002NSABP" "\005OPTPERF" "\001THIN_PROV" "\004UIDREUSE" "\003DAE" + u_int8_t nlbaf; /* Number of LBA Formats */ u_int8_t flbas; /* Formatted LBA Size */ -#define NVME_ID_NS_FLBAS(_f) ((_f) & 0x0f) -#define NVME_ID_NS_FLBAS_MD 0x10 +#define NVME_ID_NS_FLBAS(_f) ((_f) & 0x0f) +#define NVME_ID_NS_FLBAS_MD 0x10 u_int8_t mc; /* Metadata Capabilities */ + u_int8_t dpc; /* End-to-end Data Protection Capabilities */ u_int8_t dps; /* End-to-end Data Protection Type Settings */ +#define NVME_ID_NS_DPS_PIP (1 << 3) +#define NVME_ID_NS_DPS_TYPE(_f) ((_f) & 0x7) - u_int8_t _reserved1[98]; + u_int8_t _reserved1[74]; + uint8_t nguid[16]; + uint8_t eui64[8]; /* BIG-endian */ struct nvm_namespace_format lbaf[16]; /* LBA Format Support */ diff --git a/sys/dev/ic/nvmevar.h b/sys/dev/ic/nvmevar.h index 2a7b59a1d..4a7c1094e 100644 --- a/sys/dev/ic/nvmevar.h +++ b/sys/dev/ic/nvmevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nvmevar.h,v 1.28 2021/08/29 12:02:52 kettenis Exp $ */ +/* $OpenBSD: nvmevar.h,v 1.29 2024/05/13 11:41:52 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -125,6 +125,8 @@ struct nvme_softc { struct nvme_ccb_list sc_ccb_list; struct nvme_dmamem *sc_ccb_prpls; struct scsi_iopool sc_iopool; + struct rwlock sc_lock; + struct scsibus_softc *sc_scsibus; }; #define DEVNAME(_sc) ((_sc)->sc_dev.dv_xname) diff --git a/sys/dev/ic/qwxvar.h b/sys/dev/ic/qwxvar.h index eb08272d3..29eeb66af 100644 --- a/sys/dev/ic/qwxvar.h +++ b/sys/dev/ic/qwxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: qwxvar.h,v 1.24 2024/03/02 15:18:57 stsp Exp $ */ +/* $OpenBSD: qwxvar.h,v 1.25 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2018-2019 The Linux Foundation. @@ -807,8 +807,6 @@ enum hal_ce_desc { HAL_CE_DESC_DST_STATUS, }; -void qwx_ce_byte_swap(void *mem, uint32_t len); - struct ce_ie_addr { uint32_t ie1_reg_addr; uint32_t ie2_reg_addr; diff --git a/sys/dev/ic/rtl81x9reg.h b/sys/dev/ic/rtl81x9reg.h index 959cb2013..4cfabd8b5 100644 --- a/sys/dev/ic/rtl81x9reg.h +++ b/sys/dev/ic/rtl81x9reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9reg.h,v 1.104 2022/06/03 10:38:40 dlg Exp $ */ +/* $OpenBSD: rtl81x9reg.h,v 1.105 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1091,6 +1091,5 @@ struct rl_softc { extern int rl_attach(struct rl_softc *); extern int rl_intr(void *); -extern void rl_setmulti(struct rl_softc *); int rl_detach(struct rl_softc *); int rl_activate(struct device *, int); diff --git a/sys/dev/ic/rtwvar.h b/sys/dev/ic/rtwvar.h index c2c2a85c2..ace339494 100644 --- a/sys/dev/ic/rtwvar.h +++ b/sys/dev/ic/rtwvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtwvar.h,v 1.32 2024/05/12 08:44:09 jsg Exp $ */ +/* $OpenBSD: rtwvar.h,v 1.33 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: rtwvar.h,v 1.10 2004/12/26 22:37:57 mycroft Exp $ */ /*- @@ -446,7 +446,6 @@ void rtw_disable(struct rtw_softc *); int rtw_enable(struct rtw_softc *); int rtw_activate(struct device *, int); -void rtw_shutdown(void *); const char *rtw_pwrstate_string(enum rtw_pwrstate); diff --git a/sys/dev/ic/siopvar.h b/sys/dev/ic/siopvar.h index f8c7b5802..9e607cedd 100644 --- a/sys/dev/ic/siopvar.h +++ b/sys/dev/ic/siopvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: siopvar.h,v 1.17 2011/09/23 10:40:06 miod Exp $ */ +/* $OpenBSD: siopvar.h,v 1.18 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: siopvar.h,v 1.22 2005/11/18 23:10:32 bouyer Exp $ */ /* @@ -137,4 +137,3 @@ struct siop_softc { void siop_attach(struct siop_softc *); int siop_intr(void *); void siop_add_dev(struct siop_softc *, int, int); -void siop_del_dev(struct siop_softc *, int, int); diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index ee9a4c3f8..d34c433e4 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc91cxx.c,v 1.52 2022/08/15 01:59:00 jsg Exp $ */ +/* $OpenBSD: smc91cxx.c,v 1.53 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */ /*- @@ -177,7 +177,6 @@ int smc91cxx_set_media(struct smc91cxx_softc *, uint64_t); void smc91cxx_read(struct smc91cxx_softc *); void smc91cxx_reset(struct smc91cxx_softc *); void smc91cxx_start(struct ifnet *); -void smc91cxx_resume(struct smc91cxx_softc *); void smc91cxx_watchdog(struct ifnet *); int smc91cxx_ioctl(struct ifnet *, u_long, caddr_t); diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c index 6fe0e5874..b2e4ee0f6 100644 --- a/sys/dev/ic/trm.c +++ b/sys/dev/ic/trm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trm.c,v 1.44 2022/01/09 05:42:42 jsg Exp $ +/* $OpenBSD: trm.c,v 1.45 2024/05/13 01:15:50 jsg Exp $ * ------------------------------------------------------------ * O.S : OpenBSD * File Name : trm.c @@ -61,8 +61,6 @@ /* #define TRM_DEBUG0 */ -void trm_initSRB(struct trm_scsi_req_q *); - void trm_check_eeprom(struct trm_adapter_nvram *, bus_space_tag_t, bus_space_handle_t); void trm_read_all (struct trm_adapter_nvram *, bus_space_tag_t, bus_space_handle_t); void trm_write_all (struct trm_adapter_nvram *, bus_space_tag_t, bus_space_handle_t); diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index f8ea00836..006f01a0e 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.108 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: fd.c,v 1.109 2024/05/13 01:15:50 jsg Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -138,7 +138,6 @@ struct cfdriver fd_cd = { }; int fdgetdisklabel(dev_t, struct fd_softc *, struct disklabel *, int); -int fd_get_parms(struct fd_softc *); void fdstrategy(struct buf *); void fdstart(struct fd_softc *); int fdintr(struct fdc_softc *); diff --git a/sys/dev/midi.c b/sys/dev/midi.c index e3b2d8e9f..923c06b9f 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.56 2023/09/26 19:55:24 mvs Exp $ */ +/* $OpenBSD: midi.c,v 1.57 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2003, 2004 Alexandre Ratchov @@ -50,7 +50,6 @@ void midi_timeout(void *); void midi_out_start(struct midi_softc *); void midi_out_stop(struct midi_softc *); void midi_out_do(struct midi_softc *); -void midi_attach(struct midi_softc *, struct device *); const struct cfattach midi_ca = { diff --git a/sys/dev/mii/brswphy.c b/sys/dev/mii/brswphy.c index eff0388d9..5e3828415 100644 --- a/sys/dev/mii/brswphy.c +++ b/sys/dev/mii/brswphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brswphy.c,v 1.4 2022/04/06 18:59:29 naddy Exp $ */ +/* $OpenBSD: brswphy.c,v 1.5 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2014 Paul Irofti @@ -160,7 +160,6 @@ struct cfdriver brswphy_cd = { int brswphy_service(struct mii_softc *, struct mii_data *, int); void brswphy_status(struct mii_softc *); -void brswphy_reset(struct mii_softc *); const struct mii_phy_funcs brswphy_funcs = { brswphy_service, brswphy_status, mii_phy_reset, diff --git a/sys/dev/mii/tqphy.c b/sys/dev/mii/tqphy.c index d18be6e1c..1858cd1e8 100644 --- a/sys/dev/mii/tqphy.c +++ b/sys/dev/mii/tqphy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tqphy.c,v 1.19 2022/04/06 18:59:29 naddy Exp $ */ +/* $OpenBSD: tqphy.c,v 1.20 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: tqphy.c,v 1.9 2000/02/02 23:34:57 thorpej Exp $ */ /* @@ -78,7 +78,6 @@ int tqphymatch(struct device *, void *, void *); void tqphyattach(struct device *, struct device *, void *); -int tqphydetach(struct device *, int); const struct cfattach tqphy_ca = { sizeof(struct mii_softc), tqphymatch, tqphyattach, mii_phy_detach diff --git a/sys/dev/ofw/openfirm.h b/sys/dev/ofw/openfirm.h index 54ccdf3d3..98296e5aa 100644 --- a/sys/dev/ofw/openfirm.h +++ b/sys/dev/ofw/openfirm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: openfirm.h,v 1.18 2021/05/06 19:45:16 kettenis Exp $ */ +/* $OpenBSD: openfirm.h,v 1.19 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: openfirm.h,v 1.1 1996/09/30 16:35:10 ws Exp $ */ /* @@ -79,12 +79,6 @@ int OF_getnodebyname(int, const char *); int OF_getnodebyphandle(uint32_t); int OF_getindex(int, const char *, const char *); -/* - * Some generic routines for OpenFirmware handling. - */ -int ofnmmatch(char *cp1, char *cp2); -void ofw_intr_establish(void); - /* * Generic OpenFirmware probe argument. * This is how all probe structures must start diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index 274e707e2..d20e9ad0d 100644 --- a/sys/dev/pci/agp_i810.c +++ b/sys/dev/pci/agp_i810.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_i810.c,v 1.95 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp_i810.c,v 1.96 2024/05/13 01:15:51 jsg Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -104,9 +104,6 @@ int agp_i810_enable(void *, u_int32_t mode); void intagp_write_gtt(struct agp_i810_softc *, bus_size_t, paddr_t); int intagp_gmch_match(struct pci_attach_args *); -extern void intagp_dma_sync(bus_dma_tag_t, bus_dmamap_t, - bus_addr_t, bus_size_t, int); - const struct cfattach intagp_ca = { sizeof(struct agp_i810_softc), agp_i810_probe, agp_i810_attach, NULL, agp_i810_activate, diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h index 569df51f2..94b920afc 100644 --- a/sys/dev/pci/agpvar.h +++ b/sys/dev/pci/agpvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: agpvar.h,v 1.34 2022/01/09 05:42:45 jsg Exp $ */ +/* $OpenBSD: agpvar.h,v 1.35 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: agpvar.h,v 1.4 2001/10/01 21:54:48 fvdl Exp $ */ /*- @@ -190,10 +190,4 @@ int agp_release(void *); */ int agp_enable(void *, u_int32_t); -/* - * Retrieve information about a memory block allocated with - * agp_alloc_memory(). - */ -void agp_memory_info(void *, void *, struct agp_memory_info *); - #endif /* !_PCI_AGPVAR_H_ */ diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c index 9c93ccd00..800d4b5f0 100644 --- a/sys/dev/pci/auacer.c +++ b/sys/dev/pci/auacer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auacer.c,v 1.28 2022/10/26 20:19:07 kn Exp $ */ +/* $OpenBSD: auacer.c,v 1.29 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */ /*- @@ -174,7 +174,6 @@ int auacer_allocmem(struct auacer_softc *, size_t, size_t, int auacer_freemem(struct auacer_softc *, struct auacer_dma *); int auacer_set_rate(struct auacer_softc *, int, u_long); -void auacer_finish_attach(struct device *); static void auacer_reset(struct auacer_softc *sc); diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c index 41d26779a..fe9674d24 100644 --- a/sys/dev/pci/auglx.c +++ b/sys/dev/pci/auglx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auglx.c,v 1.24 2024/04/14 03:26:25 jsg Exp $ */ +/* $OpenBSD: auglx.c,v 1.25 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -227,7 +227,6 @@ int auglx_trigger_output(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); int auglx_trigger_input(void *, void *, void *, int, void (*)(void *), void *, struct audio_params *); -int auglx_alloc_cdata(struct auglx_softc *); int auglx_alloc_prd(struct auglx_softc *, size_t, struct auglx_ring *); void auglx_free_prd(struct auglx_softc *sc, struct auglx_ring *bm); int auglx_allocmem(struct auglx_softc *, size_t, size_t, struct auglx_dma *); diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c index 98f2469d8..7c17d9e32 100644 --- a/sys/dev/pci/fms.c +++ b/sys/dev/pci/fms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fms.c,v 1.36 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: fms.c,v 1.37 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */ /*- @@ -121,7 +121,6 @@ void fms_reset_codec(void *); int fms_allocmem(struct fms_softc *, size_t, size_t, struct fms_dma *); -int fms_freemem(struct fms_softc *, struct fms_dma *); int fms_match(struct device *parent, void *match, void *aux) diff --git a/sys/dev/pci/gcu.c b/sys/dev/pci/gcu.c index eda31705e..16e13d86d 100644 --- a/sys/dev/pci/gcu.c +++ b/sys/dev/pci/gcu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gcu.c,v 1.6 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: gcu.c,v 1.7 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2009 Dariusz Swiderski @@ -32,7 +32,6 @@ int gcu_probe(struct device *, void *, void *); void gcu_attach(struct device *, struct device *, void *); -int gcu_detach(struct device *, int); const struct pci_matchid gcu_devices[] = { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_EP80579_GCU } diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c index 5072dd81a..d5aaeef3b 100644 --- a/sys/dev/pci/i82365_pci.c +++ b/sys/dev/pci/i82365_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82365_pci.c,v 1.14 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: i82365_pci.c,v 1.15 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */ /* @@ -94,8 +94,6 @@ pcic_pci_match(struct device *parent, void *match, void *aux) return (0); } -void pcic_isa_config_interrupts(struct device *); - void pcic_pci_attach(struct device *parent, struct device *self, void *aux) { diff --git a/sys/dev/pci/if_aq_pci.c b/sys/dev/pci/if_aq_pci.c index 9647500a1..7e2acb2a1 100644 --- a/sys/dev/pci/if_aq_pci.c +++ b/sys/dev/pci/if_aq_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aq_pci.c,v 1.26 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_aq_pci.c,v 1.27 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: if_aq.c,v 1.27 2021/06/16 00:21:18 riastradh Exp $ */ /* @@ -1106,7 +1106,6 @@ const struct aq_product { int aq_match(struct device *, void *, void *); void aq_attach(struct device *, struct device *, void *); -int aq_detach(struct device *, int); int aq_activate(struct device *, int); int aq_intr(void *); int aq_intr_link(void *); @@ -1115,7 +1114,6 @@ int aq_init_rss(struct aq_softc *); int aq_hw_reset(struct aq_softc *); int aq_hw_init(struct aq_softc *, int, int); void aq_hw_qos_set(struct aq_softc *); -void aq_l3_filter_set(struct aq_softc *); void aq_hw_init_tx_path(struct aq_softc *); void aq_hw_init_rx_path(struct aq_softc *); int aq_set_mac_addr(struct aq_softc *, int, uint8_t *); @@ -1156,7 +1154,6 @@ static inline unsigned int aq_rx_fill_slots(struct aq_softc *, int aq_dmamem_alloc(struct aq_softc *, struct aq_dmamem *, bus_size_t, u_int); -void aq_dmamem_zero(struct aq_dmamem *); void aq_dmamem_free(struct aq_softc *, struct aq_dmamem *); int aq1_get_mac_addr(struct aq_softc *); diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 359956965..d4f8491c3 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.375 2024/05/07 18:35:23 jan Exp $ */ +/* $OpenBSD: if_em.c,v 1.376 2024/05/13 01:15:51 jsg Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include @@ -277,7 +277,6 @@ void em_enable_intr(struct em_softc *); void em_disable_intr(struct em_softc *); void em_free_transmit_structures(struct em_softc *); void em_free_receive_structures(struct em_softc *); -void em_update_stats_counters(struct em_softc *); void em_disable_aspm(struct em_softc *); void em_txeof(struct em_queue *); int em_allocate_receive_structures(struct em_softc *); diff --git a/sys/dev/pci/if_em_hw.h b/sys/dev/pci/if_em_hw.h index f57882cac..61f2dde68 100644 --- a/sys/dev/pci/if_em_hw.h +++ b/sys/dev/pci/if_em_hw.h @@ -31,7 +31,7 @@ *******************************************************************************/ -/* $OpenBSD: if_em_hw.h,v 1.93 2024/02/16 22:30:54 mglocker Exp $ */ +/* $OpenBSD: if_em_hw.h,v 1.94 2024/05/13 01:15:51 jsg Exp $ */ /* $FreeBSD: if_em_hw.h,v 1.15 2005/05/26 23:32:02 tackerman Exp $ */ /* if_em_hw.h @@ -343,7 +343,6 @@ struct em_softc; int32_t em_reset_hw(struct em_hw *hw); int32_t em_init_hw(struct em_softc *sc); int32_t em_set_mac_type(struct em_hw *hw); -int em_max_queues(struct em_hw *hw); void em_set_media_type(struct em_hw *hw); /* Link Configuration */ @@ -361,9 +360,6 @@ int32_t em_read_phy_reg(struct em_hw *hw, uint32_t reg_addr, uint16_t *phy_data) int32_t em_write_phy_reg(struct em_hw *hw, uint32_t reg_addr, uint16_t data); int32_t em_phy_hw_reset(struct em_hw *hw); int32_t em_phy_reset(struct em_hw *hw); -int32_t em_phy_get_info(struct em_hw *hw, struct em_phy_info *phy_info); -int32_t em_validate_mdi_setting(struct em_hw *hw); -void em_phy_powerdown_workaround(struct em_hw *hw); int em_sgmii_uses_mdio_82575(struct em_hw *); int32_t em_read_phy_reg_i2c(struct em_hw *, uint32_t, uint16_t *); int32_t em_write_phy_reg_i2c(struct em_hw *, uint32_t, uint16_t); @@ -372,9 +368,6 @@ int32_t em_read_sfp_data_byte(struct em_hw *, uint16_t, uint8_t *); /* EEPROM Functions */ int32_t em_init_eeprom_params(struct em_hw *hw); -/* MNG HOST IF functions */ -uint32_t em_enable_mng_pass_thru(struct em_hw *hw); - #define E1000_MNG_DHCP_TX_PAYLOAD_CMD 64 #define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8 /* Host Interface data length */ @@ -432,21 +425,11 @@ void em_mc_addr_list_update(struct em_hw *hw, uint8_t * mc_addr_list, uint32_t m uint32_t em_hash_mc_addr(struct em_hw *hw, uint8_t *mc_addr); void em_mta_set(struct em_hw *hw, uint32_t hash_value); void em_rar_set(struct em_hw *hw, uint8_t *mc_addr, uint32_t rar_index); -void em_write_vfta(struct em_hw *hw, uint32_t offset, uint32_t value); - -/* LED functions */ -int32_t em_setup_led(struct em_hw *hw); -int32_t em_cleanup_led(struct em_hw *hw); -int32_t em_led_on(struct em_hw *hw); -int32_t em_led_off(struct em_hw *hw); -int32_t em_blink_led_start(struct em_hw *hw); /* Adaptive IFS Functions */ /* Everything else */ void em_clear_hw_cntrs(struct em_hw *hw); -void em_reset_adaptive(struct em_hw *hw); -void em_update_adaptive(struct em_hw *hw); void em_get_bus_info(struct em_hw *hw); void em_pci_set_mwi(struct em_hw *hw); void em_pci_clear_mwi(struct em_hw *hw); diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index 10813741f..6c783e349 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.261 2024/02/16 11:44:52 stsp Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.262 2024/05/13 01:15:51 jsg Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini @@ -230,7 +230,6 @@ void iwn_tune_sensitivity(struct iwn_softc *, const struct iwn_rx_stats *); int iwn_send_sensitivity(struct iwn_softc *); int iwn_set_pslevel(struct iwn_softc *, int, int, int); -int iwn_send_temperature_offset(struct iwn_softc *); int iwn_send_btcoex(struct iwn_softc *); int iwn_send_advanced_btcoex(struct iwn_softc *); int iwn5000_runtime_calib(struct iwn_softc *); diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 15eea6671..dbe9390de 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.184 2024/05/08 14:03:54 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.185 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -453,7 +453,6 @@ uint16_t iwx_rs_vht_rates(struct iwx_softc *, struct ieee80211_node *, int); int iwx_rs_init_v3(struct iwx_softc *, struct iwx_node *); int iwx_rs_init_v4(struct iwx_softc *, struct iwx_node *); int iwx_rs_init(struct iwx_softc *, struct iwx_node *); -int iwx_enable_data_tx_queues(struct iwx_softc *); int iwx_phy_send_rlc(struct iwx_softc *, struct iwx_phy_ctxt *, uint8_t, uint8_t); int iwx_phy_ctxt_update(struct iwx_softc *, struct iwx_phy_ctxt *, diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index ba83d0a53..077946b8d 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.213 2024/05/07 18:35:23 jan Exp $ */ +/* $OpenBSD: if_ix.c,v 1.214 2024/05/13 01:15:51 jsg Exp $ */ /****************************************************************************** @@ -125,7 +125,6 @@ int ixgbe_allocate_msix(struct ix_softc *); void ixgbe_setup_msix(struct ix_softc *); int ixgbe_allocate_queues(struct ix_softc *); void ixgbe_free_pci_resources(struct ix_softc *); -void ixgbe_local_timer(void *); void ixgbe_setup_interface(struct ix_softc *); void ixgbe_config_gpie(struct ix_softc *); void ixgbe_config_delay_values(struct ix_softc *); @@ -182,7 +181,6 @@ int ixgbe_legacy_intr(void *); void ixgbe_enable_queue(struct ix_softc *, uint32_t); void ixgbe_enable_queues(struct ix_softc *); void ixgbe_disable_queue(struct ix_softc *, uint32_t); -void ixgbe_rearm_queue(struct ix_softc *, uint32_t); /* MSI-X (multiple vectors interrupt handlers) */ int ixgbe_link_intr(void *); diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c index 87e9c926c..28853b547 100644 --- a/sys/dev/pci/if_vmx.c +++ b/sys/dev/pci/if_vmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vmx.c,v 1.84 2024/05/07 18:35:23 jan Exp $ */ +/* $OpenBSD: if_vmx.c,v 1.85 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2013 Tsubai Masanari @@ -209,8 +209,6 @@ void vmxnet3_reset(struct vmxnet3_softc *); int vmxnet3_init(struct vmxnet3_softc *); int vmxnet3_ioctl(struct ifnet *, u_long, caddr_t); void vmxnet3_start(struct ifqueue *); -int vmxnet3_load_mbuf(struct vmxnet3_softc *, struct vmxnet3_txring *, - struct mbuf **); void vmxnet3_watchdog(struct ifnet *); void vmxnet3_media_status(struct ifnet *, struct ifmediareq *); int vmxnet3_media_change(struct ifnet *); diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 3630cb576..e4752b8df 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.75 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_wb.c,v 1.76 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -127,7 +127,6 @@ int wb_probe(struct device *, void *, void *); void wb_attach(struct device *, struct device *, void *); -void wb_bfree(caddr_t, u_int, void *); void wb_newbuf(struct wb_softc *, struct wb_chain_onefrag *); int wb_encap(struct wb_softc *, struct wb_chain *, struct mbuf *); diff --git a/sys/dev/pci/igc_base.h b/sys/dev/pci/igc_base.h index a79dc9423..61b5c9937 100644 --- a/sys/dev/pci/igc_base.h +++ b/sys/dev/pci/igc_base.h @@ -1,4 +1,4 @@ -/* $OpenBSD: igc_base.h,v 1.3 2024/05/04 13:35:26 mbuhl Exp $ */ +/* $OpenBSD: igc_base.h,v 1.4 2024/05/13 01:15:51 jsg Exp $ */ /*- * Copyright 2021 Intel Corp * Copyright 2021 Rubicon Communications, LLC (Netgate) @@ -15,7 +15,6 @@ struct igc_hw; int igc_init_hw_base(struct igc_hw *hw); void igc_power_down_phy_copper_base(struct igc_hw *hw); -extern void igc_rx_fifo_flush_base(struct igc_hw *hw); int igc_acquire_phy_base(struct igc_hw *hw); void igc_release_phy_base(struct igc_hw *hw); diff --git a/sys/dev/pci/igc_hw.h b/sys/dev/pci/igc_hw.h index c1ad01113..6cc2b3ceb 100644 --- a/sys/dev/pci/igc_hw.h +++ b/sys/dev/pci/igc_hw.h @@ -1,4 +1,4 @@ -/* $OpenBSD: igc_hw.h,v 1.2 2022/05/11 06:14:15 kevlo Exp $ */ +/* $OpenBSD: igc_hw.h,v 1.3 2024/05/13 01:22:47 jsg Exp $ */ /*- * Copyright 2021 Intel Corp * Copyright 2021 Rubicon Communications, LLC (Netgate) @@ -260,15 +260,6 @@ struct igc_nvm_operations { int (*write)(struct igc_hw *, uint16_t, uint16_t, uint16_t *); }; -struct igc_info { - int (*get_invariants)(struct igc_hw *hw); - struct igc_mac_operations *mac_ops; - const struct igc_phy_operations *phy_ops; - struct igc_nvm_operations *nvm_ops; -}; - -extern const struct igc_info igc_i225_info; - struct igc_mac_info { struct igc_mac_operations ops; uint8_t addr[ETHER_ADDR_LEN]; diff --git a/sys/dev/pci/ixgb_hw.h b/sys/dev/pci/ixgb_hw.h index 91e925ef1..55241f100 100644 --- a/sys/dev/pci/ixgb_hw.h +++ b/sys/dev/pci/ixgb_hw.h @@ -31,7 +31,7 @@ *******************************************************************************/ -/* $OpenBSD: ixgb_hw.h,v 1.3 2010/09/20 07:50:19 deraadt Exp $ */ +/* $OpenBSD: ixgb_hw.h,v 1.4 2024/05/13 01:15:51 jsg Exp $ */ #ifndef _IXGB_HW_H_ #define _IXGB_HW_H_ @@ -815,7 +815,6 @@ struct ixgb_hw_stats { /* Function Prototypes */ extern boolean_t ixgb_adapter_stop(struct ixgb_hw *hw); extern boolean_t ixgb_init_hw(struct ixgb_hw *hw); -extern boolean_t ixgb_adapter_start(struct ixgb_hw *hw); extern void ixgb_check_for_link(struct ixgb_hw *hw); extern boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw); extern void ixgb_rar_set(struct ixgb_hw *hw, uint8_t *addr, uint32_t index); diff --git a/sys/dev/pci/ixgbe_82598.c b/sys/dev/pci/ixgbe_82598.c index cb23bbfb4..cfb6bb112 100644 --- a/sys/dev/pci/ixgbe_82598.c +++ b/sys/dev/pci/ixgbe_82598.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ixgbe_82598.c,v 1.20 2022/01/27 18:28:45 bluhm Exp $ */ +/* $OpenBSD: ixgbe_82598.c,v 1.21 2024/05/13 01:15:51 jsg Exp $ */ /****************************************************************************** SPDX-License-Identifier: BSD-3-Clause @@ -46,7 +46,6 @@ #define IXGBE_82598_VFT_TBL_SIZE 128 #define IXGBE_82598_RX_PB_SIZE 512 -uint32_t ixgbe_get_pcie_msix_count_82598(struct ixgbe_hw *hw); int32_t ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *autoneg); diff --git a/sys/dev/pci/ixgbe_x550.c b/sys/dev/pci/ixgbe_x550.c index 96fab3542..5e5da281e 100644 --- a/sys/dev/pci/ixgbe_x550.c +++ b/sys/dev/pci/ixgbe_x550.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ixgbe_x550.c,v 1.8 2022/01/09 05:42:56 jsg Exp $ */ +/* $OpenBSD: ixgbe_x550.c,v 1.9 2024/05/13 01:15:51 jsg Exp $ */ /****************************************************************************** @@ -109,9 +109,7 @@ int32_t ixgbe_read_phy_reg_x550a(struct ixgbe_hw *hw, uint32_t reg_addr, uint32_t device_type, uint16_t *phy_data); int32_t ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, uint32_t reg_addr, uint32_t device_type, uint16_t phy_data); -int32_t ixgbe_setup_fc_fiber_x550em_a(struct ixgbe_hw *hw); int32_t ixgbe_setup_fc_backplane_x550em_a(struct ixgbe_hw *hw); -int32_t ixgbe_setup_fc_sgmii_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_fiber_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_backplane_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw); diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c index d3258577f..fe77bc96d 100644 --- a/sys/dev/pci/neo.c +++ b/sys/dev/pci/neo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: neo.c,v 1.40 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: neo.c,v 1.41 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 1999 Cameron Grant @@ -199,7 +199,6 @@ int neo_query_devinfo(void *, mixer_devinfo_t *); void *neo_malloc(void *, int, size_t, int, int); void neo_free(void *, void *, int); size_t neo_round_buffersize(void *, int, size_t); -void neo_set_mixer(struct neo_softc *sc, int a, int d); struct cfdriver neo_cd = { NULL, "neo", DV_DULL diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 681e35a51..8d20757e6 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.103 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: pccbb.c,v 1.104 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */ /* @@ -106,7 +106,6 @@ void pccbb_pcmcia_attach_setup(struct pccbb_softc *, #if 0 void pccbb_pcmcia_attach_card(struct pcic_handle *); void pccbb_pcmcia_detach_card(struct pcic_handle *, int); -void pccbb_pcmcia_deactivate_card(struct pcic_handle *); #endif int pccbb_ctrl(cardbus_chipset_tag_t, int); @@ -166,7 +165,6 @@ int pccbb_winlist_delete(struct pccbb_win_chain_head *, bus_space_handle_t, bus_size_t); void pccbb_winset(bus_addr_t align, struct pccbb_softc *, bus_space_tag_t); -void pccbb_winlist_show(struct pccbb_win_chain *); /* for config_defer */ void pccbb_pci_callback(struct device *); diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 011f8db4b..2f5fe2115 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.364 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: pciide.c,v 1.365 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -240,9 +240,6 @@ int pdc205xx_pci_intr(void *); void pdc205xx_do_reset(struct channel_softc *); void pdc205xx_drv_probe(struct channel_softc *); -void opti_chip_map(struct pciide_softc *, struct pci_attach_args *); -void opti_setup_channel(struct channel_softc *); - void hpt_chip_map(struct pciide_softc *, struct pci_attach_args *); void hpt_setup_channel(struct channel_softc *); int hpt_pci_intr(void *); diff --git a/sys/dev/pci/pciidevar.h b/sys/dev/pci/pciidevar.h index 4bc13924f..7f0d94b5f 100644 --- a/sys/dev/pci/pciidevar.h +++ b/sys/dev/pci/pciidevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pciidevar.h,v 1.21 2015/09/10 18:10:34 deraadt Exp $ */ +/* $OpenBSD: pciidevar.h,v 1.22 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: pciidevar.h,v 1.6 2001/01/12 16:04:00 bouyer Exp $ */ /* @@ -179,8 +179,6 @@ int pciide_unmapregs_compat(struct pciide_softc *, struct pciide_channel *); int pciide_unmapregs_native(struct pciide_softc *, struct pciide_channel *); -int pciide_dma_table_free(struct pciide_softc *, int, int); -void pciide_channel_dma_free(struct pciide_channel *); /* * Functions defined by machine-dependent code. diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index b839bee91..1eb8cc950 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcireg.h,v 1.62 2024/01/19 18:38:16 kettenis Exp $ */ +/* $OpenBSD: pcireg.h,v 1.63 2024/05/13 10:01:53 kettenis Exp $ */ /* $NetBSD: pcireg.h,v 1.26 2000/05/10 16:58:42 thorpej Exp $ */ /* @@ -515,6 +515,7 @@ typedef u_int8_t pci_revision_t; * Message Signaled Interrupts; access via capability pointer. */ #define PCI_MSI_MC 0x00 +#define PCI_MSI_MC_PVMASK 0x01000000 #define PCI_MSI_MC_C64 0x00800000 #define PCI_MSI_MC_MME_MASK 0x00700000 #define PCI_MSI_MC_MME_SHIFT 20 @@ -525,6 +526,8 @@ typedef u_int8_t pci_revision_t; #define PCI_MSI_MAU32 0x08 #define PCI_MSI_MD32 0x08 #define PCI_MSI_MD64 0x0c +#define PCI_MSI_MASK32 0x0c +#define PCI_MSI_MASK64 0x10 /* * Power Management Control Status Register; access via capability pointer. diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index a595e919e..1c1684338 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcivar.h,v 1.79 2024/02/03 10:37:26 kettenis Exp $ */ +/* $OpenBSD: pcivar.h,v 1.80 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -277,7 +277,6 @@ int pci_detach_devices(struct pci_softc *, int); void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); const struct pci_quirkdata * pci_lookup_quirkdata(pci_vendor_id_t, pci_product_id_t); -void pciagp_set_pchb(struct pci_attach_args *); #endif /* _KERNEL */ #endif /* _DEV_PCI_PCIVAR_H_ */ diff --git a/sys/dev/pci/ufshci_pci.c b/sys/dev/pci/ufshci_pci.c index e5e6c9859..c94cf14ab 100644 --- a/sys/dev/pci/ufshci_pci.c +++ b/sys/dev/pci/ufshci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufshci_pci.c,v 1.2 2024/04/10 10:40:27 mglocker Exp $ */ +/* $OpenBSD: ufshci_pci.c,v 1.3 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2024 Marcus Glocker @@ -41,7 +41,6 @@ struct ufshci_pci_softc { int ufshci_pci_match(struct device *, void *, void *); void ufshci_pci_attach(struct device *, struct device *, void *); int ufshci_pci_detach(struct device *, int); -int ufshci_pci_activate(struct device *, int); const struct cfattach ufshci_pci_ca = { sizeof(struct ufshci_pci_softc), diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c index fac4aafc9..dd0c493f0 100644 --- a/sys/dev/pcmcia/com_pcmcia.c +++ b/sys/dev/pcmcia/com_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_pcmcia.c,v 1.60 2023/09/11 08:41:27 mvs Exp $ */ +/* $OpenBSD: com_pcmcia.c,v 1.61 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */ /* @@ -125,7 +125,6 @@ struct com_pcmcia_product { int com_pcmcia_match(struct device *, void *, void *); void com_pcmcia_attach(struct device *, struct device *, void *); int com_pcmcia_detach(struct device *, int); -void com_pcmcia_cleanup(void *); int com_pcmcia_activate(struct device *, int); int com_pcmcia_enable(struct com_softc *); diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c index 9e5d0f95c..47402265b 100644 --- a/sys/dev/pcmcia/pcmcia.c +++ b/sys/dev/pcmcia/pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia.c,v 1.50 2022/04/06 18:59:30 naddy Exp $ */ +/* $OpenBSD: pcmcia.c,v 1.51 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */ /* @@ -56,7 +56,6 @@ int pcmcia_submatch(struct device *, void *, void *); void pcmcia_attach(struct device *, struct device *, void *); int pcmcia_activate(struct device *, int); int pcmcia_print(void *, const char *); -void pcmcia_card_detach_notify(struct device *, void *); int pcmcia_card_intr(void *); struct cfdriver pcmcia_cd = { diff --git a/sys/dev/pv/viogpu.c b/sys/dev/pv/viogpu.c index d0af88f66..d305cf91f 100644 --- a/sys/dev/pv/viogpu.c +++ b/sys/dev/pv/viogpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viogpu.c,v 1.3 2023/05/29 08:13:35 sf Exp $ */ +/* $OpenBSD: viogpu.c,v 1.4 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2021-2023 joshua stein @@ -62,8 +62,6 @@ int viogpu_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, uint32_t *); int viogpu_show_screen(void *, void *, int, void (*)(void *, int, int), void *); -void viogpu_enter_ddb(void *, void *); -void viogpu_doswitch(void *); #define VIOGPU_HEIGHT 160 #define VIOGPU_WIDTH 160 diff --git a/sys/dev/pv/virtiovar.h b/sys/dev/pv/virtiovar.h index d12cb2c59..69e0a7466 100644 --- a/sys/dev/pv/virtiovar.h +++ b/sys/dev/pv/virtiovar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: virtiovar.h,v 1.16 2023/12/02 10:01:35 sf Exp $ */ +/* $OpenBSD: virtiovar.h,v 1.17 2024/05/13 01:15:51 jsg Exp $ */ /* $NetBSD: virtiovar.h,v 1.1 2011/10/30 12:12:21 hannken Exp $ */ /* @@ -231,7 +231,6 @@ void virtio_enqueue_trim(struct virtqueue*, int, int); int virtio_dequeue(struct virtio_softc*, struct virtqueue*, int *, int *); int virtio_dequeue_commit(struct virtqueue*, int); -int virtio_intr(void *arg); int virtio_check_vqs(struct virtio_softc *); int virtio_check_vq(struct virtio_softc *, struct virtqueue *); void virtio_stop_vq_intr(struct virtio_softc *, struct virtqueue *); diff --git a/sys/dev/sbus/agten.c b/sys/dev/sbus/agten.c index 93d328ded..7526b9ca1 100644 --- a/sys/dev/sbus/agten.c +++ b/sys/dev/sbus/agten.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agten.c,v 1.13 2022/07/15 17:57:26 kettenis Exp $ */ +/* $OpenBSD: agten.c,v 1.14 2024/05/13 01:15:51 jsg Exp $ */ /* * Copyright (c) 2002, 2003, Miodrag Vallat. * All rights reserved. @@ -106,7 +106,6 @@ struct agten_softc { int agten_ioctl(void *, u_long, caddr_t, int, struct proc *); paddr_t agten_mmap(void *, off_t, int); -void agten_reset(struct agten_softc *); void agten_setcolor(void *, u_int, u_int8_t, u_int8_t, u_int8_t); static __inline__ void ibm561_write(struct agten_softc *, u_int32_t, u_int32_t); diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index e8ca9d2cf..87a5c749a 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.44 2022/03/13 13:34:54 mpi Exp $ */ +/* $OpenBSD: be.c,v 1.45 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- @@ -172,7 +172,6 @@ static int be_tcvr_read_bit(struct be_softc *, int); static void be_tcvr_write_bit(struct be_softc *, int, int); void be_tick(void *); -void be_intphy_auto(struct be_softc *); void be_intphy_status(struct be_softc *); int be_intphy_service(struct be_softc *, struct mii_data *, int); diff --git a/sys/dev/sbus/zx.c b/sys/dev/sbus/zx.c index dfa0cd10c..60e9badac 100644 --- a/sys/dev/sbus/zx.c +++ b/sys/dev/sbus/zx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zx.c,v 1.24 2022/07/15 17:57:27 kettenis Exp $ */ +/* $OpenBSD: zx.c,v 1.25 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */ /* @@ -151,8 +151,6 @@ void zx_copyrect(struct rasops_info *, int, int, int, int, int, int); int zx_cross_loadwid(struct zx_softc *, u_int, u_int, u_int); int zx_cross_wait(struct zx_softc *); void zx_fillrect(struct rasops_info *, int, int, int, int, uint32_t, int); -int zx_intr(void *); -void zx_prom(void *); int zx_putchar(void *, int, int, u_int, uint32_t); int zx_copycols(void *, int, int, int, int); diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c index 2b319f75b..0e064a525 100644 --- a/sys/dev/softraid_raid6.c +++ b/sys/dev/softraid_raid6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid6.c,v 1.72 2021/05/16 15:12:37 deraadt Exp $ */ +/* $OpenBSD: softraid_raid6.c,v 1.73 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2009 Marco Peereboom * Copyright (c) 2009 Jordan Hargrave @@ -63,7 +63,6 @@ void sr_raid6_xorp(void *, void *, int); void sr_raid6_xorq(void *, void *, int, int); int sr_raid6_addio(struct sr_workunit *wu, int, daddr_t, long, void *, int, int, void *, void *, int); -void sr_raid6_scrub(struct sr_discipline *); int sr_failio(struct sr_workunit *); void gf_init(void); diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index d9606dc2a..2085ae994 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ulpt.c,v 1.58 2021/01/29 17:12:19 sthen Exp $ */ +/* $OpenBSD: ulpt.c,v 1.59 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */ /* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */ @@ -103,8 +103,6 @@ struct ulpt_softc { struct ulpt_fwdev *sc_fwdev; }; -void ulpt_disco(void *); - int ulpt_do_write(struct ulpt_softc *, struct uio *uio, int); int ulpt_status(struct ulpt_softc *); void ulpt_reset(struct ulpt_softc *); diff --git a/sys/dev/usb/umt.c b/sys/dev/usb/umt.c index 44a903f23..d3cab557e 100644 --- a/sys/dev/usb/umt.c +++ b/sys/dev/usb/umt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umt.c,v 1.5 2021/11/15 15:36:24 anton Exp $ */ +/* $OpenBSD: umt.c,v 1.6 2024/05/13 01:15:53 jsg Exp $ */ /* * USB multitouch touchpad driver for devices conforming to * Windows Precision Touchpad standard @@ -52,7 +52,6 @@ struct umt_softc { }; int umt_enable(void *); -int umt_open(struct uhidev *); void umt_intr(struct uhidev *, void *, u_int); void umt_disable(void *); int umt_ioctl(void *, u_long, caddr_t, int, struct proc *); diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index 53adb499a..31885a6b9 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.62 2023/10/25 09:36:47 mvs Exp $ */ +/* $OpenBSD: vscsi.c,v 1.63 2024/05/13 01:15:50 jsg Exp $ */ /* * Copyright (c) 2008 David Gwynne @@ -41,7 +41,6 @@ int vscsi_match(struct device *, void *, void *); void vscsi_attach(struct device *, struct device *, void *); -void vscsi_shutdown(void *); struct vscsi_ccb { TAILQ_ENTRY(vscsi_ccb) ccb_entry; diff --git a/sys/isofs/cd9660/cd9660_node.h b/sys/isofs/cd9660/cd9660_node.h index 8b25a052d..a57c3e9d4 100644 --- a/sys/isofs/cd9660/cd9660_node.h +++ b/sys/isofs/cd9660/cd9660_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.h,v 1.22 2022/06/26 05:20:42 visa Exp $ */ +/* $OpenBSD: cd9660_node.h,v 1.23 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: cd9660_node.h,v 1.15 1997/04/11 21:52:01 kleink Exp $ */ /*- @@ -103,7 +103,6 @@ int cd9660_mmap(void *); int cd9660_seek(void *); int cd9660_readdir(void *); int cd9660_readlink(void *); -int cd9660_abortop(void *); int cd9660_inactive(void *); int cd9660_reclaim(void *); int cd9660_link(void *); diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index 3a57a7c9e..e31735354 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.71 2024/05/12 16:51:05 semarie Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.72 2024/05/13 11:17:40 semarie Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long @@ -84,7 +84,7 @@ const struct vops udf_vops = { .vop_fsync = NULL, .vop_link = NULL, .vop_mknod = NULL, - .vop_remove = NULL, + .vop_remove = eopnotsupp, .vop_rename = NULL, .vop_revoke = NULL, .vop_mkdir = NULL, diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c index 4412725a9..a97a5b49f 100644 --- a/sys/kern/vfs_sync.c +++ b/sys/kern/vfs_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_sync.c,v 1.71 2024/05/12 16:51:05 semarie Exp $ */ +/* $OpenBSD: vfs_sync.c,v 1.72 2024/05/13 11:17:40 semarie Exp $ */ /* * Portions of this code are: @@ -238,7 +238,7 @@ const struct vops sync_vops = { .vop_read = NULL, .vop_readdir = NULL, .vop_readlink = NULL, - .vop_remove = NULL, + .vop_remove = eopnotsupp, .vop_rename = NULL, .vop_revoke = NULL, .vop_mkdir = NULL, diff --git a/sys/kern/vfs_vops.c b/sys/kern/vfs_vops.c index 4442c1be2..a7f181f5b 100644 --- a/sys/kern/vfs_vops.c +++ b/sys/kern/vfs_vops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vops.c,v 1.35 2022/06/26 05:20:42 visa Exp $ */ +/* $OpenBSD: vfs_vops.c,v 1.36 2024/05/13 11:17:40 semarie Exp $ */ /* * Copyright (c) 2010 Thordur I. Bjornsson * @@ -319,6 +319,7 @@ VOP_FSYNC(struct vnode *vp, struct ucred *cred, int waitfor, int VOP_REMOVE(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) { + int error; struct vop_remove_args a; a.a_dvp = dvp; a.a_vp = vp; @@ -327,10 +328,15 @@ VOP_REMOVE(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) ASSERT_VP_ISLOCKED(dvp); ASSERT_VP_ISLOCKED(vp); - if (dvp->v_op->vop_remove == NULL) - return (EOPNOTSUPP); + error = dvp->v_op->vop_remove(&a); - return ((dvp->v_op->vop_remove)(&a)); + if (dvp == vp) + vrele(vp); + else + vput(vp); + vput(dvp); + + return error; } int diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c index d32aeb6d0..1904b5554 100644 --- a/sys/miscfs/fuse/fuse_vnops.c +++ b/sys/miscfs/fuse/fuse_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vnops.c,v 1.68 2024/03/25 17:57:07 guenther Exp $ */ +/* $OpenBSD: fuse_vnops.c,v 1.69 2024/05/13 11:17:40 semarie Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -1512,11 +1512,6 @@ fusefs_remove(void *v) fb_delete(fbuf); out: pool_put(&namei_pool, cnp->cn_pnbuf); - if (dvp == vp) - vrele(vp); - else - vput(vp); - vput(dvp); return (error); } diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 12d22a95c..5e912766d 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.140 2023/09/08 20:00:28 mvs Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.141 2024/05/13 11:17:40 semarie Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -810,12 +810,6 @@ msdosfs_remove(void *v) printf("msdosfs_remove(), dep %p, v_usecount %d\n", dep, ap->a_vp->v_usecount); #endif - if (ddep == dep) - vrele(ap->a_vp); - else - vput(ap->a_vp); /* causes msdosfs_inactive() to be called - * via vrele() */ - vput(ap->a_dvp); return (error); } diff --git a/sys/msdosfs/msdosfsmount.h b/sys/msdosfs/msdosfsmount.h index 23b5a65d2..8dc1c39d3 100644 --- a/sys/msdosfs/msdosfsmount.h +++ b/sys/msdosfs/msdosfsmount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfsmount.h,v 1.22 2018/02/10 05:24:23 deraadt Exp $ */ +/* $OpenBSD: msdosfsmount.h,v 1.23 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.16 1997/10/17 11:24:24 ws Exp $ */ /*- @@ -204,7 +204,6 @@ int msdosfs_mount(struct mount *, const char *, void *, struct nameidata *, stru int msdosfs_start(struct mount *, int, struct proc *); int msdosfs_unmount(struct mount *, int, struct proc *); int msdosfs_root(struct mount *, struct vnode **); -int msdosfs_quotactl(struct mount *, int, uid_t, caddr_t, struct proc *); int msdosfs_statfs(struct mount *, struct statfs *, struct proc *); int msdosfs_sync(struct mount *, int, int, struct ucred *, struct proc *); int msdosfs_fhtovp(struct mount *, struct fid *, struct vnode **); diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 7a652bd4c..5938a54d5 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.137 2024/01/01 18:47:02 mvs Exp $ */ +/* $OpenBSD: if_gif.c,v 1.138 2024/05/13 01:15:53 jsg Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -127,8 +127,6 @@ int gif_down(struct gif_softc *); int gif_set_tunnel(struct gif_softc *, struct if_laddrreq *); int gif_get_tunnel(struct gif_softc *, struct if_laddrreq *); int gif_del_tunnel(struct gif_softc *); -int in_gif_output(struct ifnet *, int, struct mbuf **); -int in6_gif_output(struct ifnet *, int, struct mbuf **); int gif_input(struct gif_tunnel *, struct mbuf **, int *, int, int, uint8_t); diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c index 934a757bb..993e77f99 100644 --- a/sys/net/if_mpw.c +++ b/sys/net/if_mpw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpw.c,v 1.65 2023/12/23 10:52:54 bluhm Exp $ */ +/* $OpenBSD: if_mpw.c,v 1.66 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2015 Rafael Zalamena @@ -17,7 +17,6 @@ */ #include "bpfilter.h" -#include "vlan.h" #include #include @@ -40,10 +39,6 @@ #include #endif /* NBPFILTER */ -#if NVLAN > 0 -#include -#endif - struct mpw_neighbor { struct shim_hdr n_rshim; struct sockaddr_storage n_nexthop; @@ -75,9 +70,6 @@ int mpw_ioctl(struct ifnet *, u_long, caddr_t); int mpw_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); void mpw_start(struct ifnet *); -#if NVLAN > 0 -struct mbuf *mpw_vlan_handle(struct mbuf *, struct mpw_softc *); -#endif /* NVLAN */ struct if_clone mpw_cloner = IF_CLONE_INITIALIZER("mpw", mpw_clone_create, mpw_clone_destroy); diff --git a/sys/net/if_pfsync.h b/sys/net/if_pfsync.h index ea792c684..3154720b8 100644 --- a/sys/net/if_pfsync.h +++ b/sys/net/if_pfsync.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.61 2023/07/31 11:13:10 dlg Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.62 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -318,7 +318,6 @@ int pfsync_sysctl(int *, u_int, void *, size_t *, #define PFSYNC_SI_CKSUM 0x02 #define PFSYNC_SI_ACK 0x04 #define PFSYNC_SI_PFSYNC 0x08 -int pfsync_state_import(struct pfsync_state *, int); void pfsync_state_export(struct pfsync_state *, struct pf_state *); diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index fb0efa592..477b24fd8 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.192 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.193 2024/05/13 01:15:53 jsg Exp $ */ /* * Synchronous PPP link level subroutines. * @@ -234,9 +234,6 @@ void sppp_cp_input(const struct cp *cp, struct sppp *sp, struct mbuf *m); void sppp_cp_send(struct sppp *sp, u_short proto, u_char type, u_char ident, u_short len, void *data); -#ifdef notyet -void sppp_cp_timeout(void *arg); -#endif void sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate); void sppp_auth_send(const struct cp *cp, diff --git a/sys/net/if_trunk.h b/sys/net/if_trunk.h index fbffffe5f..deaf19083 100644 --- a/sys/net/if_trunk.h +++ b/sys/net/if_trunk.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.h,v 1.30 2020/07/22 02:16:02 dlg Exp $ */ +/* $OpenBSD: if_trunk.h,v 1.31 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter @@ -249,7 +249,6 @@ struct trunk_lb { struct trunk_port *lb_ports[TRUNK_MAX_PORTS]; }; -int trunk_enqueue(struct ifnet *, struct mbuf *); u_int32_t trunk_hashmbuf(struct mbuf *, SIPHASH_KEY *); #endif /* _KERNEL */ diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h index df51cc186..b94b6542f 100644 --- a/sys/net/if_vlan_var.h +++ b/sys/net/if_vlan_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan_var.h,v 1.46 2023/04/26 00:14:21 jan Exp $ */ +/* $OpenBSD: if_vlan_var.h,v 1.47 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -49,7 +49,6 @@ struct vlanreq { #ifdef _KERNEL struct mbuf *vlan_input(struct ifnet *, struct mbuf *, unsigned int *); struct mbuf *vlan_inject(struct mbuf *, uint16_t, uint16_t); -void vlan_flags_from_parent(struct ifnet *, int); #endif /* _KERNEL */ #endif /* _NET_IF_VLAN_VAR_H_ */ diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 5a212866a..3617c8581 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.416 2024/04/22 13:30:22 bluhm Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.417 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -89,7 +89,6 @@ struct pool pf_tag_pl; void pfattach(int); -void pf_thread_create(void *); int pfopen(dev_t, int, int, struct proc *); int pfclose(dev_t, int, int, struct proc *); int pfioctl(dev_t, u_long, caddr_t, int, struct proc *); diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index 64aa6454d..0e3f9c5b0 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.h,v 1.94 2023/08/07 03:35:06 dlg Exp $ */ +/* $OpenBSD: pfkeyv2.h,v 1.95 2024/05/13 01:15:53 jsg Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) January 1998 * @@ -428,7 +428,6 @@ int pfkeyv2_dump_walker(struct tdb *, void *, int); int pfkeyv2_get_proto_alg(u_int8_t, u_int8_t *, int *); int pfkeyv2_sysctl(int *, u_int, void *, size_t *, void *, size_t); int pfkeyv2_sysctl_walker(struct tdb *, void *, int); -int pfkeyv2_sysctl_dump(void *); int pfdatatopacket(void *, int, struct mbuf **); diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index d6bb6067c..13c315fb6 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.537 2024/05/12 08:31:05 jsg Exp $ */ +/* $OpenBSD: pfvar.h,v 1.538 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1603,7 +1603,6 @@ extern void pf_tbladdr_remove(struct pf_addr_wrap *); extern void pf_tbladdr_copyout(struct pf_addr_wrap *); extern void pf_calc_skip_steps(struct pf_rulequeue *); extern void pf_purge_expired_src_nodes(void); -extern void pf_purge_expired_rules(void); extern void pf_remove_state(struct pf_state *); extern void pf_remove_divert_state(struct inpcb *); extern void pf_free_state(struct pf_state *); @@ -1636,7 +1635,6 @@ extern void pf_cksum_fixup(u_int16_t *, u_int16_t, u_int16_t, u_int8_t); void pf_rm_rule(struct pf_rulequeue *, struct pf_rule *); -void pf_purge_rule(struct pf_rule *); struct pf_divert *pf_find_divert(struct mbuf *); int pf_setup_pdesc(struct pf_pdesc *, sa_family_t, int, struct pfi_kif *, struct mbuf *, @@ -1659,7 +1657,6 @@ int pf_patch_32(struct pf_pdesc *, u_int32_t *, u_int32_t); int pf_patch_32_unaligned(struct pf_pdesc *, void *, u_int32_t, bool); int pflog_packet(struct pf_pdesc *, u_int8_t, struct pf_rule *, struct pf_rule *, struct pf_ruleset *, struct pf_rule *); -void pf_send_deferred_syn(struct pf_state *); int pf_match_addr(u_int8_t, struct pf_addr *, struct pf_addr *, struct pf_addr *, sa_family_t); int pf_match_addr_range(struct pf_addr *, struct pf_addr *, @@ -1827,7 +1824,6 @@ struct pf_ruleset *pf_find_ruleset(const char *); struct pf_ruleset *pf_get_leaf_ruleset(char *, char **); struct pf_anchor *pf_create_anchor(struct pf_anchor *, const char *); struct pf_ruleset *pf_find_or_create_ruleset(const char *); -void pf_rs_initialize(void); void pf_anchor_rele(struct pf_anchor *); struct pf_anchor *pf_anchor_take(struct pf_anchor *); diff --git a/sys/net/rtable.h b/sys/net/rtable.h index 143b517d9..4f31ba1ae 100644 --- a/sys/net/rtable.h +++ b/sys/net/rtable.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rtable.h,v 1.29 2024/04/09 12:53:08 claudio Exp $ */ +/* $OpenBSD: rtable.h,v 1.30 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2014-2016 Martin Pieuchot @@ -55,8 +55,6 @@ int rtable_walk(unsigned int, sa_family_t, struct rtentry **, int (*)(struct rtentry *, void *, unsigned int), void *); int rtable_mpath_capable(unsigned int, sa_family_t); -struct rtentry *rtable_mpath_match(unsigned int, struct rtentry *, - struct sockaddr *, uint8_t); int rtable_mpath_reprio(unsigned int, struct sockaddr *, int, uint8_t, struct rtentry *); diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 56940879f..1f05f270e 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.252 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.253 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: ieee80211_input.c,v 1.24 2004/05/31 11:12:24 dyoung Exp $ */ /*- @@ -75,7 +75,6 @@ void ieee80211_ba_move_window(struct ieee80211com *, struct ieee80211_node *, u_int8_t, u_int16_t, struct mbuf_list *); void ieee80211_input_ba_seq(struct ieee80211com *, struct ieee80211_node *, uint8_t, uint16_t, struct mbuf_list *); -struct mbuf *ieee80211_align_mbuf(struct mbuf *); void ieee80211_decap(struct ieee80211com *, struct mbuf *, struct ieee80211_node *, int, struct mbuf_list *); int ieee80211_amsdu_decap_validate(struct ieee80211com *, struct mbuf *, diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 0d1fe3d36..99ce03c50 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.h,v 1.52 2023/04/05 21:51:47 bluhm Exp $ */ +/* $OpenBSD: icmp6.h,v 1.53 2024/05/13 01:15:53 jsg Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ /* @@ -590,13 +590,11 @@ struct rttimer; struct in6_multi; void icmp6_init(void); -void icmp6_paramerror(struct mbuf *, int); struct mbuf *icmp6_do_error(struct mbuf *, int, int, int); void icmp6_error(struct mbuf *, int, int, int); int icmp6_input(struct mbuf **, int *, int, int); void icmp6_fasttimo(void); int icmp6_reflect(struct mbuf **, size_t, struct sockaddr *); -void icmp6_prepare(struct mbuf *); void icmp6_redirect_input(struct mbuf *, int); void icmp6_redirect_output(struct mbuf *, struct rtentry *); int icmp6_sysctl(int *, u_int, void *, size_t *, void *, size_t); diff --git a/sys/netinet/ip_gre.h b/sys/netinet/ip_gre.h index b626e3115..424d87084 100644 --- a/sys/netinet/ip_gre.h +++ b/sys/netinet/ip_gre.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_gre.h,v 1.18 2022/08/27 20:28:01 mvs Exp $ */ +/* $OpenBSD: ip_gre.h,v 1.19 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: ip_gre.h,v 1.3 1998/10/07 23:33:02 thorpej Exp $ */ /* @@ -56,8 +56,6 @@ extern const struct pr_usrreqs gre_usrreqs; -int gre_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, - struct mbuf *, struct proc *); int gre_send(struct socket *, struct mbuf *, struct mbuf *, struct mbuf *); #endif /* _KERNEL */ diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 3d75cf84c..0f1c80eac 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_var.h,v 1.177 2024/04/12 16:07:09 bluhm Exp $ */ +/* $OpenBSD: tcp_var.h,v 1.178 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */ /* @@ -724,7 +724,6 @@ u_int tcp_hdrsz(struct tcpcb *); void tcp_mtudisc(struct inpcb *, int); void tcp_mtudisc_increase(struct inpcb *, int); #ifdef INET6 -void tcp6_mtudisc(struct inpcb *, int); void tcp6_mtudisc_callback(struct sockaddr_in6 *, u_int); #endif struct tcpcb * @@ -771,7 +770,6 @@ int tcp_rcvoob(struct socket *, struct mbuf *, int); int tcp_sendoob(struct socket *, struct mbuf *, struct mbuf *, struct mbuf *); void tcp_xmit_timer(struct tcpcb *, int32_t); -void tcpdropoldhalfopen(struct tcpcb *, u_int16_t); void tcp_sack_option(struct tcpcb *,struct tcphdr *,u_char *,int); void tcp_update_sack_list(struct tcpcb *tp, tcp_seq, tcp_seq); void tcp_del_sackholes(struct tcpcb *, struct tcphdr *); diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index f4e99485d..bb8c3389a 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.h,v 1.117 2024/04/21 17:32:11 florian Exp $ */ +/* $OpenBSD: in6.h,v 1.118 2024/05/13 01:15:53 jsg Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -412,7 +412,6 @@ struct mbuf * int in6_cksum(struct mbuf *, uint8_t, uint32_t, uint32_t); void in6_proto_cksum_out(struct mbuf *, struct ifnet *); -int in6_localaddr(struct in6_addr *); int in6_addrscope(struct in6_addr *); struct in6_ifaddr *in6_ifawithscope(struct ifnet *, struct in6_addr *, u_int, struct rtentry *); diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index bd64239f2..94bf0fd29 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_var.h,v 1.79 2024/04/21 17:32:11 florian Exp $ */ +/* $OpenBSD: in6_var.h,v 1.80 2024/05/13 01:15:53 jsg Exp $ */ /* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */ /* @@ -362,14 +362,11 @@ int in6_update_ifa(struct ifnet *, struct in6_aliasreq *, struct in6_ifaddr *); void in6_purgeaddr(struct ifaddr *); int in6if_do_dad(struct ifnet *); -void *in6_domifattach(struct ifnet *); -void in6_domifdetach(struct ifnet *, void *); struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); int in6_addr2scopeid(unsigned int, struct in6_addr *); int in6_matchlen(struct in6_addr *, struct in6_addr *); void in6_prefixlen2mask(struct in6_addr *, int); -void in6_purgeprefix(struct ifnet *); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_VAR_H_ */ diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 986bc45e5..598765301 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.116 2024/04/17 20:48:51 bluhm Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.117 2024/05/13 01:15:53 jsg Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -364,7 +364,6 @@ int rip6_send(struct socket *, struct mbuf *, struct mbuf *, int rip6_sysctl(int *, u_int, void *, size_t *, void *, size_t); int dest6_input(struct mbuf **, int *, int, int); -int none_input(struct mbuf **, int *, int); int in6_pcbselsrc(const struct in6_addr **, struct sockaddr_in6 *, struct inpcb *, struct ip6_pktopts *); diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 9668c94aa..7780a39eb 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.198 2024/05/01 13:15:59 jsg Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.199 2024/05/13 11:17:40 semarie Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -1725,11 +1725,6 @@ nfs_remove(void *v) NFS_INVALIDATE_ATTRCACHE(np); VN_KNOTE(vp, NOTE_DELETE); VN_KNOTE(dvp, NOTE_WRITE); - if (vp == dvp) - vrele(vp); - else - vput(vp); - vput(dvp); return (error); } diff --git a/sys/ntfs/ntfs_subr.h b/sys/ntfs/ntfs_subr.h index 3a7f22b04..fceae1aba 100644 --- a/sys/ntfs/ntfs_subr.h +++ b/sys/ntfs/ntfs_subr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_subr.h,v 1.11 2020/02/27 09:10:31 mpi Exp $ */ +/* $OpenBSD: ntfs_subr.h,v 1.12 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: ntfs_subr.h,v 1.1 2002/12/23 17:38:33 jdolecek Exp $ */ /*- @@ -78,13 +78,10 @@ int ntfs_readntvattr_plain( struct ntfsmount *, struct ntnode *, struct ntvattr int ntfs_readattr_plain( struct ntfsmount *, struct ntnode *, u_int32_t, char *, off_t, size_t, void *,size_t *, struct uio *); int ntfs_readattr( struct ntfsmount *, struct ntnode *, u_int32_t, char *, off_t, size_t, void *, struct uio *); int ntfs_filesize( struct ntfsmount *, struct fnode *, u_int64_t *, u_int64_t *); -int ntfs_times( struct ntfsmount *, struct ntnode *, ntfs_times_t *); struct timespec ntfs_nttimetounix( u_int64_t ); int ntfs_runtovrun( cn_t **, cn_t **, u_long *, u_int8_t *); int ntfs_attrtontvattr( struct ntfsmount *, struct ntvattr **, struct attr * ); void ntfs_freentvattr( struct ntvattr * ); -int ntfs_loadntvattrs( struct ntfsmount *, struct vnode *, caddr_t, struct ntvattr **); -struct ntvattr * ntfs_findntvattr( struct ntfsmount *, struct ntnode *, u_int32_t, cn_t ); int ntfs_isnamepermitted(struct ntfsmount *, struct attr_indexentry * ); int ntfs_ntvattrrele(struct ntvattr * ); int ntfs_ntvattrget(struct ntfsmount *, struct ntnode *, u_int32_t, const char *, cn_t , struct ntvattr **); diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c index 950b9b69e..eebd739a1 100644 --- a/sys/ntfs/ntfs_vnops.c +++ b/sys/ntfs/ntfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vnops.c,v 1.48 2024/05/12 16:51:05 semarie Exp $ */ +/* $OpenBSD: ntfs_vnops.c,v 1.49 2024/05/13 11:17:40 semarie Exp $ */ /* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */ /* @@ -689,7 +689,7 @@ const struct vops ntfs_vops = { .vop_link = NULL, .vop_mknod = NULL, .vop_readlink = NULL, - .vop_remove = NULL, + .vop_remove = eopnotsupp, .vop_rename = NULL, .vop_revoke = NULL, .vop_mkdir = NULL, diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c index 049000ba9..c94a4ff5c 100644 --- a/sys/scsi/mpath.c +++ b/sys/scsi/mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath.c,v 1.57 2022/07/02 08:50:42 visa Exp $ */ +/* $OpenBSD: mpath.c,v 1.58 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2009 David Gwynne @@ -34,7 +34,6 @@ int mpath_match(struct device *, void *, void *); void mpath_attach(struct device *, struct device *, void *); -void mpath_shutdown(void *); TAILQ_HEAD(mpath_paths, mpath_path); diff --git a/sys/tmpfs/tmpfs_vnops.c b/sys/tmpfs/tmpfs_vnops.c index b1c68fdeb..bed42030e 100644 --- a/sys/tmpfs/tmpfs_vnops.c +++ b/sys/tmpfs/tmpfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_vnops.c,v 1.54 2024/03/25 17:57:07 guenther Exp $ */ +/* $OpenBSD: tmpfs_vnops.c,v 1.55 2024/05/13 11:17:41 semarie Exp $ */ /* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */ /* @@ -692,8 +692,6 @@ tmpfs_remove(void *v) tmpfs_dirent_t *de; int error; - KASSERT(VOP_ISLOCKED(dvp)); - KASSERT(VOP_ISLOCKED(vp)); KASSERT(cnp->cn_flags & HASBUF); if (vp->v_type == VDIR) { @@ -742,13 +740,6 @@ tmpfs_remove(void *v) error = 0; out: pool_put(&namei_pool, cnp->cn_pnbuf); - /* Drop the references and unlock the vnodes. */ - vput(vp); - if (dvp == vp) { - vrele(dvp); - } else { - vput(dvp); - } return error; } diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index 0097f2380..c3f049e99 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.93 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.94 2024/05/13 11:17:41 semarie Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -410,11 +410,6 @@ ext2fs_remove(void *v) ip->i_flag |= IN_CHANGE; } out: - if (dvp == vp) - vrele(vp); - else - vput(vp); - vput(dvp); return (error); } diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 315f23fc3..88bf59dd7 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_extern.h,v 1.49 2024/04/13 15:08:37 jca Exp $ */ +/* $OpenBSD: ffs_extern.h,v 1.50 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */ /* @@ -151,7 +151,6 @@ int ffs_vptofh(struct vnode *, struct fid *); int ffs_sysctl(int *, u_int, void *, size_t *, void *, size_t, struct proc *); int ffs_sbupdate(struct ufsmount *, int); -int ffs_cgupdate(struct ufsmount *, int); /* ffs_vnops.c */ int ffs_read(void *); diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h index 0a3c480f8..4b9169771 100644 --- a/sys/ufs/ufs/ufs_extern.h +++ b/sys/ufs/ufs/ufs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_extern.h,v 1.39 2024/02/03 18:51:58 beck Exp $ */ +/* $OpenBSD: ufs_extern.h,v 1.40 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: ufs_extern.h,v 1.5 1996/02/09 22:36:03 christos Exp $ */ /*- @@ -67,7 +67,6 @@ int ufs_lock(void *); int ufs_lookup(void *); int ufs_mkdir(void *); int ufs_mknod(void *); -int ufs_mmap(void *); int ufs_open(void *); int ufs_pathconf(void *); int ufs_print(void *); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index e652ff413..fdf78bb9a 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.161 2024/03/25 17:57:07 guenther Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.162 2024/05/13 11:17:41 semarie Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -595,11 +595,6 @@ ufs_remove(void *v) VN_KNOTE(vp, NOTE_DELETE); VN_KNOTE(dvp, NOTE_WRITE); out: - if (dvp == vp) - vrele(vp); - else - vput(vp); - vput(dvp); return (error); } diff --git a/sys/uvm/uvm_addr.c b/sys/uvm/uvm_addr.c index ac0574a7e..69aff636a 100644 --- a/sys/uvm/uvm_addr.c +++ b/sys/uvm/uvm_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_addr.c,v 1.33 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: uvm_addr.c,v 1.34 2024/05/13 01:15:53 jsg Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt @@ -98,12 +98,6 @@ struct uvm_addr_state uaddr_kbootstrap; struct vm_map_entry *uvm_addr_entrybyspace(struct uaddr_free_rbtree*, vsize_t); #endif /* !SMALL_KERNEL */ -void uaddr_kinsert(struct vm_map *, - struct uvm_addr_state *, struct vm_map_entry *); -void uaddr_kremove(struct vm_map *, - struct uvm_addr_state *, struct vm_map_entry *); -void uaddr_kbootstrapdestroy(struct uvm_addr_state *); - void uaddr_destroy(struct uvm_addr_state *); void uaddr_kbootstrap_destroy(struct uvm_addr_state *); void uaddr_rnd_destroy(struct uvm_addr_state *); diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h index 6319379b1..f1665917d 100644 --- a/sys/uvm/uvm_page.h +++ b/sys/uvm/uvm_page.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_page.h,v 1.70 2024/05/12 09:41:09 jsg Exp $ */ +/* $OpenBSD: uvm_page.h,v 1.71 2024/05/13 01:15:53 jsg Exp $ */ /* $NetBSD: uvm_page.h,v 1.19 2000/12/28 08:24:55 chs Exp $ */ /* @@ -228,7 +228,6 @@ void uvm_page_unbusy(struct vm_page **, int); struct vm_page *uvm_pagelookup(struct uvm_object *, voff_t); void uvm_pageunwire(struct vm_page *); void uvm_pagewait(struct vm_page *, struct rwlock *, const char *); -void uvm_pagewake(struct vm_page *); void uvm_pagewire(struct vm_page *); void uvm_pagezero(struct vm_page *); void uvm_pagealloc_pg(struct vm_page *, struct uvm_object *, diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c index bff135ca0..71d1cf221 100644 --- a/usr.bin/tmux/arguments.c +++ b/usr.bin/tmux/arguments.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arguments.c,v 1.63 2024/04/15 08:19:55 nicm Exp $ */ +/* $OpenBSD: arguments.c,v 1.64 2024/05/13 11:45:05 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott @@ -164,15 +164,17 @@ args_parse_flag_argument(struct args_value *values, u_int count, char **cause, argument = &values[*i]; if (argument->type != ARGS_STRING) { xasprintf(cause, "-%c argument must be a string", flag); + args_free_value(new); + free(new); return (-1); } } if (argument == NULL) { + args_free_value(new); + free(new); if (optional_argument) { log_debug("%s: -%c (optional)", __func__, flag); args_set(args, flag, NULL, ARGS_ENTRY_OPTIONAL_VALUE); - args_free_value(new); - free(new); return (0); /* either - or end */ } xasprintf(cause, "-%c expects an argument", flag); diff --git a/usr.sbin/smtpd/smtpc.c b/usr.sbin/smtpd/smtpc.c index 915206a69..33d84c7c5 100644 --- a/usr.sbin/smtpd/smtpc.c +++ b/usr.sbin/smtpd/smtpc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpc.c,v 1.20 2023/05/16 17:48:52 op Exp $ */ +/* $OpenBSD: smtpc.c,v 1.21 2024/05/13 06:48:26 jsg Exp $ */ /* * Copyright (c) 2018 Eric Faurot @@ -399,6 +399,7 @@ parse_message(FILE *ifp) fatal("fputc"); } + free(line); fclose(ifp); rewind(mail.fp); } diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index e2e03222a..5c08cd49e 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.157 2024/05/02 18:14:33 op Exp $ */ +/* $OpenBSD: util.c,v 1.158 2024/05/13 06:48:26 jsg Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -744,22 +744,24 @@ parse_mailname_file(char *hostname, size_t len) if ((fp = fopen(MAILNAME_FILE, "r")) == NULL) return 1; - if ((buflen = getline(&buf, &bufsz, fp)) == -1) - goto error; + buflen = getline(&buf, &bufsz, fp); + fclose(fp); + if (buflen == -1) { + free(buf); + return 1; + } if (buf[buflen - 1] == '\n') buf[buflen - 1] = '\0'; - if (strlcpy(hostname, buf, len) >= len) { + bufsz = strlcpy(hostname, buf, len); + free(buf); + if (bufsz >= len) { fprintf(stderr, MAILNAME_FILE " entry too long"); - goto error; + return 1; } return 0; -error: - fclose(fp); - free(buf); - return 1; } int