From 332472a19d3405c29081d36ad659e20f65b0c035 Mon Sep 17 00:00:00 2001 From: purplerain Date: Fri, 24 May 2024 18:59:17 +0000 Subject: [PATCH] sync with OpenBSD -current --- distrib/sets/lists/base/mi | 2 +- gnu/usr.bin/gcc/gcc/Makefile.in | 8 -- include/sndio.h | 13 +++- lib/libsndio/amsg.h | 15 +++- lib/libsndio/shlib_version | 2 +- lib/libsndio/sioctl_aucat.c | 1 + lib/libsndio/sioctl_open.3 | 10 ++- lib/libsndio/sioctl_sun.c | 25 ++++++ share/man/man1/check-lib-depends.1 | 6 +- sys/dev/cardbus/cardbus.c | 3 +- sys/dev/cardbus/cardslot.c | 5 +- sys/dev/cardbus/com_cardbus.c | 4 +- sys/dev/cardbus/ehci_cardbus.c | 4 +- sys/dev/cardbus/if_acx_cardbus.c | 8 +- sys/dev/cardbus/if_ath_cardbus.c | 11 +-- sys/dev/cardbus/if_athn_cardbus.c | 7 +- sys/dev/cardbus/if_atw_cardbus.c | 15 +--- sys/dev/cardbus/if_bwi_cardbus.c | 4 +- sys/dev/cardbus/if_dc_cardbus.c | 8 +- sys/dev/cardbus/if_fxp_cardbus.c | 12 +-- sys/dev/cardbus/if_malo_cardbus.c | 4 +- sys/dev/cardbus/if_pgt_cardbus.c | 7 +- sys/dev/cardbus/if_ral_cardbus.c | 7 +- sys/dev/cardbus/if_re_cardbus.c | 7 +- sys/dev/cardbus/if_rl_cardbus.c | 14 +--- sys/dev/cardbus/if_rtw_cardbus.c | 13 +--- sys/dev/cardbus/if_xl_cardbus.c | 10 +-- sys/dev/cardbus/ohci_cardbus.c | 4 +- sys/dev/cardbus/puc_cardbus.c | 6 +- sys/dev/cardbus/uhci_cardbus.c | 4 +- sys/dev/ic/nvme.c | 117 ++++++++++++++++++++++++++++- sys/dev/ic/nvmeio.h | 47 ++++++++++++ sys/dev/ic/nvmereg.h | 3 +- sys/dev/ic/ufshci.c | 79 ++++++++++++++++++- sys/dev/ic/ufshcireg.h | 8 +- sys/dev/ic/ufshcivar.h | 3 +- sys/dev/pci/aac_pci.c | 5 +- sys/dev/pci/adv_pci.c | 4 +- sys/dev/pci/adw_pci.c | 5 +- sys/dev/pci/agp.c | 8 +- sys/dev/pci/agp_ali.c | 5 +- sys/dev/pci/agp_amd.c | 4 +- sys/dev/pci/agp_apple.c | 4 +- sys/dev/pci/agp_i810.c | 3 +- sys/dev/pci/agp_intel.c | 4 +- sys/dev/pci/agp_sis.c | 5 +- sys/dev/pci/agp_via.c | 5 +- sys/dev/pci/ahc_pci.c | 6 +- sys/dev/pci/ahci_pci.c | 9 +-- sys/dev/pci/alipm.c | 3 +- sys/dev/pci/amdiic.c | 3 +- sys/dev/pci/amdpm.c | 3 +- sys/dev/pci/ami_pci.c | 4 +- sys/dev/pci/arc.c | 4 +- sys/dev/pci/auacer.c | 3 +- sys/dev/pci/auixp.c | 4 +- sys/dev/pci/autri.c | 4 +- sys/dev/pci/berkwdt.c | 3 +- sys/dev/pci/cac_pci.c | 4 +- sys/dev/pci/ccp_pci.c | 5 +- sys/dev/pci/ciss_pci.c | 4 +- sys/dev/pci/cmpci.c | 4 +- sys/dev/pci/com_pci.c | 4 +- sys/dev/pci/cs4280.c | 4 +- sys/dev/pci/cs4281.c | 5 +- sys/dev/pci/cy82c693.c | 4 +- sys/dev/pci/cz.c | 4 +- sys/dev/pci/dwiic_pci.c | 3 +- sys/dev/pci/eap.c | 3 +- sys/dev/pci/ehci_pci.c | 4 +- sys/dev/pci/envy.c | 3 +- sys/dev/pci/esa.c | 4 +- sys/dev/pci/eso.c | 4 +- sys/dev/pci/fms.c | 3 +- sys/dev/pci/fmsradio.c | 8 +- sys/dev/pci/gdt_pci.c | 5 +- sys/dev/pci/i82365_pci.c | 4 +- sys/dev/pci/ichiic.c | 3 +- sys/dev/pci/if_acx_pci.c | 7 +- sys/dev/pci/if_age.c | 4 +- sys/dev/pci/if_alc.c | 4 +- sys/dev/pci/if_ale.c | 4 +- sys/dev/pci/if_an_pci.c | 5 +- sys/dev/pci/if_aq_pci.c | 3 +- sys/dev/pci/if_ath_pci.c | 9 +-- sys/dev/pci/if_athn_pci.c | 7 +- sys/dev/pci/if_atw_pci.c | 11 +-- sys/dev/pci/if_bce.c | 6 +- sys/dev/pci/if_bge.c | 5 +- sys/dev/pci/if_bnxt.c | 4 +- sys/dev/pci/if_bwfm_pci.c | 10 +-- sys/dev/pci/if_bwi_pci.c | 7 +- sys/dev/pci/if_cas.c | 6 +- sys/dev/pci/if_dc_pci.c | 13 +--- sys/dev/pci/if_de.c | 4 +- sys/dev/pci/if_em.c | 4 +- sys/dev/pci/if_em_hw.c | 13 +--- sys/dev/pci/if_ep_pci.c | 14 +--- sys/dev/pci/if_epic_pci.c | 8 +- sys/dev/pci/if_et.c | 6 +- sys/dev/pci/if_fxp_pci.c | 12 +-- sys/dev/pci/if_gem_pci.c | 8 +- sys/dev/pci/if_hme_pci.c | 6 +- sys/dev/pci/if_iavf.c | 4 +- sys/dev/pci/if_igc.c | 3 +- sys/dev/pci/if_iwi.c | 4 +- sys/dev/pci/if_iwm.c | 7 +- sys/dev/pci/if_iwn.c | 4 +- sys/dev/pci/if_iwx.c | 7 +- sys/dev/pci/if_ixl.c | 4 +- sys/dev/pci/if_jme.c | 4 +- sys/dev/pci/if_lge.c | 6 +- sys/dev/pci/if_lii.c | 4 +- sys/dev/pci/if_malo_pci.c | 7 +- sys/dev/pci/if_mcx.c | 6 +- sys/dev/pci/if_msk.c | 5 +- sys/dev/pci/if_mtd_pci.c | 3 +- sys/dev/pci/if_myx.c | 5 +- sys/dev/pci/if_ne_pci.c | 7 +- sys/dev/pci/if_nep.c | 3 +- sys/dev/pci/if_nfe.c | 4 +- sys/dev/pci/if_ngbe.c | 4 +- sys/dev/pci/if_nge.c | 6 +- sys/dev/pci/if_nxe.c | 5 +- sys/dev/pci/if_oce.c | 7 +- sys/dev/pci/if_pcn.c | 5 +- sys/dev/pci/if_pgt_pci.c | 7 +- sys/dev/pci/if_qwx_pci.c | 5 +- sys/dev/pci/if_ral_pci.c | 7 +- sys/dev/pci/if_re_pci.c | 8 +- sys/dev/pci/if_rge.c | 4 +- sys/dev/pci/if_rl_pci.c | 13 +--- sys/dev/pci/if_rtw_pci.c | 10 +-- sys/dev/pci/if_rtwn.c | 7 +- sys/dev/pci/if_se.c | 5 +- sys/dev/pci/if_sf_pci.c | 8 +- sys/dev/pci/if_sis.c | 5 +- sys/dev/pci/if_sk.c | 4 +- sys/dev/pci/if_ste.c | 4 +- sys/dev/pci/if_stge.c | 5 +- sys/dev/pci/if_tht.c | 4 +- sys/dev/pci/if_ti_pci.c | 3 +- sys/dev/pci/if_tl.c | 5 +- sys/dev/pci/if_txp.c | 3 +- sys/dev/pci/if_vge.c | 5 +- sys/dev/pci/if_vic.c | 3 +- sys/dev/pci/if_vr.c | 4 +- sys/dev/pci/if_vte.c | 6 +- sys/dev/pci/if_wb.c | 6 +- sys/dev/pci/if_wi_pci.c | 4 +- sys/dev/pci/if_wpi.c | 5 +- sys/dev/pci/if_xge.c | 7 +- sys/dev/pci/if_xl_pci.c | 14 +--- sys/dev/pci/igc_base.c | 3 +- sys/dev/pci/iosf_pci.c | 4 +- sys/dev/pci/ips.c | 3 +- sys/dev/pci/ixgb_ee.c | 7 +- sys/dev/pci/ixgb_hw.c | 7 +- sys/dev/pci/jmb.c | 6 +- sys/dev/pci/maestro.c | 3 +- sys/dev/pci/mbg.c | 4 +- sys/dev/pci/mfi_pci.c | 6 +- sys/dev/pci/mfii.c | 3 +- sys/dev/pci/mmuagp.c | 2 - sys/dev/pci/mpi_pci.c | 6 +- sys/dev/pci/mpii.c | 6 +- sys/dev/pci/neo.c | 4 +- sys/dev/pci/nvme_pci.c | 7 +- sys/dev/pci/ohci_pci.c | 4 +- sys/dev/pci/pccbb.c | 5 +- sys/dev/pci/pcscp.c | 3 +- sys/dev/pci/piixpm.c | 3 +- sys/dev/pci/pucvar.h | 3 +- sys/dev/pci/pwdog.c | 3 +- sys/dev/pci/qla_pci.c | 8 +- sys/dev/pci/qle.c | 10 +-- sys/dev/pci/qlw_pci.c | 8 +- sys/dev/pci/sili_pci.c | 4 +- sys/dev/pci/siop_pci.c | 3 +- sys/dev/pci/siop_pci_common.c | 6 +- sys/dev/pci/sv.c | 3 +- sys/dev/pci/twe_pci.c | 4 +- sys/dev/pci/ufshci_pci.c | 14 +++- sys/dev/pci/uhci_pci.c | 4 +- sys/dev/pci/vga_pci.c | 5 +- sys/dev/pci/vga_pci_common.c | 1 - sys/dev/pci/viapm.c | 3 +- sys/dev/pci/vmwpvs.c | 6 +- sys/dev/pci/wdt.c | 3 +- sys/dev/pci/xhci_pci.c | 6 +- sys/dev/pci/yds.c | 6 +- sys/dev/pv/hvs.c | 4 - sys/dev/pv/hyperv.c | 6 -- sys/dev/pv/hypervic.c | 11 --- sys/dev/pv/if_hvn.c | 9 --- sys/dev/pv/if_vio.c | 4 +- sys/dev/pv/if_xnf.c | 13 +--- sys/dev/pv/pvbus.c | 5 +- sys/dev/pv/pvclock.c | 6 +- sys/dev/pv/vioblk.c | 5 +- sys/dev/pv/viocon.c | 6 +- sys/dev/pv/viogpu.c | 3 +- sys/dev/pv/viomb.c | 3 +- sys/dev/pv/viornd.c | 3 +- sys/dev/pv/virtio.c | 4 +- sys/dev/pv/vmmci.c | 7 +- sys/dev/pv/vmt.c | 7 +- sys/dev/pv/xbf.c | 6 +- sys/dev/pv/xen.c | 6 +- sys/dev/pv/xenstore.c | 4 +- sys/net/if_pfsync.c | 4 +- usr.bin/passwd/pwd_check.c | 4 +- usr.bin/sndioctl/sndioctl.c | 42 ++++++++++- usr.bin/sndiod/dev.c | 78 ++++++++++++++++++- usr.bin/sndiod/dev.h | 9 ++- usr.bin/sndiod/dev_sioctl.c | 7 +- usr.bin/sndiod/opt.c | 32 +++++--- usr.bin/sndiod/sock.c | 33 +++++--- usr.bin/sndiod/sock.h | 5 +- usr.bin/ssh/channels.h | 3 +- usr.bin/ssh/servconf.h | 3 +- usr.bin/tmux/mode-tree.c | 62 ++++++++++++++- usr.bin/tmux/tmux.1 | 16 ++-- usr.bin/tmux/utf8.c | 4 +- usr.sbin/rpki-client/cms.c | 5 +- usr.sbin/rpki-client/mft.c | 4 +- usr.sbin/rpki-client/roa.c | 10 +-- usr.sbin/rpki-client/rpki-client.8 | 30 ++++---- usr.sbin/smtpd/smtpd-tables.7 | 16 ++-- usr.sbin/smtpd/table_proc.c | 35 +++++++-- 230 files changed, 822 insertions(+), 1009 deletions(-) create mode 100644 sys/dev/ic/nvmeio.h diff --git a/distrib/sets/lists/base/mi b/distrib/sets/lists/base/mi index ed98bbbaf..ddda8ed63 100644 --- a/distrib/sets/lists/base/mi +++ b/distrib/sets/lists/base/mi @@ -757,7 +757,7 @@ ./usr/lib/libreadline.so.5.0 ./usr/lib/librpcsvc.so.3.0 ./usr/lib/libskey.so.6.0 -./usr/lib/libsndio.so.7.2 +./usr/lib/libsndio.so.7.3 ./usr/lib/libssl.so.57.0 ./usr/lib/libtermcap.so.15.0 ./usr/lib/libtermlib.so.15.0 diff --git a/gnu/usr.bin/gcc/gcc/Makefile.in b/gnu/usr.bin/gcc/gcc/Makefile.in index 3beb6c43d..3c3fa414e 100644 --- a/gnu/usr.bin/gcc/gcc/Makefile.in +++ b/gnu/usr.bin/gcc/gcc/Makefile.in @@ -861,14 +861,6 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4 # End of language makefile fragments. # -Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \ - $(xmake_file) $(tmake_file) $(LANG_MAKEFILES) - $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \ - "$(xmake_file)" "$(tmake_file)" - cp config.status config.run - LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.run - rm -f config.run - config.h: cs-config.h ; @true hconfig.h: cs-hconfig.h ; @true tconfig.h: cs-tconfig.h ; @true diff --git a/include/sndio.h b/include/sndio.h index 04c7336dd..2bf77514f 100644 --- a/include/sndio.h +++ b/include/sndio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sndio.h,v 1.14 2022/04/29 08:30:48 ratchov Exp $ */ +/* $OpenBSD: sndio.h,v 1.15 2024/05/24 15:10:26 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -27,8 +27,17 @@ /* * limits + * + * For now SIOCTL_DISPLAYMAX is 12 byte only. It nicely fits in the + * padding of the sioctl_desc structure: this allows any binary linked + * to the library version with no sioctl_desc->display to work with + * this library version. Currently, any string reported by the lower + * layers fits in the 12-byte buffer. Once larger strings start + * being used (or the ABI changes for any other reason) increase + * SIOCTL_DISPLAYMAX and properly pad the sioctl_desc structure. */ #define SIOCTL_NAMEMAX 12 /* max name length */ +#define SIOCTL_DISPLAYMAX 12 /* max display string length */ /* * private ``handle'' structure @@ -115,7 +124,7 @@ struct sioctl_desc { struct sioctl_node node0; /* affected node */ struct sioctl_node node1; /* dito for SIOCTL_{VEC,LIST,SEL} */ unsigned int maxval; /* max value */ - int __pad[3]; + char display[SIOCTL_DISPLAYMAX]; /* free-format hint */ }; /* diff --git a/lib/libsndio/amsg.h b/lib/libsndio/amsg.h index 6d1a185fc..331f81130 100644 --- a/lib/libsndio/amsg.h +++ b/lib/libsndio/amsg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: amsg.h,v 1.15 2022/04/29 08:30:48 ratchov Exp $ */ +/* $OpenBSD: amsg.h,v 1.16 2024/05/24 15:16:09 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -46,6 +46,13 @@ * limits */ #define AMSG_CTL_NAMEMAX 16 /* max name length */ +#define AMSG_CTL_DISPLAYMAX 32 /* max display string length */ + +/* + * Size of the struct amsg_ctl_desc expected by clients + * using the AMSG_CTLSUB_OLD request + */ +#define AMSG_OLD_DESC_SIZE 92 /* * WARNING: since the protocol may be simultaneously used by static @@ -69,9 +76,10 @@ struct amsg { #define AMSG_HELLO 10 /* say hello, check versions and so ... */ #define AMSG_BYE 11 /* ask server to drop connection */ #define AMSG_AUTH 12 /* send authentication cookie */ -#define AMSG_CTLSUB 13 /* ondesc/onctl subscription */ +#define AMSG_CTLSUB_OLD 13 /* amsg_ctl_desc with no "display" attribute */ #define AMSG_CTLSET 14 /* set control value */ #define AMSG_CTLSYNC 15 /* end of controls descriptions */ +#define AMSG_CTLSUB 16 /* ondesc/onctl subscription */ uint32_t cmd; uint32_t __pad; union { @@ -151,7 +159,8 @@ struct amsg_ctl_desc { uint16_t addr; /* control address */ uint16_t maxval; uint16_t curval; - uint32_t __pad2[3]; + uint32_t __pad2[4]; + char display[AMSG_CTL_DISPLAYMAX]; /* free-format hint */ }; /* diff --git a/lib/libsndio/shlib_version b/lib/libsndio/shlib_version index a0ace4f32..9521c10df 100644 --- a/lib/libsndio/shlib_version +++ b/lib/libsndio/shlib_version @@ -1,2 +1,2 @@ major=7 -minor=2 +minor=3 diff --git a/lib/libsndio/sioctl_aucat.c b/lib/libsndio/sioctl_aucat.c index b6de2744f..e912e45ac 100644 --- a/lib/libsndio/sioctl_aucat.c +++ b/lib/libsndio/sioctl_aucat.c @@ -87,6 +87,7 @@ sioctl_aucat_rdata(struct sioctl_aucat_hdl *hdl) strlcpy(desc.node1.name, c->node1.name, SIOCTL_NAMEMAX); desc.node1.unit = (int16_t)ntohs(c->node1.unit); strlcpy(desc.func, c->func, SIOCTL_NAMEMAX); + strlcpy(desc.display, c->display, SIOCTL_DISPLAYMAX); desc.type = c->type; desc.addr = ntohs(c->addr); desc.maxval = ntohs(c->maxval); diff --git a/lib/libsndio/sioctl_open.3 b/lib/libsndio/sioctl_open.3 index 9c1dd179e..791f3a23b 100644 --- a/lib/libsndio/sioctl_open.3 +++ b/lib/libsndio/sioctl_open.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sioctl_open.3,v 1.13 2022/05/03 13:03:30 ratchov Exp $ +.\" $OpenBSD: sioctl_open.3,v 1.14 2024/05/24 15:10:27 ratchov Exp $ .\" .\" Copyright (c) 2011-2020 Alexandre Ratchov .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 3 2022 $ +.Dd $Mdocdate: May 24 2024 $ .Dt SIOCTL_OPEN 3 .Os .Sh NAME @@ -168,6 +168,7 @@ struct sioctl_desc { struct sioctl_node node0; /* affected node */ struct sioctl_node node1; /* dito for SIOCTL_{VEC,LIST,SEL} */ unsigned int maxval; /* max value */ + char display[SIOCTL_DISPLAYMAX]; /* free-format hint */ }; .Ed .Pp @@ -238,6 +239,11 @@ The .Fa maxval attribute indicates the maximum value of this control. For boolean control types it is set to 1. +.Pp +The +.Fa display +attribute contains an optional free-format string providing additional +hints about the control, like the hardware model, or the units. .Ss Changing and reading control values Controls are changed with the .Fn sioctl_setval diff --git a/lib/libsndio/sioctl_sun.c b/lib/libsndio/sioctl_sun.c index 9547e7c2d..64129ac2a 100644 --- a/lib/libsndio/sioctl_sun.c +++ b/lib/libsndio/sioctl_sun.c @@ -53,6 +53,8 @@ struct volume struct sioctl_sun_hdl { struct sioctl_hdl sioctl; + char display[SIOCTL_DISPLAYMAX]; + int display_addr; struct volume output, input; int fd, events; }; @@ -147,6 +149,7 @@ init(struct sioctl_sun_hdl *hdl) {AudioCinputs, AudioNvolume}, {AudioCinputs, AudioNinput} }; + struct audio_device getdev; int i; for (i = 0; i < sizeof(output_names) / sizeof(output_names[0]); i++) { @@ -165,6 +168,13 @@ init(struct sioctl_sun_hdl *hdl) break; } } + + hdl->display_addr = 128; + if (ioctl(hdl->fd, AUDIO_GETDEV, &getdev) == -1) + strlcpy(hdl->display, "unknown", SIOCTL_DISPLAYMAX); + else + strlcpy(hdl->display, getdev.name, SIOCTL_DISPLAYMAX); + DPRINTF("init: server.device: display = %s\n", hdl->display); } static int @@ -407,12 +417,27 @@ static int sioctl_sun_ondesc(struct sioctl_hdl *addr) { struct sioctl_sun_hdl *hdl = (struct sioctl_sun_hdl *)addr; + struct sioctl_desc desc; if (!scanvol(hdl, &hdl->output) || !scanvol(hdl, &hdl->input)) { hdl->sioctl.eof = 1; return 0; } + + /* report "server.device" control */ + memset(&desc, 0, sizeof(struct sioctl_desc)); + desc.type = SIOCTL_SEL; + desc.maxval = 1; + strlcpy(desc.func, "device", SIOCTL_NAMEMAX); + strlcpy(desc.node0.name, "server", SIOCTL_NAMEMAX); + desc.node0.unit = -1; + strlcpy(desc.node1.name, "0", SIOCTL_NAMEMAX); + desc.node1.unit = -1; + strlcpy(desc.display, hdl->display, SIOCTL_DISPLAYMAX); + desc.addr = hdl->display_addr; + _sioctl_ondesc_cb(&hdl->sioctl, &desc, 1); + _sioctl_ondesc_cb(&hdl->sioctl, NULL, 0); return 1; } diff --git a/share/man/man1/check-lib-depends.1 b/share/man/man1/check-lib-depends.1 index 2a84030ed..0a8c41e32 100644 --- a/share/man/man1/check-lib-depends.1 +++ b/share/man/man1/check-lib-depends.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: check-lib-depends.1,v 1.5 2021/06/21 15:17:32 espie Exp $ +.\" $OpenBSD: check-lib-depends.1,v 1.6 2024/05/24 11:52:45 op Exp $ .\" .\" Copyright (c) 2010 Marc Espie .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 21 2021 $ +.Dd $Mdocdate: May 24 2024 $ .Dt CHECK-LIB-DEPENDS 1 .Os .Sh NAME @@ -98,7 +98,7 @@ Be quiet, do not emit .Sq Extra: wantlibs unless there's also an actual problem. .It Fl S Ar var Ns = Ns Ar value -recognize list of libraries listed in a variable, and replace said list +Recognize list of libraries listed in a variable, and replace said list with variable value. For instance, .Fl S Ar COMPILER_LIBCXX Ns = Ns Ar stdc++ diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 98a2840fd..09cda7fe7 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cardbus.c,v 1.53 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: cardbus.c,v 1.54 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: cardbus.c,v 1.24 2000/04/02 19:11:37 mycroft Exp $ */ /* @@ -32,7 +32,6 @@ #include #include #include -#include #include diff --git a/sys/dev/cardbus/cardslot.c b/sys/dev/cardbus/cardslot.c index 09bb1d0ae..e9c6d0a9e 100644 --- a/sys/dev/cardbus/cardslot.c +++ b/sys/dev/cardbus/cardslot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cardslot.c,v 1.23 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: cardslot.c,v 1.24 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: cardslot.c,v 1.9 2000/03/22 09:35:06 haya Exp $ */ /* @@ -31,9 +31,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/sys/dev/cardbus/com_cardbus.c b/sys/dev/cardbus/com_cardbus.c index c286a3c79..b3346d257 100644 --- a/sys/dev/cardbus/com_cardbus.c +++ b/sys/dev/cardbus/com_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_cardbus.c,v 1.44 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: com_cardbus.c,v 1.45 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: com_cardbus.c,v 1.4 2000/04/17 09:21:59 joda Exp $ */ /* @@ -56,8 +56,6 @@ #include -#include "com.h" - #include #include #include diff --git a/sys/dev/cardbus/ehci_cardbus.c b/sys/dev/cardbus/ehci_cardbus.c index 0bae8463f..5b47ed7f7 100644 --- a/sys/dev/cardbus/ehci_cardbus.c +++ b/sys/dev/cardbus/ehci_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci_cardbus.c,v 1.23 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: ehci_cardbus.c,v 1.24 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: ehci_cardbus.c,v 1.6.6.3 2004/09/21 13:27:25 skrll Exp $ */ /* @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -44,7 +43,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/cardbus/if_acx_cardbus.c b/sys/dev/cardbus/if_acx_cardbus.c index 7c53a8c49..003f6958f 100644 --- a/sys/dev/cardbus/if_acx_cardbus.c +++ b/sys/dev/cardbus/if_acx_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_acx_cardbus.c,v 1.23 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_acx_cardbus.c,v 1.24 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 2006 Claudio Jeker @@ -25,17 +25,11 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/cardbus/if_ath_cardbus.c b/sys/dev/cardbus/if_ath_cardbus.c index 91f83662c..7da7221d0 100644 --- a/sys/dev/cardbus/if_ath_cardbus.c +++ b/sys/dev/cardbus/if_ath_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_cardbus.c,v 1.21 2023/01/04 07:06:08 jsg Exp $ */ +/* $OpenBSD: if_ath_cardbus.c,v 1.22 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: if_ath_cardbus.c,v 1.4 2004/08/02 19:14:28 mycroft Exp $ */ /* @@ -34,15 +34,8 @@ #include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include @@ -54,13 +47,11 @@ #include #include -#include #include #include #include -#include #include diff --git a/sys/dev/cardbus/if_athn_cardbus.c b/sys/dev/cardbus/if_athn_cardbus.c index 0f1a76760..3d89b0b2d 100644 --- a/sys/dev/cardbus/if_athn_cardbus.c +++ b/sys/dev/cardbus/if_athn_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_cardbus.c,v 1.18 2022/07/24 17:22:12 kn Exp $ */ +/* $OpenBSD: if_athn_cardbus.c,v 1.19 2024/05/24 06:26:47 jsg Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/cardbus/if_atw_cardbus.c b/sys/dev/cardbus/if_atw_cardbus.c index 62910698d..4dc4109a4 100644 --- a/sys/dev/cardbus/if_atw_cardbus.c +++ b/sys/dev/cardbus/if_atw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atw_cardbus.c,v 1.25 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_atw_cardbus.c,v 1.26 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: if_atw_cardbus.c,v 1.9 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -40,14 +40,7 @@ #include #include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -58,15 +51,9 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - #include -#include #include -#include #include #include diff --git a/sys/dev/cardbus/if_bwi_cardbus.c b/sys/dev/cardbus/if_bwi_cardbus.c index 9e2e89703..62ff8fdb9 100644 --- a/sys/dev/cardbus/if_bwi_cardbus.c +++ b/sys/dev/cardbus/if_bwi_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwi_cardbus.c,v 1.16 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_bwi_cardbus.c,v 1.17 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 2007 Marcus Glocker @@ -24,8 +24,6 @@ #include "bpfilter.h" #include -#include -#include #include #include diff --git a/sys/dev/cardbus/if_dc_cardbus.c b/sys/dev/cardbus/if_dc_cardbus.c index fd11bdd16..c9eec9d25 100644 --- a/sys/dev/cardbus/if_dc_cardbus.c +++ b/sys/dev/cardbus/if_dc_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_cardbus.c,v 1.41 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_dc_cardbus.c,v 1.42 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -36,12 +36,6 @@ #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c index 5cc5b745c..e304f6465 100644 --- a/sys/dev/cardbus/if_fxp_cardbus.c +++ b/sys/dev/cardbus/if_fxp_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fxp_cardbus.c,v 1.38 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_fxp_cardbus.c,v 1.39 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: if_fxp_cardbus.c,v 1.12 2000/05/08 18:23:36 thorpej Exp $ */ /* @@ -39,22 +39,12 @@ #include #include #include -#include -#include -#include -#include -#include #include #include -#include #include #include -#if NBPFILTER > 0 -#include -#endif - #include #include diff --git a/sys/dev/cardbus/if_malo_cardbus.c b/sys/dev/cardbus/if_malo_cardbus.c index 471fe3081..080a04f26 100644 --- a/sys/dev/cardbus/if_malo_cardbus.c +++ b/sys/dev/cardbus/if_malo_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo_cardbus.c,v 1.13 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_malo_cardbus.c,v 1.14 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 2006 Claudio Jeker @@ -19,8 +19,6 @@ #include "bpfilter.h" #include -#include -#include #include #include diff --git a/sys/dev/cardbus/if_pgt_cardbus.c b/sys/dev/cardbus/if_pgt_cardbus.c index 1c60cb460..7a7282dbb 100644 --- a/sys/dev/cardbus/if_pgt_cardbus.c +++ b/sys/dev/cardbus/if_pgt_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pgt_cardbus.c,v 1.19 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_pgt_cardbus.c,v 1.20 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 2006 Marcus Glocker @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/cardbus/if_ral_cardbus.c b/sys/dev/cardbus/if_ral_cardbus.c index 4e3ba383d..80967b687 100644 --- a/sys/dev/cardbus/if_ral_cardbus.c +++ b/sys/dev/cardbus/if_ral_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral_cardbus.c,v 1.23 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_ral_cardbus.c,v 1.24 2024/05/24 06:26:47 jsg Exp $ */ /*- * Copyright (c) 2005-2010 Damien Bergamini @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/cardbus/if_re_cardbus.c b/sys/dev/cardbus/if_re_cardbus.c index b437fcc10..f92c82ff0 100644 --- a/sys/dev/cardbus/if_re_cardbus.c +++ b/sys/dev/cardbus/if_re_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_cardbus.c,v 1.31 2024/01/19 03:46:15 dlg Exp $ */ +/* $OpenBSD: if_re_cardbus.c,v 1.32 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 2005 Peter Valchev @@ -21,15 +21,10 @@ */ #include -#include #include -#include #include -#include -#include #include #include -#include #include #include diff --git a/sys/dev/cardbus/if_rl_cardbus.c b/sys/dev/cardbus/if_rl_cardbus.c index 52ceca6ea..865c0fdb7 100644 --- a/sys/dev/cardbus/if_rl_cardbus.c +++ b/sys/dev/cardbus/if_rl_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rl_cardbus.c,v 1.32 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_rl_cardbus.c,v 1.33 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: if_rl_cardbus.c,v 1.3.8.3 2001/11/14 19:14:02 nathanw Exp $ */ /* @@ -40,28 +40,16 @@ #include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include -#if NBPFILTER > 0 -#include -#endif - #include #include #include -#include #include diff --git a/sys/dev/cardbus/if_rtw_cardbus.c b/sys/dev/cardbus/if_rtw_cardbus.c index c5ec8d964..61ea35945 100644 --- a/sys/dev/cardbus/if_rtw_cardbus.c +++ b/sys/dev/cardbus/if_rtw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtw_cardbus.c,v 1.27 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_rtw_cardbus.c,v 1.28 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: if_rtw_cardbus.c,v 1.4 2004/12/20 21:05:34 dyoung Exp $ */ /*- @@ -71,14 +71,7 @@ #include #include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -89,10 +82,6 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - #include #include diff --git a/sys/dev/cardbus/if_xl_cardbus.c b/sys/dev/cardbus/if_xl_cardbus.c index 91f40557b..8540bbf20 100644 --- a/sys/dev/cardbus/if_xl_cardbus.c +++ b/sys/dev/cardbus/if_xl_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xl_cardbus.c,v 1.34 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: if_xl_cardbus.c,v 1.35 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: if_xl_cardbus.c,v 1.13 2000/03/07 00:32:52 mycroft Exp $ */ /* @@ -31,16 +31,8 @@ * */ -#include "bpfilter.h" - #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/sys/dev/cardbus/ohci_cardbus.c b/sys/dev/cardbus/ohci_cardbus.c index a69481efa..68a7a54f3 100644 --- a/sys/dev/cardbus/ohci_cardbus.c +++ b/sys/dev/cardbus/ohci_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_cardbus.c,v 1.23 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: ohci_cardbus.c,v 1.24 2024/05/24 06:26:47 jsg Exp $ */ /* $NetBSD: ohci_cardbus.c,v 1.19 2004/08/02 19:14:28 mycroft Exp $ */ /* @@ -41,7 +41,6 @@ #include #include -#include #include #include @@ -51,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/cardbus/puc_cardbus.c b/sys/dev/cardbus/puc_cardbus.c index e93149efb..bd791eb92 100644 --- a/sys/dev/cardbus/puc_cardbus.c +++ b/sys/dev/cardbus/puc_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: puc_cardbus.c,v 1.9 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: puc_cardbus.c,v 1.10 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 2006 Michael Shalayeff @@ -20,10 +20,6 @@ #include #include #include -#include - -#include -#include #include #include diff --git a/sys/dev/cardbus/uhci_cardbus.c b/sys/dev/cardbus/uhci_cardbus.c index 319ab96f8..2dc6a6e0b 100644 --- a/sys/dev/cardbus/uhci_cardbus.c +++ b/sys/dev/cardbus/uhci_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci_cardbus.c,v 1.16 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: uhci_cardbus.c,v 1.17 2024/05/24 06:26:47 jsg Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -32,7 +32,6 @@ #include #include -#include #include #include @@ -42,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index 997c5e40d..b04ab4d19 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.111 2024/05/13 11:41:52 krw Exp $ */ +/* $OpenBSD: nvme.c,v 1.112 2024/05/24 12:04:07 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -42,6 +42,7 @@ #include #include #include +#include struct cfdriver nvme_cd = { NULL, @@ -90,6 +91,9 @@ 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(const struct nvm_identify_namespace *); +int nvme_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); +int nvme_passthrough_cmd(struct nvme_softc *, struct nvme_pt_cmd *, + int, int); #ifdef HIBERNATE #include @@ -111,7 +115,8 @@ 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 + nvme_scsi_cmd, nvme_minphys, nvme_scsi_probe, nvme_scsi_free, + nvme_scsi_ioctl }; void nvme_scsi_io(struct scsi_xfer *, int); @@ -924,6 +929,107 @@ nvme_scsi_size(const struct nvm_identify_namespace *ns) return nsze; } +int +nvme_passthrough_cmd(struct nvme_softc *sc, struct nvme_pt_cmd *pt, int dv_unit, + int nsid) +{ + struct nvme_pt_status pt_status; + struct nvme_sqe sqe; + struct nvme_dmamem *mem = NULL; + struct nvme_ccb *ccb = NULL; + int flags; + int rv = 0; + + ccb = nvme_ccb_get(sc); + if (ccb == NULL) + panic("nvme_passthrough_cmd: nvme_ccb_get returned NULL"); + + memset(&sqe, 0, sizeof(sqe)); + sqe.opcode = pt->pt_opcode; + htolem32(&sqe.nsid, pt->pt_nsid); + htolem32(&sqe.cdw10, pt->pt_cdw10); + htolem32(&sqe.cdw11, pt->pt_cdw11); + htolem32(&sqe.cdw12, pt->pt_cdw12); + htolem32(&sqe.cdw13, pt->pt_cdw13); + htolem32(&sqe.cdw14, pt->pt_cdw14); + htolem32(&sqe.cdw15, pt->pt_cdw15); + + ccb->ccb_done = nvme_empty_done; + ccb->ccb_cookie = &sqe; + + switch (pt->pt_opcode) { + case NVM_ADMIN_IDENTIFY: + case NVM_ADMIN_GET_LOG_PG: + case NVM_ADMIN_SELFTEST: + break; + + default: + rv = ENOTTY; + goto done; + } + + if (pt->pt_databuflen > 0) { + mem = nvme_dmamem_alloc(sc, pt->pt_databuflen); + if (mem == NULL) { + rv = ENOMEM; + goto done; + } + htolem64(&sqe.entry.prp[0], NVME_DMA_DVA(mem)); + nvme_dmamem_sync(sc, mem, BUS_DMASYNC_PREREAD); + } + + flags = nvme_poll(sc, sc->sc_admin_q, ccb, nvme_sqe_fill, NVME_TIMO_QOP); + + if (pt->pt_databuflen > 0) { + nvme_dmamem_sync(sc, mem, BUS_DMASYNC_POSTREAD); + if (flags == 0) + rv = copyout(NVME_DMA_KVA(mem), pt->pt_databuf, + pt->pt_databuflen); + } + + if (rv == 0 && pt->pt_statuslen > 0) { + pt_status.ps_dv_unit = dv_unit; + pt_status.ps_nsid = nsid; + pt_status.ps_flags = flags; + pt_status.ps_cc = nvme_read4(sc, NVME_CC); + pt_status.ps_csts = nvme_read4(sc, NVME_CSTS); + rv = copyout(&pt_status, pt->pt_status, pt->pt_statuslen); + } + + done: + if (mem) + nvme_dmamem_free(sc, mem); + if (ccb) + nvme_ccb_put(sc, ccb); + + return rv; +} + +int +nvme_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag) +{ + struct nvme_softc *sc = link->bus->sb_adapter_softc; + struct nvme_pt_cmd *pt = (struct nvme_pt_cmd *)addr; + int rv; + + switch (cmd) { + case NVME_PASSTHROUGH_CMD: + break; + default: + return ENOTTY; + } + + if ((pt->pt_cdw10 & 0xff) == 0) + pt->pt_nsid = link->target; + + rv = nvme_passthrough_cmd(sc, pt, sc->sc_dev.dv_unit, link->target); + if (rv) + goto done; + + done: + return rv; +} + uint32_t nvme_op_sq_enter(struct nvme_softc *sc, struct nvme_queue *q, struct nvme_ccb *ccb) @@ -1744,7 +1850,8 @@ int nvme_bioctl(struct device *self, u_long cmd, caddr_t data) { struct nvme_softc *sc = (struct nvme_softc *)self; - int error = 0; + struct nvme_pt_cmd *pt; + int error = 0; rw_enter_write(&sc->sc_lock); @@ -1758,6 +1865,10 @@ nvme_bioctl(struct device *self, u_long cmd, caddr_t data) case BIOCDISK: error = nvme_bioctl_disk(sc, (struct bioc_disk *)data); break; + case NVME_PASSTHROUGH_CMD: + pt = (struct nvme_pt_cmd *)data; + error = nvme_passthrough_cmd(sc, pt, sc->sc_dev.dv_unit, -1); + break; default: printf("nvme_bioctl() Unknown command (%lu)\n", cmd); error = ENOTTY; diff --git a/sys/dev/ic/nvmeio.h b/sys/dev/ic/nvmeio.h new file mode 100644 index 000000000..72c1811ca --- /dev/null +++ b/sys/dev/ic/nvmeio.h @@ -0,0 +1,47 @@ +/* $OpenBSD: nvmeio.h,v 1.1 2024/05/24 12:04:07 krw Exp $ */ +/* + * Copyright (c) 2023 Kenneth R Westerback + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_cmd) + +struct nvme_pt_status { + int ps_dv_unit; + int ps_nsid; + int ps_flags; + uint32_t ps_csts; + uint32_t ps_cc; +}; + +struct nvme_pt_cmd { + /* Commands may arrive via /dev/bio. */ + struct bio pt_bio; + + /* The sqe fields that the caller may specify. */ + uint8_t pt_opcode; + uint32_t pt_nsid; + uint32_t pt_cdw10; + uint32_t pt_cdw11; + uint32_t pt_cdw12; + uint32_t pt_cdw13; + uint32_t pt_cdw14; + uint32_t pt_cdw15; + + caddr_t pt_status; + uint32_t pt_statuslen; + + caddr_t pt_databuf; /* User space address. */ + uint32_t pt_databuflen; /* Length of buffer. */ +}; diff --git a/sys/dev/ic/nvmereg.h b/sys/dev/ic/nvmereg.h index c8f0b4d09..54cb9100b 100644 --- a/sys/dev/ic/nvmereg.h +++ b/sys/dev/ic/nvmereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nvmereg.h,v 1.14 2024/05/13 11:41:52 krw Exp $ */ +/* $OpenBSD: nvmereg.h,v 1.15 2024/05/24 12:04:07 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -247,6 +247,7 @@ struct nvme_cqe { #define NVM_ADMIN_ASYNC_EV_REQ 0x0c /* Asynchronous Event Request */ #define NVM_ADMIN_FW_ACTIVATE 0x10 /* Firmware Activate */ #define NVM_ADMIN_FW_DOWNLOAD 0x11 /* Firmware Image Download */ +#define NVM_ADMIN_SELFTEST 0x14 /* Start self test */ #define NVM_CMD_FLUSH 0x00 /* Flush */ #define NVM_CMD_WRITE 0x01 /* Write */ diff --git a/sys/dev/ic/ufshci.c b/sys/dev/ic/ufshci.c index 065886cbc..66e31ad0c 100644 --- a/sys/dev/ic/ufshci.c +++ b/sys/dev/ic/ufshci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufshci.c,v 1.30 2024/05/22 11:46:06 mglocker Exp $ */ +/* $OpenBSD: ufshci.c,v 1.31 2024/05/24 09:51:14 mglocker Exp $ */ /* * Copyright (c) 2022 Marcus Glocker @@ -79,6 +79,8 @@ int ufshci_utr_cmd_sync(struct ufshci_softc *, struct ufshci_ccb *, struct scsi_xfer *, uint32_t, uint16_t); int ufshci_xfer_complete(struct ufshci_softc *); +int ufshci_powerdown(struct ufshci_softc *); +int ufshci_resume(struct ufshci_softc *); /* SCSI */ int ufshci_ccb_alloc(struct ufshci_softc *, int); @@ -1317,6 +1319,81 @@ ufshci_xfer_complete(struct ufshci_softc *sc) return 0; } +int +ufshci_activate(struct ufshci_softc *sc, int act) +{ + int rv = 0; + + switch (act) { + case DVACT_POWERDOWN: + DPRINTF(1, "%s: POWERDOWN\n", __func__); + rv = config_activate_children(&sc->sc_dev, act); + ufshci_powerdown(sc); + break; + case DVACT_RESUME: + DPRINTF(1, "%s: RESUME\n", __func__); + ufshci_resume(sc); + if (rv == 0) + rv = config_activate_children(&sc->sc_dev, act); + break; + default: + rv = config_activate_children(&sc->sc_dev, act); + break; + } + + return rv; +} + +int +ufshci_powerdown(struct ufshci_softc *sc) +{ + uint32_t reg; + + /* Send "hibernate enter" command. */ + UFSHCI_WRITE_4(sc, UFSHCI_REG_UICCMD, + UFSHCI_REG_UICCMD_CMDOP_DME_HIBERNATE_ENTER); + if (ufshci_is_poll(sc, UFSHCI_REG_IS_UHES) != 0) { + printf("%s: hibernate enter cmd failed\n", __func__); + return 1; + } + + /* Check if "hibernate enter" command was executed successfully. */ + reg = UFSHCI_READ_4(sc, UFSHCI_REG_HCS); + DPRINTF(1, "%s: UPMCRS=0x%x\n", __func__, UFSHCI_REG_HCS_UPMCRS(reg)); + if (UFSHCI_REG_HCS_UPMCRS(reg) > UFSHCI_REG_HCS_UPMCRS_PWR_REMTOTE) { + printf("%s: hibernate enter cmd returned UPMCRS error=0x%x\n", + __func__, UFSHCI_REG_HCS_UPMCRS(reg)); + return 1; + } + + return 0; +} + +int +ufshci_resume(struct ufshci_softc *sc) +{ + uint32_t reg; + + /* Send "hibernate exit" command. */ + UFSHCI_WRITE_4(sc, UFSHCI_REG_UICCMD, + UFSHCI_REG_UICCMD_CMDOP_DME_HIBERNATE_EXIT); + if (ufshci_is_poll(sc, UFSHCI_REG_IS_UHXS) != 0) { + printf("%s: hibernate exit command failed\n", __func__); + return 1; + } + + /* Check if "hibernate exit" command was executed successfully. */ + reg = UFSHCI_READ_4(sc, UFSHCI_REG_HCS); + DPRINTF(1, "%s: UPMCRS=0x%x\n", __func__, UFSHCI_REG_HCS_UPMCRS(reg)); + if (UFSHCI_REG_HCS_UPMCRS(reg) > UFSHCI_REG_HCS_UPMCRS_PWR_REMTOTE) { + printf("%s: hibernate exit cmd returned UPMCRS error=0x%x\n", + __func__, UFSHCI_REG_HCS_UPMCRS(reg)); + return 1; + } + + return 0; +} + /* SCSI */ int diff --git a/sys/dev/ic/ufshcireg.h b/sys/dev/ic/ufshcireg.h index 702b60468..dfba3df69 100644 --- a/sys/dev/ic/ufshcireg.h +++ b/sys/dev/ic/ufshcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufshcireg.h,v 1.11 2024/05/22 18:10:00 mglocker Exp $ */ +/* $OpenBSD: ufshcireg.h,v 1.12 2024/05/24 09:51:14 mglocker Exp $ */ /* * Copyright (c) 2022 Marcus Glocker @@ -103,6 +103,12 @@ #define UFSHCI_REG_HCS_TTAGUTPE(x) ((x >> 16) & 0x000000ff) /* RO */ #define UFSHCI_REG_HCS_UTPEC(x) ((x >> 12) & 0x0000000f) /* RO */ #define UFSHCI_REG_HCS_UPMCRS(x) ((x >> 8) & 0x00000007) /* RO */ +#define UFSHCI_REG_HCS_UPMCRS_PWR_OK 0x00 +#define UFSHCI_REG_HCS_UPMCRS_PWR_LOCAL 0x01 +#define UFSHCI_REG_HCS_UPMCRS_PWR_REMTOTE 0x02 +#define UFSHCI_REG_HCS_UMPCRS_PWR_BUSY 0x03 +#define UFSHCI_REG_HCS_UMPCRS_PWR_ERROR_CAP 0x04 +#define UFSHCI_REG_HCS_UMPCRS_PWR_FATAL_ERROR 0x05 #define UFSHCI_REG_HCS_UCRDY (1 << 3) /* RO */ #define UFSHCI_REG_HCS_UTMRLRDY (1 << 2) /* RO */ #define UFSHCI_REG_HCS_UTRLRDY (1 << 1) /* RO */ diff --git a/sys/dev/ic/ufshcivar.h b/sys/dev/ic/ufshcivar.h index 81e5bb2e1..b2e15e683 100644 --- a/sys/dev/ic/ufshcivar.h +++ b/sys/dev/ic/ufshcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufshcivar.h,v 1.7 2024/05/20 12:42:45 mglocker Exp $ */ +/* $OpenBSD: ufshcivar.h,v 1.8 2024/05/24 09:51:14 mglocker Exp $ */ /* * Copyright (c) 2022 Marcus Glocker @@ -84,3 +84,4 @@ struct ufshci_softc { int ufshci_intr(void *); void ufshci_attach_hook(struct device *); /* XXX: Only for testing */ int ufshci_attach(struct ufshci_softc *); +int ufshci_activate(struct ufshci_softc *, int); diff --git a/sys/dev/pci/aac_pci.c b/sys/dev/pci/aac_pci.c index c739e15a2..8eea8c1f9 100644 --- a/sys/dev/pci/aac_pci.c +++ b/sys/dev/pci/aac_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac_pci.c,v 1.28 2023/09/11 08:40:25 mvs Exp $ */ +/* $OpenBSD: aac_pci.c,v 1.29 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -41,11 +41,8 @@ #include #include #include -#include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/adv_pci.c b/sys/dev/pci/adv_pci.c index b870cc1d1..c23509e54 100644 --- a/sys/dev/pci/adv_pci.c +++ b/sys/dev/pci/adv_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv_pci.c,v 1.15 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: adv_pci.c,v 1.16 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: adv_pci.c,v 1.5 1998/09/26 15:52:55 dante Exp $ */ /* @@ -57,8 +57,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/adw_pci.c b/sys/dev/pci/adw_pci.c index 995e71ec8..134115258 100644 --- a/sys/dev/pci/adw_pci.c +++ b/sys/dev/pci/adw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw_pci.c,v 1.20 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: adw_pci.c,v 1.21 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: adw_pci.c,v 1.7 2000/05/26 15:13:46 dante Exp $ */ /* @@ -43,11 +43,8 @@ #include #include -#include -#include #include #include -#include #include diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index bf6fa2774..77a473ddd 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp.c,v 1.50 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp.c,v 1.51 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2000 Doug Rabson * All rights reserved. @@ -34,12 +34,6 @@ #include #include -#include - -#include -#include -#include -#include #include #include diff --git a/sys/dev/pci/agp_ali.c b/sys/dev/pci/agp_ali.c index db2c64316..0d6abbfe6 100644 --- a/sys/dev/pci/agp_ali.c +++ b/sys/dev/pci/agp_ali.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_ali.c,v 1.17 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp_ali.c,v 1.18 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: agp_ali.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ @@ -31,15 +31,12 @@ */ #include -#include #include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pci/agp_amd.c b/sys/dev/pci/agp_amd.c index a57e8efec..c54987e93 100644 --- a/sys/dev/pci/agp_amd.c +++ b/sys/dev/pci/agp_amd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_amd.c,v 1.23 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp_amd.c,v 1.24 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: agp_amd.c,v 1.6 2001/10/06 02:48:50 thorpej Exp $ */ /*- @@ -33,11 +33,9 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/agp_apple.c b/sys/dev/pci/agp_apple.c index e9b5f81f4..7743fb0fa 100644 --- a/sys/dev/pci/agp_apple.c +++ b/sys/dev/pci/agp_apple.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_apple.c,v 1.8 2016/05/07 22:46:54 kettenis Exp $ */ +/* $OpenBSD: agp_apple.c,v 1.9 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2012 Martin Pieuchot @@ -18,9 +18,7 @@ #include #include -#include #include -#include #include #include diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index d20e9ad0d..7f4444ffb 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.96 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: agp_i810.c,v 1.97 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/agp_intel.c b/sys/dev/pci/agp_intel.c index 0ff430869..cca61fd92 100644 --- a/sys/dev/pci/agp_intel.c +++ b/sys/dev/pci/agp_intel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_intel.c,v 1.25 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp_intel.c,v 1.26 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: agp_intel.c,v 1.3 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -31,9 +31,7 @@ #include #include -#include #include -#include #include #include diff --git a/sys/dev/pci/agp_sis.c b/sys/dev/pci/agp_sis.c index 145dcfe1d..2912419c7 100644 --- a/sys/dev/pci/agp_sis.c +++ b/sys/dev/pci/agp_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_sis.c,v 1.20 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp_sis.c,v 1.21 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: agp_sis.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -31,14 +31,11 @@ #include #include -#include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pci/agp_via.c b/sys/dev/pci/agp_via.c index d0e27d5ef..c1c471891 100644 --- a/sys/dev/pci/agp_via.c +++ b/sys/dev/pci/agp_via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_via.c,v 1.22 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: agp_via.c,v 1.23 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: agp_via.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -31,14 +31,11 @@ #include #include -#include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c index 1fbd6e74a..412400569 100644 --- a/sys/dev/pci/ahc_pci.c +++ b/sys/dev/pci/ahc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_pci.c,v 1.63 2022/10/21 17:45:40 kn Exp $ */ +/* $OpenBSD: ahc_pci.c,v 1.64 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: ahc_pci.c,v 1.43 2003/08/18 09:16:22 taca Exp $ */ /* @@ -42,7 +42,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: ahc_pci.c,v 1.63 2022/10/21 17:45:40 kn Exp $ + * $Id: ahc_pci.c,v 1.64 2024/05/24 06:02:53 jsg Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#57 $ * @@ -55,10 +55,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/ahci_pci.c b/sys/dev/pci/ahci_pci.c index 77da17ccb..183df336a 100644 --- a/sys/dev/pci/ahci_pci.c +++ b/sys/dev/pci/ahci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci_pci.c,v 1.16 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: ahci_pci.c,v 1.17 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2006 David Gwynne @@ -20,14 +20,9 @@ #include #include -#include -#include -#include #include -#include #include #include -#include #include @@ -35,8 +30,6 @@ #include #include -#include - #include #include diff --git a/sys/dev/pci/alipm.c b/sys/dev/pci/alipm.c index 228d5fb92..5d4ad4d0e 100644 --- a/sys/dev/pci/alipm.c +++ b/sys/dev/pci/alipm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alipm.c,v 1.17 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: alipm.c,v 1.18 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/amdiic.c b/sys/dev/pci/amdiic.c index bd8945435..1e72ed9a0 100644 --- a/sys/dev/pci/amdiic.c +++ b/sys/dev/pci/amdiic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdiic.c,v 1.13 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: amdiic.c,v 1.14 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/amdpm.c b/sys/dev/pci/amdpm.c index 71eeaa35f..fecd48314 100644 --- a/sys/dev/pci/amdpm.c +++ b/sys/dev/pci/amdpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdpm.c,v 1.39 2023/02/04 19:19:37 cheloha Exp $ */ +/* $OpenBSD: amdpm.c,v 1.40 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/ami_pci.c b/sys/dev/pci/ami_pci.c index 9af2efd70..1e3cbf708 100644 --- a/sys/dev/pci/ami_pci.c +++ b/sys/dev/pci/ami_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami_pci.c,v 1.45 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: ami_pci.c,v 1.46 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c index 718831fc5..c0ba8a18d 100644 --- a/sys/dev/pci/arc.c +++ b/sys/dev/pci/arc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc.c,v 1.125 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: arc.c,v 1.126 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2006 David Gwynne @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include #include diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c index 800d4b5f0..8f37f67b4 100644 --- a/sys/dev/pci/auacer.c +++ b/sys/dev/pci/auacer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auacer.c,v 1.29 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: auacer.c,v 1.30 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */ /*- @@ -41,7 +41,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index 221cab442..629fcb64f 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.52 2023/09/11 08:41:26 mvs Exp $ */ +/* $OpenBSD: auixp.c,v 1.53 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -48,8 +48,6 @@ #include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c index 391397e71..d8a5774b6 100644 --- a/sys/dev/pci/autri.c +++ b/sys/dev/pci/autri.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autri.c,v 1.50 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: autri.c,v 1.51 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro. @@ -38,7 +38,6 @@ #include #include -#include #include #include #include @@ -51,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/berkwdt.c b/sys/dev/pci/berkwdt.c index bf9c3377c..585b5aff7 100644 --- a/sys/dev/pci/berkwdt.c +++ b/sys/dev/pci/berkwdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: berkwdt.c,v 1.11 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: berkwdt.c,v 1.12 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2009 Wim Van Sebroeck @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/cac_pci.c b/sys/dev/pci/cac_pci.c index d17f98883..d1539f09c 100644 --- a/sys/dev/pci/cac_pci.c +++ b/sys/dev/pci/cac_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac_pci.c,v 1.18 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: cac_pci.c,v 1.19 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: cac_pci.c,v 1.10 2001/01/10 16:48:04 ad Exp $ */ /*- @@ -36,10 +36,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/ccp_pci.c b/sys/dev/pci/ccp_pci.c index 18407281d..9ad536e0a 100644 --- a/sys/dev/pci/ccp_pci.c +++ b/sys/dev/pci/ccp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccp_pci.c,v 1.8 2023/11/24 08:47:35 jmatthew Exp $ */ +/* $OpenBSD: ccp_pci.c,v 1.9 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2018 David Gwynne @@ -18,11 +18,8 @@ #include #include -#include -#include #include #include -#include #include diff --git a/sys/dev/pci/ciss_pci.c b/sys/dev/pci/ciss_pci.c index f34a43988..64e2138ad 100644 --- a/sys/dev/pci/ciss_pci.c +++ b/sys/dev/pci/ciss_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss_pci.c,v 1.22 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: ciss_pci.c,v 1.23 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -19,8 +19,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index fcd232708..64181b378 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmpci.c,v 1.53 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: cmpci.c,v 1.54 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: cmpci.c,v 1.25 2004/10/26 06:32:20 xtraeme Exp $ */ /* @@ -51,7 +51,6 @@ int cmpcidebug = 0; #include #include -#include #include #include @@ -60,7 +59,6 @@ int cmpcidebug = 0; #include #include -#include #include #include diff --git a/sys/dev/pci/com_pci.c b/sys/dev/pci/com_pci.c index 745b7ccde..e0cd1ed4d 100644 --- a/sys/dev/pci/com_pci.c +++ b/sys/dev/pci/com_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_pci.c,v 1.3 2023/09/11 08:41:26 mvs Exp $ */ +/* $OpenBSD: com_pci.c,v 1.4 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2020 Patrick Wildt * @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -26,7 +25,6 @@ #include #include -#include #define com_usr 31 /* Synopsys DesignWare UART */ diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c index 35d01d7b8..9efd04197 100644 --- a/sys/dev/pci/cs4280.c +++ b/sys/dev/pci/cs4280.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4280.c,v 1.60 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: cs4280.c,v 1.61 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */ /* @@ -67,8 +67,6 @@ int cs4280debug = 0; #include #include -#include -#include #include #include diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c index fa8305d86..33b34dcf2 100644 --- a/sys/dev/pci/cs4281.c +++ b/sys/dev/pci/cs4281.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4281.c,v 1.45 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: cs4281.c,v 1.46 2024/05/24 06:02:53 jsg Exp $ */ /* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */ /* @@ -43,9 +43,7 @@ #include #include -#include #include -#include #include #include @@ -54,7 +52,6 @@ #include #include -#include #include diff --git a/sys/dev/pci/cy82c693.c b/sys/dev/pci/cy82c693.c index f7baa449a..aaa6d19b1 100644 --- a/sys/dev/pci/cy82c693.c +++ b/sys/dev/pci/cy82c693.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy82c693.c,v 1.8 2015/03/14 03:38:48 jsg Exp $ */ +/* $OpenBSD: cy82c693.c,v 1.9 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: cy82c693.c,v 1.1 2000/06/06 03:07:39 thorpej Exp $ */ /*- @@ -41,8 +41,6 @@ #include -#include - #include #include diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index f4d1b97dc..afb5d0a67 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.28 2024/05/15 12:57:36 jsg Exp $ */ +/* $OpenBSD: cz.c,v 1.29 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -81,8 +81,6 @@ #include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/dwiic_pci.c b/sys/dev/pci/dwiic_pci.c index 76a39b60c..4ef8e8f37 100644 --- a/sys/dev/pci/dwiic_pci.c +++ b/sys/dev/pci/dwiic_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwiic_pci.c,v 1.26 2024/04/07 01:04:58 jsg Exp $ */ +/* $OpenBSD: dwiic_pci.c,v 1.27 2024/05/24 06:02:53 jsg Exp $ */ /* * Synopsys DesignWare I2C controller * PCI attachment @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index 517c7934d..24a0d4289 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.64 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: eap.c,v 1.65 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */ /* @@ -51,7 +51,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c index f7847f696..d9f389196 100644 --- a/sys/dev/pci/ehci_pci.c +++ b/sys/dev/pci/ehci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci_pci.c,v 1.32 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: ehci_pci.c,v 1.33 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: ehci_pci.c,v 1.15 2004/04/23 21:13:06 itojun Exp $ */ /* @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -46,7 +45,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/envy.c b/sys/dev/pci/envy.c index 987e20961..c849408da 100644 --- a/sys/dev/pci/envy.c +++ b/sys/dev/pci/envy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envy.c,v 1.87 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: envy.c,v 1.88 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov * @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 603294058..3bdf82cfb 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.42 2023/09/11 08:41:26 mvs Exp $ */ +/* $OpenBSD: esa.c,v 1.43 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -48,8 +48,6 @@ #include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index a18c426a4..f8c14f926 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eso.c,v 1.54 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: eso.c,v 1.55 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */ /* @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -46,7 +45,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c index 7c17d9e32..e8fa53bfd 100644 --- a/sys/dev/pci/fms.c +++ b/sys/dev/pci/fms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fms.c,v 1.37 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: fms.c,v 1.38 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */ /*- @@ -38,7 +38,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pci/fmsradio.c b/sys/dev/pci/fmsradio.c index 26f34732d..fd584b508 100644 --- a/sys/dev/pci/fmsradio.c +++ b/sys/dev/pci/fmsradio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmsradio.c,v 1.8 2022/03/21 19:22:41 miod Exp $ */ +/* $OpenBSD: fmsradio.c,v 1.9 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2002 Vladimir Popov @@ -39,17 +39,11 @@ #include #include #include -#include #include #include #include -#include -#include -#include - -#include #include #include diff --git a/sys/dev/pci/gdt_pci.c b/sys/dev/pci/gdt_pci.c index ac1a6b232..5c4d645c0 100644 --- a/sys/dev/pci/gdt_pci.c +++ b/sys/dev/pci/gdt_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_pci.c,v 1.27 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: gdt_pci.c,v 1.28 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -32,10 +32,7 @@ #include #include #include -#include -#include #include -#include #include diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c index d5aaeef3b..6cc788be4 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.15 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: i82365_pci.c,v 1.16 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */ /* @@ -36,7 +36,6 @@ #include #include -#include #include #include @@ -47,7 +46,6 @@ #include #include -#include #include /* diff --git a/sys/dev/pci/ichiic.c b/sys/dev/pci/ichiic.c index 8477c0024..30ffe226b 100644 --- a/sys/dev/pci/ichiic.c +++ b/sys/dev/pci/ichiic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichiic.c,v 1.54 2024/03/06 00:11:25 jsg Exp $ */ +/* $OpenBSD: ichiic.c,v 1.55 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Alexander Yurchenko @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/if_acx_pci.c b/sys/dev/pci/if_acx_pci.c index 57a5ccc24..23a5315ab 100644 --- a/sys/dev/pci/if_acx_pci.c +++ b/sys/dev/pci/if_acx_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_acx_pci.c,v 1.10 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_acx_pci.c,v 1.11 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2006 Theo de Raadt @@ -25,12 +25,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c index cc5dcda26..ce10e2ebb 100644 --- a/sys/dev/pci/if_age.c +++ b/sys/dev/pci/if_age.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_age.c,v 1.39 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_age.c,v 1.40 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon @@ -38,10 +38,8 @@ #include #include #include -#include #include #include -#include #include diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index b25740c3b..6314de788 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.57 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_alc.c,v 1.58 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon * All rights reserved. @@ -37,10 +37,8 @@ #include #include #include -#include #include #include -#include #include diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index 008573e34..ffec3722a 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.50 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_ale.c,v 1.51 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon * All rights reserved. @@ -39,10 +39,8 @@ #include #include #include -#include #include #include -#include #include diff --git a/sys/dev/pci/if_an_pci.c b/sys/dev/pci/if_an_pci.c index 6eeb32f9c..796357edd 100644 --- a/sys/dev/pci/if_an_pci.c +++ b/sys/dev/pci/if_an_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_an_pci.c,v 1.20 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_an_pci.c,v 1.21 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -57,9 +57,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/sys/dev/pci/if_aq_pci.c b/sys/dev/pci/if_aq_pci.c index 7e2acb2a1..bfa919f8c 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.27 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: if_aq_pci.c,v 1.28 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_aq.c,v 1.27 2021/06/16 00:21:18 riastradh Exp $ */ /* @@ -84,7 +84,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c index 87989697d..606669caf 100644 --- a/sys/dev/pci/if_ath_pci.c +++ b/sys/dev/pci/if_ath_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_pci.c,v 1.27 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_ath_pci.c,v 1.28 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */ /*- @@ -39,13 +39,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/sys/dev/pci/if_athn_pci.c b/sys/dev/pci/if_athn_pci.c index 445544d8c..359526085 100644 --- a/sys/dev/pci/if_athn_pci.c +++ b/sys/dev/pci/if_athn_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_pci.c,v 1.23 2022/07/24 17:22:12 kn Exp $ */ +/* $OpenBSD: if_athn_pci.c,v 1.24 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_atw_pci.c b/sys/dev/pci/if_atw_pci.c index 7eca1e037..b5a1febbb 100644 --- a/sys/dev/pci/if_atw_pci.c +++ b/sys/dev/pci/if_atw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atw_pci.c,v 1.19 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_atw_pci.c,v 1.20 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_atw_pci.c,v 1.7 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -39,14 +39,7 @@ #include #include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -60,8 +53,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index 68bc288e2..6f2ee17cb 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bce.c,v 1.55 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_bce.c,v 1.56 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */ /* @@ -42,10 +42,7 @@ #include #include #include -#include -#include #include -#include #include #include @@ -62,7 +59,6 @@ #include #include -#include #include diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 877e5c9b6..ae14ce96c 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.404 2024/04/14 03:26:25 jsg Exp $ */ +/* $OpenBSD: if_bge.c,v 1.405 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -81,10 +81,8 @@ #include #include #include -#include #include #include -#include #include #include @@ -108,7 +106,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c index 1158b5c3a..b519fa599 100644 --- a/sys/dev/pci/if_bnxt.c +++ b/sys/dev/pci/if_bnxt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnxt.c,v 1.49 2024/05/07 18:35:23 jan Exp $ */ +/* $OpenBSD: if_bnxt.c,v 1.50 2024/05/24 06:02:53 jsg Exp $ */ /*- * Broadcom NetXtreme-C/E network driver. * @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -60,7 +59,6 @@ #include -#include #include #include diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c index b50c8f75c..476f89a38 100644 --- a/sys/dev/pci/if_bwfm_pci.c +++ b/sys/dev/pci/if_bwfm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_pci.c,v 1.75 2022/12/30 14:10:17 kettenis Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.76 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt @@ -16,12 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bpfilter.h" - #include #include -#include -#include #include #include #include @@ -32,11 +28,7 @@ #include #endif -#if NBPFILTER > 0 -#include -#endif #include -#include #include #include diff --git a/sys/dev/pci/if_bwi_pci.c b/sys/dev/pci/if_bwi_pci.c index 4f2103da4..8a5fe8e61 100644 --- a/sys/dev/pci/if_bwi_pci.c +++ b/sys/dev/pci/if_bwi_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwi_pci.c,v 1.18 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_bwi_pci.c,v 1.19 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2007 Marcus Glocker @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index dc576643f..7cad44005 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.55 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_cas.c,v 1.56 2024/05/24 06:02:53 jsg Exp $ */ /* * @@ -49,13 +49,9 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c index 9ac64842b..d15f91470 100644 --- a/sys/dev/pci/if_dc_pci.c +++ b/sys/dev/pci/if_dc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_pci.c,v 1.78 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_dc_pci.c,v 1.79 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -34,17 +34,10 @@ * $FreeBSD: src/sys/pci/if_dc.c,v 1.5 2000/01/12 22:24:05 wpaul Exp $ */ -#include "bpfilter.h" - #include #include -#include -#include -#include -#include #include #include -#include #include #include @@ -54,10 +47,6 @@ #include -#if NBPFILTER > 0 -#include -#endif - #include #include diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index b178a4aee..83151d460 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.142 2023/04/11 00:45:08 jsg Exp $ */ +/* $OpenBSD: if_de.c,v 1.143 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */ /*- @@ -44,11 +44,9 @@ #include #include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index d4f8491c3..11b26e465 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,14 +31,12 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.376 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: if_em.c,v 1.377 2024/05/24 06:02:53 jsg Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include #include -#include - /********************************************************************* * Driver version *********************************************************************/ diff --git a/sys/dev/pci/if_em_hw.c b/sys/dev/pci/if_em_hw.c index 93aef8bf9..fbce5bdce 100644 --- a/sys/dev/pci/if_em_hw.c +++ b/sys/dev/pci/if_em_hw.c @@ -31,20 +31,14 @@ *******************************************************************************/ -/* $OpenBSD: if_em_hw.c,v 1.120 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: if_em_hw.c,v 1.121 2024/05/24 06:02:53 jsg Exp $ */ /* * if_em_hw.c Shared functions for accessing and configuring the MAC */ #include #include -#include -#include -#include -#include #include -#include -#include #include #include @@ -52,11 +46,6 @@ #include #include -#include - -#include -#include - #include #include #include diff --git a/sys/dev/pci/if_ep_pci.c b/sys/dev/pci/if_ep_pci.c index 77e6cf211..91511f11d 100644 --- a/sys/dev/pci/if_ep_pci.c +++ b/sys/dev/pci/if_ep_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ep_pci.c,v 1.37 2023/09/11 08:41:26 mvs Exp $ */ +/* $OpenBSD: if_ep_pci.c,v 1.38 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */ /* @@ -31,16 +31,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "bpfilter.h" - #include #include -#include -#include -#include -#include #include -#include #include #include @@ -49,11 +42,6 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - -#include #include #include diff --git a/sys/dev/pci/if_epic_pci.c b/sys/dev/pci/if_epic_pci.c index 048ef1206..7e26ef796 100644 --- a/sys/dev/pci/if_epic_pci.c +++ b/sys/dev/pci/if_epic_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_epic_pci.c,v 1.17 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_epic_pci.c,v 1.18 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_epic_pci.c,v 1.28 2005/02/27 00:27:32 perry Exp $ */ /*- @@ -38,12 +38,6 @@ #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c index e7fb870c9..0e8e10d7e 100644 --- a/sys/dev/pci/if_et.c +++ b/sys/dev/pci/if_et.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_et.c,v 1.43 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_et.c,v 1.44 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. * @@ -38,15 +38,12 @@ #include "bpfilter.h" #include -#include #include #include #include #include -#include #include #include -#include #include @@ -63,7 +60,6 @@ #include -#include #include #include diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c index 7f98556ea..6736e6dd1 100644 --- a/sys/dev/pci/if_fxp_pci.c +++ b/sys/dev/pci/if_fxp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fxp_pci.c,v 1.67 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_fxp_pci.c,v 1.68 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 1995, David Greenman @@ -36,29 +36,19 @@ * Intel EtherExpress Pro/100B PCI Fast Ethernet driver */ -#include "bpfilter.h" - #include #include -#include -#include -#include -#include #include -#include #include #include #include -#include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c index 9dda743ef..f8ebc96c7 100644 --- a/sys/dev/pci/if_gem_pci.c +++ b/sys/dev/pci/if_gem_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gem_pci.c,v 1.40 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_gem_pci.c,v 1.41 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_gem_pci.c,v 1.1 2001/09/16 00:11:42 eeh Exp $ */ /* @@ -36,12 +36,7 @@ #include #include -#include -#include -#include -#include #include -#include #include #include @@ -57,7 +52,6 @@ #endif #include -#include #include #include diff --git a/sys/dev/pci/if_hme_pci.c b/sys/dev/pci/if_hme_pci.c index b3c5b2496..c5519a88a 100644 --- a/sys/dev/pci/if_hme_pci.c +++ b/sys/dev/pci/if_hme_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hme_pci.c,v 1.24 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_hme_pci.c,v 1.25 2024/05/24 06:02:53 jsg Exp $ */ /* $NetBSD: if_hme_pci.c,v 1.3 2000/12/28 22:59:13 sommerfeld Exp $ */ /* @@ -33,10 +33,7 @@ #include #include -#include #include -#include -#include #include #include @@ -50,7 +47,6 @@ #include #include #endif -#include #include #include diff --git a/sys/dev/pci/if_iavf.c b/sys/dev/pci/if_iavf.c index 34dc6a45c..97d832123 100644 --- a/sys/dev/pci/if_iavf.c +++ b/sys/dev/pci/if_iavf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iavf.c,v 1.12 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_iavf.c,v 1.13 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -68,7 +67,6 @@ #include #include -#include #include #if NBPFILTER > 0 diff --git a/sys/dev/pci/if_igc.c b/sys/dev/pci/if_igc.c index b80326db8..490fc2c3f 100644 --- a/sys/dev/pci/if_igc.c +++ b/sys/dev/pci/if_igc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_igc.c,v 1.24 2024/05/21 11:19:39 bluhm Exp $ */ +/* $OpenBSD: if_igc.c,v 1.25 2024/05/24 06:02:53 jsg Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause * @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 5efd1a29c..3d6c0a653 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.148 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.149 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2004-2008 @@ -26,11 +26,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index e4bb7033d..bc5b0a531 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.415 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.416 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -109,12 +109,8 @@ #include "bpfilter.h" #include -#include -#include #include #include -#include -#include #include #include #include @@ -134,7 +130,6 @@ #include #endif #include -#include #include #include diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index 6c783e349..85a0d4868 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.262 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.263 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini @@ -26,12 +26,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index dbe9390de..b69262077 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.185 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.186 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -96,12 +96,8 @@ #include "bpfilter.h" #include -#include -#include #include #include -#include -#include #include #include #include @@ -121,7 +117,6 @@ #include #endif #include -#include #include #include diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c index 4859932b3..66fd7c540 100644 --- a/sys/dev/pci/if_ixl.c +++ b/sys/dev/pci/if_ixl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ixl.c,v 1.100 2024/05/08 17:52:11 jan Exp $ */ +/* $OpenBSD: if_ixl.c,v 1.101 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -69,7 +68,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c index d1110b17f..d8e3fa7f5 100644 --- a/sys/dev/pci/if_jme.c +++ b/sys/dev/pci/if_jme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_jme.c,v 1.57 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_jme.c,v 1.58 2024/05/24 06:02:53 jsg Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon * All rights reserved. @@ -38,10 +38,8 @@ #include #include #include -#include #include #include -#include #include diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index 4a08513df..543cf3049 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.80 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_lge.c,v 1.81 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -80,10 +80,7 @@ #include #include #include -#include -#include #include -#include #include #include @@ -102,7 +99,6 @@ #include #include -#include #include #define LGE_USEIOSPACE diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 2e4bb600e..96c980fb0 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.46 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_lii.c,v 1.47 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -36,9 +36,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_malo_pci.c b/sys/dev/pci/if_malo_pci.c index a8cf01242..47119fb61 100644 --- a/sys/dev/pci/if_malo_pci.c +++ b/sys/dev/pci/if_malo_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo_pci.c,v 1.11 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_malo_pci.c,v 1.12 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2006 Marcus Glocker @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index 9528f48f5..af957fbc5 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.114 2024/04/12 01:54:21 jsg Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.115 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 2017 David Gwynne @@ -25,11 +25,8 @@ #include #include #include -#include #include #include -#include -#include #include #include #include @@ -40,7 +37,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index 4b2fc562a..eb6b4b86e 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_msk.c,v 1.143 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_msk.c,v 1.144 2024/05/24 06:02:53 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -94,8 +94,6 @@ #include #include #include -#include -#include #include #include #include @@ -115,7 +113,6 @@ #include #endif -#include #include #include diff --git a/sys/dev/pci/if_mtd_pci.c b/sys/dev/pci/if_mtd_pci.c index 2a2242e52..cd9eb66b5 100644 --- a/sys/dev/pci/if_mtd_pci.c +++ b/sys/dev/pci/if_mtd_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mtd_pci.c,v 1.13 2022/08/29 06:08:04 jsg Exp $ */ +/* $OpenBSD: if_mtd_pci.c,v 1.14 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index 327209f5b..68e6936ec 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.119 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_myx.c,v 1.120 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2007 Reyk Floeter @@ -27,14 +27,11 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/if_ne_pci.c b/sys/dev/pci/if_ne_pci.c index 5ed6bc7b2..8f8f801fa 100644 --- a/sys/dev/pci/if_ne_pci.c +++ b/sys/dev/pci/if_ne_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ne_pci.c,v 1.21 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_ne_pci.c,v 1.22 2024/05/24 06:02:56 jsg Exp $ */ /* $NetBSD: if_ne_pci.c,v 1.8 1998/07/05 00:51:24 jonathan Exp $ */ /*- @@ -31,13 +31,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "bpfilter.h" - #include #include -#include -#include -#include #include #include diff --git a/sys/dev/pci/if_nep.c b/sys/dev/pci/if_nep.c index 8b4dd6a64..66e34cd96 100644 --- a/sys/dev/pci/if_nep.c +++ b/sys/dev/pci/if_nep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nep.c,v 1.34 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_nep.c,v 1.35 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2014, 2015 Mark Kettenis * @@ -36,7 +36,6 @@ #include #endif -#include #include #include diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index ffe34c5e2..56d5b06b9 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.125 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.126 2024/05/24 06:02:56 jsg Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini @@ -28,10 +28,8 @@ #include #include #include -#include #include #include -#include #include diff --git a/sys/dev/pci/if_ngbe.c b/sys/dev/pci/if_ngbe.c index 46f8a12be..bd8dbba31 100644 --- a/sys/dev/pci/if_ngbe.c +++ b/sys/dev/pci/if_ngbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ngbe.c,v 1.4 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: if_ngbe.c,v 1.5 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2015-2017 Beijing WangXun Technology Co., Ltd. @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index f64db41d1..7bf52a2a0 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.98 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_nge.c,v 1.99 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -95,10 +95,7 @@ #include #include #include -#include -#include #include -#include #include #include @@ -117,7 +114,6 @@ #include #include -#include #include #define NGE_USEIOSPACE diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c index 30dc8fd80..8e39c2969 100644 --- a/sys/dev/pci/if_nxe.c +++ b/sys/dev/pci/if_nxe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nxe.c,v 1.80 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_nxe.c,v 1.81 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -22,11 +22,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -39,7 +37,6 @@ #include #include -#include #include #if NBPFILTER > 0 diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c index 1e2710c4a..04d9bda85 100644 --- a/sys/dev/pci/if_oce.c +++ b/sys/dev/pci/if_oce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_oce.c,v 1.108 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_oce.c,v 1.109 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2012 Mike Belopuhov @@ -62,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -75,10 +74,6 @@ #include #include -#ifdef INET6 -#include -#endif - #if NBPFILTER > 0 #include #endif diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index cbf9e53e4..087ba3038 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.49 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.50 2024/05/24 06:02:56 jsg Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -71,9 +71,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/sys/dev/pci/if_pgt_pci.c b/sys/dev/pci/if_pgt_pci.c index dba3bdb7e..c17cb5b14 100644 --- a/sys/dev/pci/if_pgt_pci.c +++ b/sys/dev/pci/if_pgt_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pgt_pci.c,v 1.19 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_pgt_pci.c,v 1.20 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2006 Marcus Glocker @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_qwx_pci.c b/sys/dev/pci/if_qwx_pci.c index 10512125c..61cbc7dd5 100644 --- a/sys/dev/pci/if_qwx_pci.c +++ b/sys/dev/pci/if_qwx_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_qwx_pci.c,v 1.15 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: if_qwx_pci.c,v 1.16 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -53,14 +53,11 @@ #include "bpfilter.h" #include -#include #include -#include #include #include #include #include -#include #include #include diff --git a/sys/dev/pci/if_ral_pci.c b/sys/dev/pci/if_ral_pci.c index 8f049f051..8c752cb8b 100644 --- a/sys/dev/pci/if_ral_pci.c +++ b/sys/dev/pci/if_ral_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral_pci.c,v 1.28 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_ral_pci.c,v 1.29 2024/05/24 06:02:56 jsg Exp $ */ /*- * Copyright (c) 2005-2010 Damien Bergamini @@ -23,12 +23,7 @@ #include "bpfilter.h" #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index aaf30479b..3f9d61d20 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.57 2024/01/19 03:46:15 dlg Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.58 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2005 Peter Valchev @@ -21,15 +21,9 @@ */ #include -#include #include -#include -#include -#include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/if_rge.c b/sys/dev/pci/if_rge.c index 6a487c50f..84ed79b3e 100644 --- a/sys/dev/pci/if_rge.c +++ b/sys/dev/pci/if_rge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rge.c,v 1.25 2024/05/20 01:51:32 kevlo Exp $ */ +/* $OpenBSD: if_rge.c,v 1.26 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 2019, 2020, 2023 Kevin Lo @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/if_rl_pci.c b/sys/dev/pci/if_rl_pci.c index d09daf7c4..97d573932 100644 --- a/sys/dev/pci/if_rl_pci.c +++ b/sys/dev/pci/if_rl_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rl_pci.c,v 1.34 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_rl_pci.c,v 1.35 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -32,15 +32,8 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include "bpfilter.h" - #include #include -#include -#include -#include -#include -#include #include #include @@ -51,10 +44,6 @@ #include -#if NBPFILTER > 0 -#include -#endif - #include #include diff --git a/sys/dev/pci/if_rtw_pci.c b/sys/dev/pci/if_rtw_pci.c index c0f0788a2..d610278e7 100644 --- a/sys/dev/pci/if_rtw_pci.c +++ b/sys/dev/pci/if_rtw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtw_pci.c,v 1.21 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_rtw_pci.c,v 1.22 2024/05/24 06:02:56 jsg Exp $ */ /* $NetBSD: if_rtw_pci.c,v 1.1 2004/09/26 02:33:36 dyoung Exp $ */ /*- @@ -41,14 +41,7 @@ #include #include -#include -#include -#include -#include -#include -#include #include -#include #include #include @@ -62,7 +55,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c index ee548f934..2cbad8984 100644 --- a/sys/dev/pci/if_rtwn.c +++ b/sys/dev/pci/if_rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtwn.c,v 1.41 2023/07/14 14:28:47 kevlo Exp $ */ +/* $OpenBSD: if_rtwn.c,v 1.42 2024/05/24 06:02:56 jsg Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -25,14 +25,10 @@ #include "bpfilter.h" #include -#include #include -#include #include #include -#include #include -#include #include #include @@ -43,7 +39,6 @@ #include #endif #include -#include #include #include diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c index 7ad0bcc23..29b014890 100644 --- a/sys/dev/pci/if_se.c +++ b/sys/dev/pci/if_se.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_se.c,v 1.24 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_se.c,v 1.25 2024/05/24 06:02:56 jsg Exp $ */ /*- * Copyright (c) 2009, 2010 Christopher Zimmermann @@ -57,10 +57,7 @@ #include #include #include -#include #include -#include -#include #include #include diff --git a/sys/dev/pci/if_sf_pci.c b/sys/dev/pci/if_sf_pci.c index cf58df256..2f79d2b37 100644 --- a/sys/dev/pci/if_sf_pci.c +++ b/sys/dev/pci/if_sf_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sf_pci.c,v 1.15 2022/03/11 18:00:48 mpi Exp $ */ +/* $OpenBSD: if_sf_pci.c,v 1.16 2024/05/24 06:02:56 jsg Exp $ */ /* $NetBSD: if_sf_pci.c,v 1.10 2006/06/17 23:34:27 christos Exp $ */ /*- @@ -37,12 +37,6 @@ #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 892968f8a..7a0ca58df 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.144 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: if_sis.c,v 1.145 2024/05/24 06:02:56 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -63,11 +63,8 @@ #include #include #include -#include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 7f6712513..54c5a3e35 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.195 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: if_sk.c,v 1.196 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -93,8 +93,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index d33051cb3..5cfc4ef52 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.70 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_ste.c,v 1.71 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -60,7 +59,6 @@ #include -#include #include #include diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 399d4576a..0dae63764 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.73 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_stge.c,v 1.74 2024/05/24 06:02:57 jsg Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -42,9 +42,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index f912dea97..9ed198ae0 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.147 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_tht.c,v 1.148 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -30,11 +30,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_ti_pci.c b/sys/dev/pci/if_ti_pci.c index 05f6aa9b7..13ba401a1 100644 --- a/sys/dev/pci/if_ti_pci.c +++ b/sys/dev/pci/if_ti_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ti_pci.c,v 1.7 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: if_ti_pci.c,v 1.8 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -73,7 +73,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 97022930c..bdef9ceb1 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.78 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_tl.c,v 1.79 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -186,9 +186,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 2c5d987fd..79f75642b 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.130 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_txp.c,v 1.131 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 2001 @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index f4d5cf204..e74836778 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.77 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_vge.c,v 1.78 2024/05/24 06:02:57 jsg Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -89,11 +89,8 @@ #include #include #include -#include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index 3a6ac2687..fc92ecf6e 100644 --- a/sys/dev/pci/if_vic.c +++ b/sys/dev/pci/if_vic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vic.c,v 1.105 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_vic.c,v 1.106 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 2006 Reyk Floeter @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index bf93bb171..6cef3b7a9 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.160 2023/12/05 13:43:39 kevlo Exp $ */ +/* $OpenBSD: if_vr.c,v 1.161 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -68,9 +68,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c index 1e9511407..fe9aefafa 100644 --- a/sys/dev/pci/if_vte.c +++ b/sys/dev/pci/if_vte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vte.c,v 1.27 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_vte.c,v 1.28 2024/05/24 06:02:57 jsg Exp $ */ /*- * Copyright (c) 2010, Pyun YongHyeon * All rights reserved. @@ -36,10 +36,8 @@ #include #include #include -#include #include #include -#include #include @@ -54,10 +52,8 @@ #include #endif -#include #include -#include #include #include diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index e4752b8df..f02311d84 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.76 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: if_wb.c,v 1.77 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -91,9 +91,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -112,7 +109,6 @@ #include /* for vtophys */ #define VTOPHYS(v) vtophys((vaddr_t)(v)) -#include #include #include #include diff --git a/sys/dev/pci/if_wi_pci.c b/sys/dev/pci/if_wi_pci.c index 3c12c9cf6..60afe470f 100644 --- a/sys/dev/pci/if_wi_pci.c +++ b/sys/dev/pci/if_wi_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_pci.c,v 1.56 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: if_wi_pci.c,v 1.57 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 2001-2003 Todd C. Miller @@ -44,8 +44,6 @@ #include #include #include -#include -#include #include #include diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index 01d6ec618..03238dc3a 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.157 2022/04/21 21:03:03 stsp Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.158 2024/05/24 06:02:57 jsg Exp $ */ /*- * Copyright (c) 2006-2008 @@ -26,12 +26,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index faaa61e4a..e2286513a 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xge.c,v 1.83 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_xge.c,v 1.84 2024/05/24 06:02:57 jsg Exp $ */ /* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */ /* @@ -46,9 +46,6 @@ #include #include #include -#include -#include -#include #include #include @@ -69,8 +66,6 @@ #include #include -#include - #include /* Xframe chipset revisions */ diff --git a/sys/dev/pci/if_xl_pci.c b/sys/dev/pci/if_xl_pci.c index a5f765dd3..3ba697be0 100644 --- a/sys/dev/pci/if_xl_pci.c +++ b/sys/dev/pci/if_xl_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xl_pci.c,v 1.48 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: if_xl_pci.c,v 1.49 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -34,16 +34,8 @@ * $FreeBSD: if_xl.c,v 1.72 2000/01/09 21:12:59 wpaul Exp $ */ -#include "bpfilter.h" - #include #include -#include -#include -#include -#include -#include -#include #include #include @@ -57,10 +49,6 @@ #include #include -#if NBPFILTER > 0 -#include -#endif - /* * The following #define causes the code to use PIO to access the * chip's registers instead of memory mapped mode. The reason PIO mode diff --git a/sys/dev/pci/igc_base.c b/sys/dev/pci/igc_base.c index fc441e942..10286b87e 100644 --- a/sys/dev/pci/igc_base.c +++ b/sys/dev/pci/igc_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: igc_base.c,v 1.1 2021/10/31 14:52:57 patrick Exp $ */ +/* $OpenBSD: igc_base.c,v 1.2 2024/05/24 06:02:57 jsg Exp $ */ /*- * Copyright 2021 Intel Corp * Copyright 2021 Rubicon Communications, LLC (Netgate) @@ -6,7 +6,6 @@ */ #include -#include #include #include #include diff --git a/sys/dev/pci/iosf_pci.c b/sys/dev/pci/iosf_pci.c index 886a39c60..bb6feb19c 100644 --- a/sys/dev/pci/iosf_pci.c +++ b/sys/dev/pci/iosf_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iosf_pci.c,v 1.1 2023/04/23 00:20:26 dlg Exp $ */ +/* $OpenBSD: iosf_pci.c,v 1.2 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 2023 David Gwynne @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index afbd0e184..e255d3d86 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.135 2022/04/16 19:19:59 naddy Exp $ */ +/* $OpenBSD: ips.c,v 1.136 2024/05/24 06:02:57 jsg Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/ixgb_ee.c b/sys/dev/pci/ixgb_ee.c index 0b7f17bbe..4e085c4c8 100644 --- a/sys/dev/pci/ixgb_ee.c +++ b/sys/dev/pci/ixgb_ee.c @@ -31,16 +31,11 @@ *******************************************************************************/ -/* $OpenBSD: ixgb_ee.c,v 1.8 2022/01/09 05:42:56 jsg Exp $ */ +/* $OpenBSD: ixgb_ee.c,v 1.9 2024/05/24 06:02:57 jsg Exp $ */ #include #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/ixgb_hw.c b/sys/dev/pci/ixgb_hw.c index 325b71ab5..f63151d5f 100644 --- a/sys/dev/pci/ixgb_hw.c +++ b/sys/dev/pci/ixgb_hw.c @@ -31,7 +31,7 @@ *******************************************************************************/ -/* $OpenBSD: ixgb_hw.c,v 1.10 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: ixgb_hw.c,v 1.11 2024/05/24 06:02:58 jsg Exp $ */ /* ixgb_hw.c * Shared functions for accessing and configuring the adapter @@ -39,12 +39,7 @@ #include #include -#include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/jmb.c b/sys/dev/pci/jmb.c index b75f9250c..bce06974d 100644 --- a/sys/dev/pci/jmb.c +++ b/sys/dev/pci/jmb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jmb.c,v 1.10 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: jmb.c,v 1.11 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -18,11 +18,7 @@ #include #include -#include -#include -#include #include -#include #include #include diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c index d2a4362e8..42178252c 100644 --- a/sys/dev/pci/maestro.c +++ b/sys/dev/pci/maestro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maestro.c,v 1.51 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: maestro.c,v 1.52 2024/05/24 06:02:58 jsg Exp $ */ /* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */ /* * FreeBSD's ESS Agogo/Maestro driver @@ -48,7 +48,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pci/mbg.c b/sys/dev/pci/mbg.c index e5cc28022..a09a77deb 100644 --- a/sys/dev/pci/mbg.c +++ b/sys/dev/pci/mbg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mbg.c,v 1.36 2024/03/23 10:38:02 sthen Exp $ */ +/* $OpenBSD: mbg.c,v 1.37 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2006, 2007 Marc Balmer @@ -18,11 +18,9 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pci/mfi_pci.c b/sys/dev/pci/mfi_pci.c index 18ea6f5e7..b5e2f2813 100644 --- a/sys/dev/pci/mfi_pci.c +++ b/sys/dev/pci/mfi_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi_pci.c,v 1.31 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: mfi_pci.c,v 1.32 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * @@ -15,12 +15,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bio.h" - #include #include -#include -#include #include #include #include diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index a12c33f67..cd527f172 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.90 2024/02/05 19:08:29 deraadt Exp $ */ +/* $OpenBSD: mfii.c,v 1.91 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/mmuagp.c b/sys/dev/pci/mmuagp.c index 26db84568..88c21d495 100644 --- a/sys/dev/pci/mmuagp.c +++ b/sys/dev/pci/mmuagp.c @@ -26,9 +26,7 @@ #include #include -#include #include -#include #include #include diff --git a/sys/dev/pci/mpi_pci.c b/sys/dev/pci/mpi_pci.c index b44a46e75..7161823a5 100644 --- a/sys/dev/pci/mpi_pci.c +++ b/sys/dev/pci/mpi_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi_pci.c,v 1.26 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: mpi_pci.c,v 1.27 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -17,12 +17,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bio.h" - #include #include -#include -#include #include #include #include diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 36a74fc5f..8b9d8418a 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.147 2023/11/29 06:54:09 jmatthew Exp $ */ +/* $OpenBSD: mpii.c,v 1.148 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov * Copyright (c) 2009 James Giannoules @@ -23,13 +23,9 @@ #include #include #include -#include #include -#include -#include #include #include -#include #include #include diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c index fe77bc96d..e249d22b9 100644 --- a/sys/dev/pci/neo.c +++ b/sys/dev/pci/neo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: neo.c,v 1.41 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: neo.c,v 1.42 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 1999 Cameron Grant @@ -34,8 +34,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/nvme_pci.c b/sys/dev/pci/nvme_pci.c index 3dfdf955a..5e0ba65cb 100644 --- a/sys/dev/pci/nvme_pci.c +++ b/sys/dev/pci/nvme_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme_pci.c,v 1.10 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: nvme_pci.c,v 1.11 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -18,14 +18,9 @@ #include #include -#include -#include -#include #include -#include #include #include -#include #include diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c index 4ae71cb89..5310b1eed 100644 --- a/sys/dev/pci/ohci_pci.c +++ b/sys/dev/pci/ohci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_pci.c,v 1.42 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: ohci_pci.c,v 1.43 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */ /* @@ -40,7 +40,6 @@ #include #include -#include #include #include #include @@ -52,7 +51,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 8d20757e6..926a8e948 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.104 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: pccbb.c,v 1.105 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */ /* @@ -40,10 +40,7 @@ #include #include -#include #include -#include -#include #include #include #include diff --git a/sys/dev/pci/pcscp.c b/sys/dev/pci/pcscp.c index 368a14f13..5bd7e68e1 100644 --- a/sys/dev/pci/pcscp.c +++ b/sys/dev/pci/pcscp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcscp.c,v 1.21 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: pcscp.c,v 1.22 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: pcscp.c,v 1.26 2003/10/19 10:25:42 tsutsui Exp $ */ /*- @@ -42,7 +42,6 @@ #include #include #include -#include #include diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index c503d3c67..04b3e751b 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: piixpm.c,v 1.43 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: piixpm.c,v 1.44 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Alexander Yurchenko @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/pucvar.h b/sys/dev/pci/pucvar.h index 0756dd276..66f66b1a1 100644 --- a/sys/dev/pci/pucvar.h +++ b/sys/dev/pci/pucvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pucvar.h,v 1.17 2020/08/14 18:14:11 jcs Exp $ */ +/* $OpenBSD: pucvar.h,v 1.18 2024/05/24 04:36:26 jsg Exp $ */ /* $NetBSD: pucvar.h,v 1.2 1999/02/06 06:29:54 cgd Exp $ */ /* @@ -107,6 +107,7 @@ struct puc_softc { /* card-global dynamic data */ struct { int mapped; + u_long type; bus_addr_t a; bus_size_t s; bus_space_tag_t t; diff --git a/sys/dev/pci/pwdog.c b/sys/dev/pci/pwdog.c index 12e30bbf3..3116f0847 100644 --- a/sys/dev/pci/pwdog.c +++ b/sys/dev/pci/pwdog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwdog.c,v 1.12 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: pwdog.c,v 1.13 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2006 Marc Balmer @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/qla_pci.c b/sys/dev/pci/qla_pci.c index 56491c330..722fae61c 100644 --- a/sys/dev/pci/qla_pci.c +++ b/sys/dev/pci/qla_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qla_pci.c,v 1.9 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: qla_pci.c,v 1.10 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2011 David Gwynne @@ -17,15 +17,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bio.h" - #include #include -#include -#include #include -#include -#include #include diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c index ced20f894..152154ce2 100644 --- a/sys/dev/pci/qle.c +++ b/sys/dev/pci/qle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qle.c,v 1.64 2024/04/14 00:38:26 jsg Exp $ */ +/* $OpenBSD: qle.c,v 1.65 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2013, 2014 Jonathan Matthew @@ -16,15 +16,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bio.h" - #include #include #include #include #include -#include -#include #include #include @@ -34,10 +30,6 @@ #include #include -#ifdef __sparc64__ -#include -#endif - #include #include diff --git a/sys/dev/pci/qlw_pci.c b/sys/dev/pci/qlw_pci.c index e1e4c5564..9ed90d834 100644 --- a/sys/dev/pci/qlw_pci.c +++ b/sys/dev/pci/qlw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw_pci.c,v 1.12 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: qlw_pci.c,v 1.13 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2011 David Gwynne @@ -18,15 +18,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bio.h" - #include #include -#include -#include #include -#include -#include #include diff --git a/sys/dev/pci/sili_pci.c b/sys/dev/pci/sili_pci.c index ac4eb61b8..a33c54874 100644 --- a/sys/dev/pci/sili_pci.c +++ b/sys/dev/pci/sili_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sili_pci.c,v 1.15 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: sili_pci.c,v 1.16 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/siop_pci.c b/sys/dev/pci/siop_pci.c index e3bae243b..31f0f833d 100644 --- a/sys/dev/pci/siop_pci.c +++ b/sys/dev/pci/siop_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop_pci.c,v 1.8 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: siop_pci.c,v 1.9 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: siop_pci.c,v 1.18 2005/06/28 00:28:42 thorpej Exp $ */ /* @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c index bd5c8a621..70092ddbb 100644 --- a/sys/dev/pci/siop_pci_common.c +++ b/sys/dev/pci/siop_pci_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop_pci_common.c,v 1.19 2014/12/19 22:44:58 guenther Exp $ */ +/* $OpenBSD: siop_pci_common.c,v 1.20 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: siop_pci_common.c,v 1.25 2005/06/28 00:28:42 thorpej Exp $ */ /* @@ -30,10 +30,6 @@ #include #include #include -#include -#include -#include -#include #include #include diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index fed0007e8..574aab18f 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sv.c,v 1.43 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: sv.c,v 1.44 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 1998 Constantine Paul Sapuntzakis @@ -38,7 +38,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/twe_pci.c b/sys/dev/pci/twe_pci.c index 01f3f0219..f15b295df 100644 --- a/sys/dev/pci/twe_pci.c +++ b/sys/dev/pci/twe_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe_pci.c,v 1.15 2022/03/11 18:00:52 mpi Exp $ */ +/* $OpenBSD: twe_pci.c,v 1.16 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2000 Michael Shalayeff @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include diff --git a/sys/dev/pci/ufshci_pci.c b/sys/dev/pci/ufshci_pci.c index c94cf14ab..f265d2064 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.3 2024/05/13 01:15:51 jsg Exp $ */ +/* $OpenBSD: ufshci_pci.c,v 1.4 2024/05/24 09:51:13 mglocker Exp $ */ /* * Copyright (c) 2024 Marcus Glocker @@ -41,12 +41,14 @@ 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), ufshci_pci_match, ufshci_pci_attach, - ufshci_pci_detach + ufshci_pci_detach, + ufshci_pci_activate }; int @@ -106,3 +108,11 @@ ufshci_pci_detach(struct device *self, int flags) { return 0; } + +int +ufshci_pci_activate(struct device *self, int act) +{ + struct ufshci_pci_softc *psc = (struct ufshci_pci_softc *)self; + + return ufshci_activate(&psc->psc_ufshci, act); +} diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c index 2a245ccf1..40bfbd23d 100644 --- a/sys/dev/pci/uhci_pci.c +++ b/sys/dev/pci/uhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci_pci.c,v 1.35 2022/03/11 18:00:52 mpi Exp $ */ +/* $OpenBSD: uhci_pci.c,v 1.36 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: uhci_pci.c,v 1.24 2002/10/02 16:51:58 thorpej Exp $ */ /* @@ -33,7 +33,6 @@ #include #include -#include #include #include #include @@ -45,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index d5b7c8cab..59f88aa8b 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.90 2022/03/11 18:00:52 mpi Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.91 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -69,10 +69,7 @@ #include #include -#include #include -#include -#include #include diff --git a/sys/dev/pci/vga_pci_common.c b/sys/dev/pci/vga_pci_common.c index 094846a90..ef3f04338 100644 --- a/sys/dev/pci/vga_pci_common.c +++ b/sys/dev/pci/vga_pci_common.c @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/sys/dev/pci/viapm.c b/sys/dev/pci/viapm.c index 2fc8f92cf..e93b05399 100644 --- a/sys/dev/pci/viapm.c +++ b/sys/dev/pci/viapm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viapm.c,v 1.22 2023/02/04 19:19:37 cheloha Exp $ */ +/* $OpenBSD: viapm.c,v 1.23 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c index 7a6efd294..5b37a807e 100644 --- a/sys/dev/pci/vmwpvs.c +++ b/sys/dev/pci/vmwpvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmwpvs.c,v 1.27 2022/04/16 19:19:59 naddy Exp $ */ +/* $OpenBSD: vmwpvs.c,v 1.28 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2013 David Gwynne @@ -19,11 +19,7 @@ #include #include #include -#include #include -#include -#include -#include #include #include diff --git a/sys/dev/pci/wdt.c b/sys/dev/pci/wdt.c index c785979fc..af2e61771 100644 --- a/sys/dev/pci/wdt.c +++ b/sys/dev/pci/wdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdt.c,v 1.26 2022/03/11 18:00:52 mpi Exp $ */ +/* $OpenBSD: wdt.c,v 1.27 2024/05/24 06:02:58 jsg Exp $ */ /*- * Copyright (c) 1998,1999 Alex Nash @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pci/xhci_pci.c b/sys/dev/pci/xhci_pci.c index ca1a0b343..5409588f3 100644 --- a/sys/dev/pci/xhci_pci.c +++ b/sys/dev/pci/xhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci_pci.c,v 1.12 2023/04/18 21:22:00 patrick Exp $ */ +/* $OpenBSD: xhci_pci.c,v 1.13 2024/05/24 06:02:58 jsg Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -31,11 +31,8 @@ #include #include -#include #include #include -#include -#include #include @@ -45,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index 063a0f56b..016097a41 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.63 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: yds.c,v 1.64 2024/05/24 06:02:58 jsg Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -41,11 +41,8 @@ #include #include -#include -#include #include #include -#include #include #include @@ -53,7 +50,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c index 812d11957..27586402d 100644 --- a/sys/dev/pv/hvs.c +++ b/sys/dev/pv/hvs.c @@ -37,8 +37,6 @@ #include #include #include -#include -#include #include #include @@ -50,8 +48,6 @@ #include #include -#include -#include #include #define HVS_PROTO_VERSION_WIN6 0x200 diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c index 08156baf5..60af18f7e 100644 --- a/sys/dev/pv/hyperv.c +++ b/sys/dev/pv/hyperv.c @@ -45,15 +45,10 @@ #endif #include -#include -#include -#include #include -#include #include #include #include -#include #include #include @@ -64,7 +59,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pv/hypervic.c b/sys/dev/pv/hypervic.c index b3ce2d91b..d78e0f861 100644 --- a/sys/dev/pv/hypervic.c +++ b/sys/dev/pv/hypervic.c @@ -45,24 +45,14 @@ #endif #include -#include -#include -#include #include #include #include #include -#include #include -#include -#include #include #include -#include -#include - -#include #include #include @@ -70,7 +60,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c index 5254093c5..1ed4bba05 100644 --- a/sys/dev/pv/if_hvn.c +++ b/sys/dev/pv/if_hvn.c @@ -33,21 +33,16 @@ #include "bpfilter.h" #include "vlan.h" -#include "hyperv.h" #include #include #include #include -#include #include #include -#include #include -#include #include #include -#include #include @@ -66,10 +61,6 @@ #include #include -#ifdef INET6 -#include -#endif - #if NBPFILTER > 0 #include #endif diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c index 7d0e4ec30..3d0a4f521 100644 --- a/sys/dev/pv/if_vio.c +++ b/sys/dev/pv/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.34 2024/05/17 16:37:10 sf Exp $ */ +/* $OpenBSD: if_vio.c,v 1.35 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -31,10 +31,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c index b8aa9bb21..3c423aee2 100644 --- a/sys/dev/pv/if_xnf.c +++ b/sys/dev/pv/if_xnf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xnf.c,v 1.69 2023/11/10 15:51:24 bluhm Exp $ */ +/* $OpenBSD: if_xnf.c,v 1.70 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2015, 2016 Mike Belopuhov @@ -17,22 +17,15 @@ */ #include "bpfilter.h" -#include "vlan.h" -#include "xen.h" #include #include #include #include -#include -#include #include -#include #include -#include #include #include -#include #include @@ -45,10 +38,6 @@ #include #include -#ifdef INET6 -#include -#endif - #if NBPFILTER > 0 #include #endif diff --git a/sys/dev/pv/pvbus.c b/sys/dev/pv/pvbus.c index 2f4cdd318..389109738 100644 --- a/sys/dev/pv/pvbus.c +++ b/sys/dev/pv/pvbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvbus.c,v 1.27 2023/01/07 06:40:21 asou Exp $ */ +/* $OpenBSD: pvbus.c,v 1.28 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -22,13 +22,10 @@ #include #include -#include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pv/pvclock.c b/sys/dev/pv/pvclock.c index 815d8afb7..994fc4a33 100644 --- a/sys/dev/pv/pvclock.c +++ b/sys/dev/pv/pvclock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvclock.c,v 1.10 2024/05/14 08:26:13 jsg Exp $ */ +/* $OpenBSD: pvclock.c,v 1.11 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2018 Reyk Floeter @@ -22,11 +22,7 @@ #include #include -#include #include -#include -#include -#include #include #include diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c index 05ecc7565..5b657fab3 100644 --- a/sys/dev/pv/vioblk.c +++ b/sys/dev/pv/vioblk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioblk.c,v 1.37 2023/07/28 16:54:48 dv Exp $ */ +/* $OpenBSD: vioblk.c,v 1.38 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch. @@ -48,12 +48,9 @@ #include #include -#include #include #include -#include -#include #include #include #include diff --git a/sys/dev/pv/viocon.c b/sys/dev/pv/viocon.c index 313d3acf7..112e317fe 100644 --- a/sys/dev/pv/viocon.c +++ b/sys/dev/pv/viocon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viocon.c,v 1.10 2023/07/28 16:54:48 dv Exp $ */ +/* $OpenBSD: viocon.c,v 1.11 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2013-2015 Stefan Fritsch @@ -18,13 +18,11 @@ #include #include -#include -#include +#include #include #include #include #include -#include #include #include diff --git a/sys/dev/pv/viogpu.c b/sys/dev/pv/viogpu.c index 2d8d3074a..81844e393 100644 --- a/sys/dev/pv/viogpu.c +++ b/sys/dev/pv/viogpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viogpu.c,v 1.5 2024/05/14 08:26:13 jsg Exp $ */ +/* $OpenBSD: viogpu.c,v 1.6 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2021-2023 joshua stein @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/sys/dev/pv/viomb.c b/sys/dev/pv/viomb.c index a14d085c3..a8906ecaa 100644 --- a/sys/dev/pv/viomb.c +++ b/sys/dev/pv/viomb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viomb.c,v 1.9 2023/05/29 08:13:35 sf Exp $ */ +/* $OpenBSD: viomb.c,v 1.10 2024/05/24 10:05:55 jsg Exp $ */ /* $NetBSD: viomb.c,v 1.1 2011/10/30 12:12:21 hannken Exp $ */ /* @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pv/viornd.c b/sys/dev/pv/viornd.c index 5f5dfac75..54c0640ec 100644 --- a/sys/dev/pv/viornd.c +++ b/sys/dev/pv/viornd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viornd.c,v 1.7 2023/07/28 16:54:48 dv Exp $ */ +/* $OpenBSD: viornd.c,v 1.8 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2014 Stefan Fritsch @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/sys/dev/pv/virtio.c b/sys/dev/pv/virtio.c index 53e27e272..49a7fe2b2 100644 --- a/sys/dev/pv/virtio.c +++ b/sys/dev/pv/virtio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio.c,v 1.24 2023/12/02 10:01:35 sf Exp $ */ +/* $OpenBSD: virtio.c,v 1.25 2024/05/24 10:05:55 jsg Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -29,9 +29,7 @@ #include #include -#include #include -#include #include #include diff --git a/sys/dev/pv/vmmci.c b/sys/dev/pv/vmmci.c index 9ad4de351..1ee9e110a 100644 --- a/sys/dev/pv/vmmci.c +++ b/sys/dev/pv/vmmci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmmci.c,v 1.10 2023/05/29 08:13:35 sf Exp $ */ +/* $OpenBSD: vmmci.c,v 1.11 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2017 Reyk Floeter @@ -18,13 +18,8 @@ #include #include -#include #include -#include -#include #include -#include -#include #include #include diff --git a/sys/dev/pv/vmt.c b/sys/dev/pv/vmt.c index 1829c9ab5..02c4117dc 100644 --- a/sys/dev/pv/vmt.c +++ b/sys/dev/pv/vmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmt.c,v 1.31 2023/09/26 08:30:13 mvs Exp $ */ +/* $OpenBSD: vmt.c,v 1.32 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2007 David Crawshaw @@ -28,14 +28,9 @@ #include #include -#include #include #include -#include #include -#include -#include -#include #include #include #include diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 08c285d88..b26a73aec 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.53 2023/11/08 12:01:21 krw Exp $ */ +/* $OpenBSD: xbf.c,v 1.54 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2016, 2017 Mike Belopuhov @@ -17,14 +17,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "bio.h" - #include #include #include #include -#include -#include #include #include diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c index 11ce4ca99..0c6ad0a90 100644 --- a/sys/dev/pv/xen.c +++ b/sys/dev/pv/xen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xen.c,v 1.97 2020/06/29 06:50:52 jsg Exp $ */ +/* $OpenBSD: xen.c,v 1.98 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2015, 2016, 2017 Mike Belopuhov @@ -31,15 +31,11 @@ #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include diff --git a/sys/dev/pv/xenstore.c b/sys/dev/pv/xenstore.c index 27199590f..0c00dbff4 100644 --- a/sys/dev/pv/xenstore.c +++ b/sys/dev/pv/xenstore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xenstore.c,v 1.49 2023/04/11 00:45:08 jsg Exp $ */ +/* $OpenBSD: xenstore.c,v 1.50 2024/05/24 10:05:55 jsg Exp $ */ /* * Copyright (c) 2015 Mike Belopuhov @@ -19,12 +19,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index e524daa76..8615534ab 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.325 2024/02/13 12:22:09 bluhm Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.326 2024/05/24 06:38:41 sashan Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -2892,7 +2892,7 @@ pfsync_upd_tcp(struct pf_state *st, const struct pfsync_state_peer *src, if ((st->dst.state > dst->state) || - (st->dst.state >= TCPS_SYN_SENT && + (st->dst.state == dst->state && SEQ_GT(st->dst.seqlo, ntohl(dst->seqlo)))) sync++; else diff --git a/usr.bin/passwd/pwd_check.c b/usr.bin/passwd/pwd_check.c index cfdd14a8a..168b9e517 100644 --- a/usr.bin/passwd/pwd_check.c +++ b/usr.bin/passwd/pwd_check.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd_check.c,v 1.18 2023/05/08 16:11:41 tobias Exp $ */ +/* $OpenBSD: pwd_check.c,v 1.19 2024/05/24 13:32:03 op Exp $ */ /* * Copyright 2000 Niels Provos @@ -213,7 +213,7 @@ pwd_gettries(login_cap_t *lc) if (ntries >= 0 && ntries <= INT_MAX) return((int)ntries); fprintf(stderr, - "Warning: pwdtries out of range in /etc/login.conf"); + "Warning: passwordtries out of range in /etc/login.conf"); } /* diff --git a/usr.bin/sndioctl/sndioctl.c b/usr.bin/sndioctl/sndioctl.c index 2bda6e7b9..3751be764 100644 --- a/usr.bin/sndioctl/sndioctl.c +++ b/usr.bin/sndioctl/sndioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sndioctl.c,v 1.20 2024/04/22 10:49:01 ratchov Exp $ */ +/* $OpenBSD: sndioctl.c,v 1.21 2024/05/24 15:10:27 ratchov Exp $ */ /* * Copyright (c) 2014-2020 Alexandre Ratchov * @@ -47,6 +47,7 @@ int matchpar(struct info *, char *, int); int matchent(struct info *, char *, int); int ismono(struct info *); void print_node(struct sioctl_node *, int); +void print_display(struct info *); void print_desc(struct info *, int); void print_num(struct info *); void print_ent(struct info *, char *); @@ -310,6 +311,9 @@ ismono(struct info *g) continue; if (e1->curval != e2->curval) return 0; + if (strcmp(e1->desc.display, + e2->desc.display) != 0) + return 0; } } } @@ -329,6 +333,28 @@ print_node(struct sioctl_node *c, int mono) printf("[%d]", c->unit); } +/* + * print display string, with '(' and ')' and non-printable chars removed + * in order to match command syntax + */ +void +print_display(struct info *p) +{ + char buf[SIOCTL_NAMEMAX], *s, *d; + unsigned int c; + + s = p->desc.display; + d = buf; + while ((c = *s++) != 0) { + if (c == '(' || c == ')' || c < ' ') + continue; + *d++ = c; + } + *d = 0; + if (buf[0] != 0) + printf("(%s)", buf); +} + /* * print info about the parameter */ @@ -342,6 +368,7 @@ print_desc(struct info *p, int mono) case SIOCTL_NUM: case SIOCTL_SW: printf("*"); + print_display(p); break; case SIOCTL_SEL: case SIOCTL_VEC: @@ -359,6 +386,8 @@ print_desc(struct info *p, int mono) print_node(&e->desc.node1, mono); if (p->desc.type != SIOCTL_SEL) printf(":*"); + if (e->desc.display[0] != 0) + print_display(e); more = 1; } } @@ -404,6 +433,7 @@ print_ent(struct info *e, char *comment) case SIOCTL_NUM: print_num(e); } + print_display(e); if (comment) printf("\t# %s", comment); printf("\n"); @@ -422,6 +452,7 @@ print_val(struct info *p, int mono) case SIOCTL_NUM: case SIOCTL_SW: print_num(p); + print_display(p); break; case SIOCTL_SEL: case SIOCTL_VEC: @@ -439,6 +470,7 @@ print_val(struct info *p, int mono) if (more) printf(","); print_node(&e->desc.node1, mono); + print_display(e); more = 1; } } else { @@ -447,6 +479,7 @@ print_val(struct info *p, int mono) print_node(&e->desc.node1, mono); printf(":"); print_num(e); + print_display(e); more = 1; } } @@ -631,6 +664,7 @@ dump(void) print_node(&i->desc.node1, 0); printf(":0..%d (%u)", i->desc.maxval, i->curval); } + print_display(i); printf("\n"); } } @@ -753,6 +787,12 @@ cmd(char *line) } } } + if (*pos == '(') { + while (*pos != 0) { + if (*pos++ == ')') + break; + } + } if (nent == 0) { /* XXX: use print_node()-like routine */ fprintf(stderr, "%s[%d]: invalid value\n", vstr, vunit); diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index a5fc85e74..bd2489354 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.113 2024/05/06 05:37:26 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.116 2024/05/24 15:21:35 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -1054,6 +1054,8 @@ dev_allocbufs(struct dev *d) int dev_open(struct dev *d) { + struct opt *o; + d->mode = d->reqmode; d->round = d->reqround; d->bufsz = d->reqbufsz; @@ -1076,6 +1078,18 @@ dev_open(struct dev *d) return 0; d->pstate = DEV_INIT; + + /* add server.device if device is opened after opt_ref() call */ + for (o = opt_list; o != NULL; o = o->next) { + if (o->refcnt > 0 && !ctl_find(CTL_OPT_DEV, o, d)) { + ctl_new(CTL_OPT_DEV, o, d, + CTL_SEL, dev_getdisplay(d), + o->name, "server", -1, "device", + d->name, -1, 1, o->dev == d); + d->refcnt++; + } + } + return 1; } @@ -1150,6 +1164,14 @@ dev_freebufs(struct dev *d) void dev_close(struct dev *d) { + struct opt *o; + + /* remove server.device entries */ + for (o = opt_list; o != NULL; o = o->next) { + if (ctl_del(CTL_OPT_DEV, o, d)) + d->refcnt--; + } + d->pstate = DEV_CFG; dev_sio_close(d); dev_freebufs(d); @@ -1776,7 +1798,7 @@ slot_new(struct opt *opt, unsigned int id, char *who, s->opt = opt; slot_ctlname(s, ctl_name, CTL_NAMEMAX); ctl_new(CTL_SLOT_LEVEL, s, NULL, - CTL_NUM, "app", ctl_name, -1, "level", + CTL_NUM, "", "app", ctl_name, -1, "level", NULL, -1, 127, s->vol); found: @@ -2290,6 +2312,14 @@ ctlslot_visible(struct ctlslot *s, struct ctl *c) return 1; switch (c->scope) { case CTL_HW: + /* + * Disable hardware's server.device control as its + * replaced by sndiod's one + */ + if (strcmp(c->node0.name, "server") == 0 && + strcmp(c->func, "device") == 0) + return 0; + /* FALLTHROUHG */ case CTL_DEV_MASTER: return (s->opt->dev == c->u.any.arg0); case CTL_OPT_DEV: @@ -2405,6 +2435,11 @@ ctl_log(struct ctl *c) default: log_puts("unknown"); } + if (c->display[0] != 0) { + log_puts(" ("); + log_puts(c->display); + log_puts(")"); + } } int @@ -2467,7 +2502,7 @@ ctl_setval(struct ctl *c, int val) */ struct ctl * ctl_new(int scope, void *arg0, void *arg1, - int type, char *gstr, + int type, char *display, char *gstr, char *str0, int unit0, char *func, char *str1, int unit1, int maxval, int val) { @@ -2491,6 +2526,7 @@ ctl_new(int scope, void *arg0, void *arg1, c->type = type; strlcpy(c->func, func, CTL_NAMEMAX); strlcpy(c->group, gstr, CTL_NAMEMAX); + strlcpy(c->display, display, CTL_DISPLAYMAX); strlcpy(c->node0.name, str0, CTL_NAMEMAX); c->node0.unit = unit0; if (c->type == CTL_VEC || c->type == CTL_LIST || c->type == CTL_SEL) { @@ -2636,11 +2672,32 @@ ctl_del(int scope, void *arg0, void *arg1) } } +char * +dev_getdisplay(struct dev *d) +{ + struct ctl *c; + char *display; + + display = ""; + for (c = ctl_list; c != NULL; c = c->next) { + if (c->scope == CTL_HW && + c->u.hw.dev == d && + c->type == CTL_SEL && + strcmp(c->group, d->name) == 0 && + strcmp(c->node0.name, "server") == 0 && + strcmp(c->func, "device") == 0 && + c->curval == 1) + display = c->display; + } + return display; +} + void dev_ctlsync(struct dev *d) { struct ctl *c; struct ctlslot *s; + const char *display; int found, i; found = 0; @@ -2668,10 +2725,23 @@ dev_ctlsync(struct dev *d) } d->master_enabled = 1; ctl_new(CTL_DEV_MASTER, d, NULL, - CTL_NUM, d->name, "output", -1, "level", + CTL_NUM, "", d->name, "output", -1, "level", NULL, -1, 127, d->master); } + /* + * if the hardware's server.device changed, update the display name + */ + display = dev_getdisplay(d); + for (c = ctl_list; c != NULL; c = c->next) { + if (c->scope != CTL_OPT_DEV || + c->u.opt_dev.dev != d || + strcmp(c->display, display) == 0) + continue; + strlcpy(c->display, display, CTL_DISPLAYMAX); + c->desc_mask = ~0; + } + for (s = ctlslot_array, i = 0; i < DEV_NCTLSLOT; i++, s++) { if (s->ops == NULL) continue; diff --git a/usr.bin/sndiod/dev.h b/usr.bin/sndiod/dev.h index 6e7cdf66f..49a085bbb 100644 --- a/usr.bin/sndiod/dev.h +++ b/usr.bin/sndiod/dev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.h,v 1.45 2024/05/19 00:05:43 jsg Exp $ */ +/* $OpenBSD: dev.h,v 1.46 2024/05/24 15:16:09 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -155,9 +155,11 @@ struct ctl { } u; unsigned int addr; /* slot side control address */ -#define CTL_NAMEMAX 16 /* max name length */ +#define CTL_NAMEMAX 12 /* max name length */ +#define CTL_DISPLAYMAX 24 /* max name length */ char func[CTL_NAMEMAX]; /* parameter function name */ char group[CTL_NAMEMAX]; /* group aka namespace */ + char display[CTL_DISPLAYMAX]; /* free-format hint */ struct ctl_node { char name[CTL_NAMEMAX]; /* stream name */ int unit; @@ -350,7 +352,7 @@ void slot_detach(struct slot *); */ struct ctl *ctl_new(int, void *, void *, - int, char *, char *, int, char *, char *, int, int, int); + int, char *, char *, char *, int, char *, char *, int, int, int); int ctl_del(int, void *, void *); void ctl_log(struct ctl *); int ctl_setval(struct ctl *c, int val); @@ -365,6 +367,7 @@ int ctlslot_visible(struct ctlslot *, struct ctl *); struct ctl *ctlslot_lookup(struct ctlslot *, int); void ctlslot_update(struct ctlslot *); +char *dev_getdisplay(struct dev *); void dev_ctlsync(struct dev *); #endif /* !defined(DEV_H) */ diff --git a/usr.bin/sndiod/dev_sioctl.c b/usr.bin/sndiod/dev_sioctl.c index 907f49267..6ec3e7ae2 100644 --- a/usr.bin/sndiod/dev_sioctl.c +++ b/usr.bin/sndiod/dev_sioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_sioctl.c,v 1.8 2024/04/22 10:43:55 ratchov Exp $ */ +/* $OpenBSD: dev_sioctl.c,v 1.10 2024/05/24 15:16:09 ratchov Exp $ */ /* * Copyright (c) 2014-2020 Alexandre Ratchov * @@ -70,7 +70,7 @@ dev_sioctl_ondesc(void *arg, struct sioctl_desc *desc, int val) } ctl_new(CTL_HW, d, &desc->addr, - desc->type, group, + desc->type, desc->display, group, desc->node0.name, desc->node0.unit, desc->func, desc->node1.name, desc->node1.unit, desc->maxval, val); } @@ -91,7 +91,8 @@ dev_sioctl_onval(void *arg, unsigned int addr, unsigned int val) } for (c = ctl_list; c != NULL; c = c->next) { - if (c->scope != CTL_HW || c->u.hw.addr != addr) + if (c->scope != CTL_HW || c->u.hw.dev != d || + c->u.hw.addr != addr) continue; if (log_level >= 2) { diff --git a/usr.bin/sndiod/opt.c b/usr.bin/sndiod/opt.c index 17d2456e7..1c7d7ce7c 100644 --- a/usr.bin/sndiod/opt.c +++ b/usr.bin/sndiod/opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opt.c,v 1.10 2024/04/22 10:42:04 ratchov Exp $ */ +/* $OpenBSD: opt.c,v 1.12 2024/05/24 15:21:35 ratchov Exp $ */ /* * Copyright (c) 2008-2011 Alexandre Ratchov * @@ -346,15 +346,6 @@ opt_del(struct opt *o) void opt_init(struct opt *o) { - struct dev *d; - - if (strcmp(o->name, o->dev->name) != 0) { - for (d = dev_list; d != NULL; d = d->next) { - ctl_new(CTL_OPT_DEV, o, d, - CTL_SEL, o->name, "server", -1, "device", - d->name, -1, 1, o->dev == d); - } - } } void @@ -499,6 +490,17 @@ opt_ref(struct opt *o) /* if device changed, move everything to the new one */ if (d != o->dev) opt_setdev(o, d); + + /* create server.device control */ + for (d = dev_list; d != NULL; d = d->next) { + d->refcnt++; + if (d->pstate == DEV_CFG) + dev_open(d); + ctl_new(CTL_OPT_DEV, o, d, + CTL_SEL, dev_getdisplay(d), + o->name, "server", -1, "device", + d->name, -1, 1, o->dev == d); + } } } @@ -512,7 +514,15 @@ opt_ref(struct opt *o) void opt_unref(struct opt *o) { + struct dev *d; + o->refcnt--; - if (o->refcnt == 0) + if (o->refcnt == 0) { + /* delete server.device control */ + for (d = dev_list; d != NULL; d = d->next) { + if (ctl_del(CTL_OPT_DEV, o, d)) + dev_unref(d); + } dev_unref(o->dev); + } } diff --git a/usr.bin/sndiod/sock.c b/usr.bin/sndiod/sock.c index 416d179fd..86a78cb67 100644 --- a/usr.bin/sndiod/sock.c +++ b/usr.bin/sndiod/sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.c,v 1.47 2022/12/26 19:16:03 jmc Exp $ */ +/* $OpenBSD: sock.c,v 1.49 2024/05/24 15:16:09 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -33,7 +33,7 @@ #include "sock.h" #include "utils.h" -#define SOCK_CTLDESC_SIZE 16 /* number of entries in s->ctldesc */ +#define SOCK_CTLDESC_SIZE 0x800 /* size of s->ctldesc */ void sock_log(struct sock *); void sock_close(struct sock *); @@ -626,8 +626,7 @@ sock_wdata(struct sock *f) else if (f->midi) data = abuf_rgetblk(&f->midi->obuf, &count); else { - data = (unsigned char *)f->ctldesc + - (f->wsize - f->wtodo); + data = f->ctldesc + (f->wsize - f->wtodo); count = f->wtodo; } if (count > f->wtodo) @@ -961,8 +960,7 @@ sock_hello(struct sock *f) } return 0; } - f->ctldesc = xmalloc(SOCK_CTLDESC_SIZE * - sizeof(struct amsg_ctl_desc)); + f->ctldesc = xmalloc(SOCK_CTLDESC_SIZE); f->ctlops = 0; f->ctlsyncpending = 0; return 1; @@ -989,8 +987,10 @@ sock_execmsg(struct sock *f) struct amsg *m = &f->rmsg; unsigned char *data; int size, ctl; + int cmd; - switch (ntohl(m->cmd)) { + cmd = ntohl(m->cmd); + switch (cmd) { case AMSG_DATA: #ifdef DEBUG if (log_level >= 4) { @@ -1284,6 +1284,7 @@ sock_execmsg(struct sock *f) dev_midi_vol(s->opt->dev, s); ctl_onval(CTL_SLOT_LEVEL, s, NULL, ctl); break; + case AMSG_CTLSUB_OLD: case AMSG_CTLSUB: #ifdef DEBUG if (log_level >= 3) { @@ -1316,6 +1317,9 @@ sock_execmsg(struct sock *f) } f->ctlops |= SOCK_CTLDESC; f->ctlsyncpending = 1; + f->ctl_desc_size = (cmd == AMSG_CTLSUB) ? + sizeof(struct amsg_ctl_desc) : + AMSG_OLD_DESC_SIZE; } } else f->ctlops &= ~SOCK_CTLDESC; @@ -1604,7 +1608,6 @@ sock_buildmsg(struct sock *f) * searching for the {desc,val}_mask bits */ if (f->ctlslot && (f->ctlops & SOCK_CTLDESC)) { - desc = f->ctldesc; mask = f->ctlslot->self; size = 0; pc = &ctl_list; @@ -1614,9 +1617,9 @@ sock_buildmsg(struct sock *f) pc = &c->next; continue; } - if (size == SOCK_CTLDESC_SIZE * - sizeof(struct amsg_ctl_desc)) + if (size + f->ctl_desc_size > SOCK_CTLDESC_SIZE) break; + desc = (struct amsg_ctl_desc *)(f->ctldesc + size); c->desc_mask &= ~mask; c->val_mask &= ~mask; type = ctlslot_visible(f->ctlslot, c) ? @@ -1633,8 +1636,14 @@ sock_buildmsg(struct sock *f) desc->addr = htons(c->addr); desc->maxval = htons(c->maxval); desc->curval = htons(c->curval); - size += sizeof(struct amsg_ctl_desc); - desc++; + + /* old clients don't have the 'display' member */ + if (f->ctl_desc_size >= offsetof(struct amsg_ctl_desc, + display) + AMSG_CTL_DISPLAYMAX) { + strlcpy(desc->display, c->display, AMSG_CTL_DISPLAYMAX); + } + + size += f->ctl_desc_size; /* if this is a deleted entry unref it */ if (type == CTL_NONE) { diff --git a/usr.bin/sndiod/sock.h b/usr.bin/sndiod/sock.h index 91f3f2dfd..6fee8aa0c 100644 --- a/usr.bin/sndiod/sock.h +++ b/usr.bin/sndiod/sock.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sock.h,v 1.7 2020/04/26 14:13:22 ratchov Exp $ */ +/* $OpenBSD: sock.h,v 1.9 2024/05/24 15:16:09 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -59,7 +59,8 @@ struct sock { struct midi *midi; /* midi endpoint */ struct port *port; /* midi port */ struct ctlslot *ctlslot; - struct amsg_ctl_desc *ctldesc; /* temporary buffer */ + unsigned char *ctldesc; /* temporary buffer */ + size_t ctl_desc_size; /* size of client amsg_ctl_desc */ #define SOCK_CTLDESC 1 /* dump desc and send changes */ #define SOCK_CTLVAL 2 /* send value changes */ unsigned int ctlops; /* bitmap of above */ diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h index 35e1eb61f..de18de246 100644 --- a/usr.bin/ssh/channels.h +++ b/usr.bin/ssh/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.155 2024/05/17 06:42:04 jsg Exp $ */ +/* $OpenBSD: channels.h,v 1.156 2024/05/23 23:47:16 jsg Exp $ */ /* * Author: Tatu Ylonen @@ -85,7 +85,6 @@ struct ssh; struct Channel; typedef struct Channel Channel; -struct fwd_perm_list; typedef void channel_open_fn(struct ssh *, int, int, void *); typedef void channel_callback_fn(struct ssh *, int, int, void *); diff --git a/usr.bin/ssh/servconf.h b/usr.bin/ssh/servconf.h index 99754a8a3..8ebdca5e2 100644 --- a/usr.bin/ssh/servconf.h +++ b/usr.bin/ssh/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.162 2024/05/17 06:42:04 jsg Exp $ */ +/* $OpenBSD: servconf.h,v 1.163 2024/05/23 23:47:16 jsg Exp $ */ /* * Author: Tatu Ylonen @@ -47,7 +47,6 @@ #define PUBKEYAUTH_VERIFY_REQUIRED (1<<1) struct ssh; -struct fwd_perm_list; /* * Used to store addresses from ListenAddr directives. These may be diff --git a/usr.bin/tmux/mode-tree.c b/usr.bin/tmux/mode-tree.c index c1f3b5f53..49fe2b7cf 100644 --- a/usr.bin/tmux/mode-tree.c +++ b/usr.bin/tmux/mode-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mode-tree.c,v 1.66 2023/08/15 07:01:47 nicm Exp $ */ +/* $OpenBSD: mode-tree.c,v 1.67 2024/05/24 12:39:06 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -25,6 +25,11 @@ #include "tmux.h" +enum mode_tree_search_dir { + MODE_TREE_SEARCH_FORWARD, + MODE_TREE_SEARCH_BACKWARD +}; + struct mode_tree_item; TAILQ_HEAD(mode_tree_list, mode_tree_item); @@ -68,6 +73,7 @@ struct mode_tree_data { char *search; char *filter; int no_matches; + enum mode_tree_search_dir search_dir; }; struct mode_tree_item { @@ -786,7 +792,49 @@ done: } static struct mode_tree_item * -mode_tree_search_for(struct mode_tree_data *mtd) +mode_tree_search_backward(struct mode_tree_data *mtd) +{ + struct mode_tree_item *mti, *last, *prev; + + if (mtd->search == NULL) + return (NULL); + + mti = last = mtd->line_list[mtd->current].item; + for (;;) { + if ((prev = TAILQ_PREV(mti, mode_tree_list, entry)) != NULL) { + /* Point to the last child in the previous subtree. */ + while (!TAILQ_EMPTY(&prev->children)) + prev = TAILQ_LAST(&prev->children, mode_tree_list); + mti = prev; + } else { + /* If prev is NULL, jump to the parent. */ + mti = mti->parent; + } + + if (mti == NULL) { + /* Point to the last child in the last root subtree. */ + prev = TAILQ_LAST(&mtd->children, mode_tree_list); + while (!TAILQ_EMPTY(&prev->children)) + prev = TAILQ_LAST(&prev->children, mode_tree_list); + mti = prev; + } + if (mti == last) + break; + + if (mtd->searchcb == NULL) { + if (strstr(mti->name, mtd->search) != NULL) + return (mti); + continue; + } + if (mtd->searchcb(mtd->modedata, mti->itemdata, mtd->search)) + return (mti); + } + return (NULL); +} + + +static struct mode_tree_item * +mode_tree_search_forward(struct mode_tree_data *mtd) { struct mode_tree_item *mti, *last, *next; @@ -832,7 +880,10 @@ mode_tree_search_set(struct mode_tree_data *mtd) struct mode_tree_item *mti, *loop; uint64_t tag; - mti = mode_tree_search_for(mtd); + if (mtd->search_dir == MODE_TREE_SEARCH_FORWARD) + mti = mode_tree_search_forward(mtd); + else + mti = mode_tree_search_backward(mtd); if (mti == NULL) return; tag = mti->tag; @@ -1165,6 +1216,11 @@ mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key, PROMPT_NOFORMAT, PROMPT_TYPE_SEARCH); break; case 'n': + mtd->search_dir = MODE_TREE_SEARCH_FORWARD; + mode_tree_search_set(mtd); + break; + case 'N': + mtd->search_dir = MODE_TREE_SEARCH_BACKWARD; mode_tree_search_set(mtd); break; case 'f': diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index aa61246b0..2185dc7cf 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.944 2024/05/14 09:32:37 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.945 2024/05/24 12:39:06 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 14 2024 $ +.Dd $Mdocdate: May 24 2024 $ .Dt TMUX 1 .Os .Sh NAME @@ -2295,7 +2295,8 @@ The following keys may be used in client mode: .It Li "Up" Ta "Select previous client" .It Li "Down" Ta "Select next client" .It Li "C-s" Ta "Search by name" -.It Li "n" Ta "Repeat last search" +.It Li "n" Ta "Repeat last search forwards" +.It Li "N" Ta "Repeat last search backwards" .It Li "t" Ta "Toggle if client is tagged" .It Li "T" Ta "Tag no clients" .It Li "C-t" Ta "Tag all clients" @@ -2382,7 +2383,8 @@ The following keys may be used in tree mode: .It Li "C-s" Ta "Search by name" .It Li "m" Ta "Set the marked pane" .It Li "M" Ta "Clear the marked pane" -.It Li "n" Ta "Repeat last search" +.It Li "n" Ta "Repeat last search forwards" +.It Li "N" Ta "Repeat last search backwards" .It Li "t" Ta "Toggle if item is tagged" .It Li "T" Ta "Tag no items" .It Li "C-t" Ta "Tag all items" @@ -2460,7 +2462,8 @@ The following keys may be used in customize mode: .It Li "u" Ta "Unset an option (set to default value if global) or unbind a key" .It Li "U" Ta "Unset tagged options and unbind tagged keys" .It Li "C-s" Ta "Search by name" -.It Li "n" Ta "Repeat last search" +.It Li "n" Ta "Repeat last search forwards" +.It Li "N" Ta "Repeat last search backwards" .It Li "t" Ta "Toggle if item is tagged" .It Li "T" Ta "Tag no items" .It Li "C-t" Ta "Tag all items" @@ -6467,7 +6470,8 @@ The following keys may be used in buffer mode: .It Li "Up" Ta "Select previous buffer" .It Li "Down" Ta "Select next buffer" .It Li "C-s" Ta "Search by name or content" -.It Li "n" Ta "Repeat last search" +.It Li "n" Ta "Repeat last search forwards" +.It Li "N" Ta "Repeat last search backwards" .It Li "t" Ta "Toggle if buffer is tagged" .It Li "T" Ta "Tag no buffers" .It Li "C-t" Ta "Tag all buffers" diff --git a/usr.bin/tmux/utf8.c b/usr.bin/tmux/utf8.c index 888d0157c..c5b775a53 100644 --- a/usr.bin/tmux/utf8.c +++ b/usr.bin/tmux/utf8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utf8.c,v 1.64 2023/09/15 15:49:05 nicm Exp $ */ +/* $OpenBSD: utf8.c,v 1.65 2024/05/24 12:41:24 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -517,7 +517,7 @@ utf8_strvis(char *dst, const char *src, size_t len, int flag) /* Not a complete, valid UTF-8 character. */ src -= ud.have; } - if (src[0] == '$' && src < end - 1) { + if ((flag & VIS_DQ) && src[0] == '$' && src < end - 1) { if (isalpha((u_char)src[1]) || src[1] == '_' || src[1] == '{') diff --git a/usr.sbin/rpki-client/cms.c b/usr.sbin/rpki-client/cms.c index c9d8ae5b4..5ef647e15 100644 --- a/usr.sbin/rpki-client/cms.c +++ b/usr.sbin/rpki-client/cms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms.c,v 1.44 2024/04/21 19:27:44 claudio Exp $ */ +/* $OpenBSD: cms.c,v 1.45 2024/05/24 12:57:20 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -226,13 +226,14 @@ cms_parse_validate_internal(X509 **xp, const char *fn, const unsigned char *der, } if (!has_ct || !has_md) { + /* RFC 9589, section 4 */ warnx("%s: RFC 6488: CMS missing required " "signed attribute", fn); goto out; } if (!has_st) { - /* RFC-to-be draft-ietf-sidrops-cms-signing-time */ + /* RFC 9589, section 4 */ warnx("%s: missing CMS signing-time attribute", fn); goto out; } diff --git a/usr.sbin/rpki-client/mft.c b/usr.sbin/rpki-client/mft.c index 64db5f6ff..46c57dbf1 100644 --- a/usr.sbin/rpki-client/mft.c +++ b/usr.sbin/rpki-client/mft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mft.c,v 1.115 2024/05/20 15:51:43 claudio Exp $ */ +/* $OpenBSD: mft.c,v 1.116 2024/05/24 12:57:20 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * Copyright (c) 2019 Kristaps Dzonsons @@ -129,7 +129,7 @@ rtype_from_file_extension(const char *fn) /* * Validate that a filename listed on a Manifest only contains characters - * permitted in draft-ietf-sidrops-6486bis section 4.2.2 + * permitted in RFC 9286 section 4.2.2. * Also ensure that there is exactly one '.'. */ static int diff --git a/usr.sbin/rpki-client/roa.c b/usr.sbin/rpki-client/roa.c index 9c98ca9f9..3d29e6a59 100644 --- a/usr.sbin/rpki-client/roa.c +++ b/usr.sbin/rpki-client/roa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roa.c,v 1.77 2024/02/21 09:17:06 tb Exp $ */ +/* $OpenBSD: roa.c,v 1.78 2024/05/24 12:57:20 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * Copyright (c) 2019 Kristaps Dzonsons @@ -134,7 +134,7 @@ roa_parse_econtent(const char *fn, struct roa *roa, const unsigned char *d, ipaddrblocksz = sk_ROAIPAddressFamily_num(roa_asn1->ipAddrBlocks); if (ipaddrblocksz != 1 && ipaddrblocksz != 2) { - warnx("%s: draft-rfc6482bis: unexpected number of ipAddrBlocks " + warnx("%s: RFC 9582: unexpected number of ipAddrBlocks " "(got %d, expected 1 or 2)", fn, ipaddrblocksz); goto out; } @@ -154,14 +154,14 @@ roa_parse_econtent(const char *fn, struct roa *roa, const unsigned char *d, switch (afi) { case AFI_IPV4: if (ipv4_seen++ > 0) { - warnx("%s: RFC 6482bis section 4.3.2: " + warnx("%s: RFC 9582 section 4.3.2: " "IPv4 appears twice", fn); goto out; } break; case AFI_IPV6: if (ipv6_seen++ > 0) { - warnx("%s: RFC 6482bis section 4.3.2: " + warnx("%s: RFC 9582 section 4.3.2: " "IPv6 appears twice", fn); goto out; } @@ -169,7 +169,7 @@ roa_parse_econtent(const char *fn, struct roa *roa, const unsigned char *d, } if (addrsz == 0) { - warnx("%s: RFC 6482bis, section 4.3.2: " + warnx("%s: RFC 9582, section 4.3.2: " "empty ROAIPAddressFamily", fn); goto out; } diff --git a/usr.sbin/rpki-client/rpki-client.8 b/usr.sbin/rpki-client/rpki-client.8 index 15708529d..062f0fe44 100644 --- a/usr.sbin/rpki-client/rpki-client.8 +++ b/usr.sbin/rpki-client/rpki-client.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rpki-client.8,v 1.103 2024/03/01 08:10:09 tb Exp $ +.\" $OpenBSD: rpki-client.8,v 1.104 2024/05/24 12:57:20 tb Exp $ .\" .\" Copyright (c) 2019 Kristaps Dzonsons .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 1 2024 $ +.Dd $Mdocdate: May 24 2024 $ .Dt RPKI-CLIENT 8 .Os .Sh NAME @@ -417,6 +417,16 @@ agreement regarding ARIN service restrictions. .Re .Pp .Rs +.%T A Profile for Route Origin Authorizations (ROAs) +.%R RFC 9582 +.Re +.Pp +.Rs +.%T On the use of the Cryptographic Message Syntax (CMS) Signing-Time Attribute in Resource Public Key Infrastructure (RPKI) Signed Objects +.%R RFC 9589 +.Re +.Pp +.Rs .%T RPKI Signed Object for Trust Anchor Key .%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-signed-tal .%D Oct, 2022 @@ -428,24 +438,12 @@ agreement regarding ARIN service restrictions. .Re .Pp .Rs -.%T A Profile for Route Origin Authorizations (ROAs) -.%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-rfc6482bis -.%D Nov, 2022 -.Re -.Pp -.Rs .%T A Profile for Autonomous System Provider Authorization (ASPA) .%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-profile .%D Jun, 2023 .Re .Pp .Rs -.%T On the use of the CMS signing-time attribute in RPKI Signed Objects -.%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-cms-signing-time -.%D Jan, 2024 -.Re -.Pp -.Rs .%T Constraining RPKI Trust Anchors .%U https://datatracker.ietf.org/doc/html/draft-snijders-constraining-rpki-trust-anchors .%D September, 2023 @@ -453,8 +451,8 @@ agreement regarding ARIN service restrictions. .Pp .Rs .%T Detecting RRDP Session Desynchronization -.%U https://datatracker.ietf.org/doc/html/draft-spaghetti-sidrops-rrdp-desynchronization-00 -.%D Jan, 2024 +.%U https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-rrdp-desynchronization-00 +.%D April, 2024 .Re .Pp .Rs diff --git a/usr.sbin/smtpd/smtpd-tables.7 b/usr.sbin/smtpd/smtpd-tables.7 index 2ecf72f23..c5cd954e2 100644 --- a/usr.sbin/smtpd/smtpd-tables.7 +++ b/usr.sbin/smtpd/smtpd-tables.7 @@ -1,4 +1,4 @@ -.\" $OpenBSD: smtpd-tables.7,v 1.2 2024/05/22 08:39:50 op Exp $ +.\" $OpenBSD: smtpd-tables.7,v 1.3 2024/05/23 17:10:00 op Exp $ .\" .\" Copyright (c) 2008 Janne Johansson .\" Copyright (c) 2009 Jacek Masiulaniec @@ -18,7 +18,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" -.Dd $Mdocdate: May 22 2024 $ +.Dd $Mdocdate: May 23 2024 $ .Dt SMTPD-TABLES 7 .Os .Sh NAME @@ -144,7 +144,7 @@ The result is either .Sq ok on success or .Sq error -upon a failure to do so. +and a message upon a failure to do so. .It Cm check Ar service id query Check whether .Ar query @@ -155,7 +155,7 @@ if found, .Sq not-found if not, or .Sq error -upon an error. +and a message upon an error. .It Cm lookup Ar service id query Look up a value in the table for given the .Ar query . @@ -165,7 +165,7 @@ and the value if found, .Sq not-found if not found, or .Sq error -upon an error. +and a message upon an error. .It Cm fetch Ar service id Fetch the next item from the table, eventually wrapping around. It is only supported for the @@ -179,7 +179,7 @@ and the value if found, .Sq not-found if the table is empty, or .Sq error -upon an error. +and a message upon an error. .El .Pp Each service has a specific format for the result. @@ -221,12 +221,12 @@ Used to map IP addresses to hostnames. .Sh EXAMPLES Assuming the table is called .Dq devs , -here's an example of a successful +here's an example of a failed .Cm update transaction: .Bd -literal -offset indent table|0.1|1713795097.394049|devs|update|478ff0d2 -update-result|478ff0d2|ok +update-result|478ff0d2|error|failed to connect to the database .Ed .Pp A diff --git a/usr.sbin/smtpd/table_proc.c b/usr.sbin/smtpd/table_proc.c index 07cabf073..e7f2a736b 100644 --- a/usr.sbin/smtpd/table_proc.c +++ b/usr.sbin/smtpd/table_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_proc.c,v 1.20 2024/05/22 08:41:02 op Exp $ */ +/* $OpenBSD: table_proc.c,v 1.22 2024/05/23 17:10:00 op Exp $ */ /* * Copyright (c) 2024 Omar Polo @@ -166,8 +166,9 @@ table_proc_open(struct table *table) } if (ferror(priv->in)) - fatalx("table-proc: getline"); - + fatal("table-proc: getline"); + if (feof(priv->in)) + fatalx("table-proc: unexpected EOF during handshake"); if (services == 0) fatalx("table-proc: no services registered"); @@ -185,8 +186,15 @@ table_proc_update(struct table *table) r = table_proc_recv(table, "update-result"); if (!strcmp(r, "ok")) return (1); - if (!strcmp(r, "error")) + + if (!strncmp(r, "error", 5)) { + if (r[5] == '|') { + r += 6; + log_warnx("warn: table-proc: %s update failed: %s", + table->t_name, r); + } return (0); + } log_warnx("warn: table-proc: failed parse reply"); fatalx("table-proc: exiting"); @@ -221,11 +229,17 @@ table_proc_lookup(struct table *table, enum table_service s, const char *k, char table_proc_send(table, req, s, k); r = table_proc_recv(table, res); - /* common replies */ if (!strcmp(r, "not-found")) return (0); - if (!strcmp(r, "error")) + + if (!strncmp(r, "error", 5)) { + if (r[5] == '|') { + r += 6; + log_warnx("warn: table-proc: %s %s failed: %s", + table->t_name, req, r); + } return (-1); + } if (dst == NULL) { /* check op */ @@ -260,8 +274,15 @@ table_proc_fetch(struct table *table, enum table_service s, char **dst) if (!strcmp(r, "not-found")) return (0); - if (!strcmp(r, "error")) + + if (!strncmp(r, "error", 5)) { + if (r[5] == '|') { + r += 6; + log_warnx("warn: table-proc: %s fetch failed: %s", + table->t_name, r); + } return (-1); + } if (strncmp(r, "found|", 6) != 0) { log_warnx("warn: table-proc: failed to parse reply");