sync with OpenBSD -current

This commit is contained in:
purplerain 2024-04-14 02:31:08 +00:00
parent 137d408ac1
commit e0d126d03b
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
143 changed files with 5355 additions and 3727 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: arc.c,v 1.124 2022/09/06 15:22:11 kn Exp $ */
/* $OpenBSD: arc.c,v 1.125 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@ -1409,18 +1409,18 @@ arc_enable_all_intr(struct arc_softc *sc)
int_mask &= ~(ARC_RA_INTRMASK_POSTQUEUE |
ARC_RA_INTRMASK_DOORBELL | ARC_RA_INTRMASK_MSG0);
arc_write(sc, ARC_RA_INTRMASK, int_mask);
break;
break;
case ARC_HBA_TYPE_C:
int_mask = arc_read(sc, ARC_RC_INTR_MASK);
int_mask &= ~(ARC_RC_INTR_MASK_POSTQUEUE |
ARC_RC_INTR_MASK_DOORBELL | ARC_RC_INTR_MASK_UTILITY_A);
arc_write(sc, ARC_RC_INTR_MASK, int_mask);
break;
break;
case ARC_HBA_TYPE_D:
int_mask = arc_read(sc, ARC_RD_INTR_ENABLE);
int_mask |= ARC_RD_INTR_ENABLE_ALL;
arc_write(sc, ARC_RD_INTR_ENABLE, int_mask);
break;
break;
}
}

View file

@ -1,4 +1,4 @@
/* $OpenBSD: auvia.c,v 1.66 2022/10/26 20:19:08 kn Exp $ */
/* $OpenBSD: auvia.c,v 1.67 2024/04/13 23:44:11 jsg Exp $ */
/* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */
/*-
@ -611,7 +611,7 @@ auvia_set_params(void *addr, int setmode, int usemode,
if (p->channels == 6
&& codec->vtbl->set_rate(codec, reg,
&p->sample_rate))
return (EINVAL);
return (EINVAL);
}
}

View file

@ -31,7 +31,7 @@
*******************************************************************************/
/* $OpenBSD: if_em_hw.c,v 1.119 2023/12/03 00:19:25 jsg Exp $ */
/* $OpenBSD: if_em_hw.c,v 1.120 2024/04/13 23:44:11 jsg Exp $ */
/*
* if_em_hw.c Shared functions for accessing and configuring the MAC
*/
@ -6432,9 +6432,9 @@ em_init_eeprom_params(struct em_hw *hw)
case em_pch2lan:
case em_pch_lpt:
{
int32_t i = 0;
uint32_t flash_size =
E1000_READ_ICH_FLASH_REG(hw, ICH_FLASH_GFPREG);
int32_t i = 0;
uint32_t flash_size =
E1000_READ_ICH_FLASH_REG(hw, ICH_FLASH_GFPREG);
eeprom->type = em_eeprom_ich8;
eeprom->use_eerd = FALSE;
eeprom->use_eewr = FALSE;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_iwm.c,v 1.414 2024/02/16 11:44:52 stsp Exp $ */
/* $OpenBSD: if_iwm.c,v 1.415 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@ -8169,7 +8169,7 @@ iwm_rval2ridx(int rval)
break;
}
return ridx;
return ridx;
}
void

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_iwx.c,v 1.182 2024/02/26 18:00:09 stsp Exp $ */
/* $OpenBSD: if_iwx.c,v 1.183 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@ -786,7 +786,7 @@ iwx_alloc_fw_monitor(struct iwx_softc *sc, uint8_t max_power)
}
if (max_power > 26) {
DPRINTF(("%s: External buffer size for monitor is too big %d, "
DPRINTF(("%s: External buffer size for monitor is too big %d, "
"check the FW TLV\n", DEVNAME(sc), max_power));
return 0;
}
@ -7211,7 +7211,7 @@ iwx_rval2ridx(int rval)
break;
}
return ridx;
return ridx;
}
void
@ -9831,7 +9831,7 @@ iwx_rx_pkt(struct iwx_softc *sc, struct iwx_rx_data *data, struct mbuf_list *ml)
* For v5 and above, we can check the version, for older
* versions we need to check the size.
*/
if (iwx_lookup_notif_ver(sc, IWX_LEGACY_GROUP,
if (iwx_lookup_notif_ver(sc, IWX_LEGACY_GROUP,
IWX_ALIVE) == 6) {
SYNC_RESP_STRUCT(resp6, pkt);
if (iwx_rx_packet_payload_len(pkt) !=
@ -10880,7 +10880,7 @@ iwx_find_device_cfg(struct iwx_softc *sc)
cores = IWX_SUBDEVICE_CORES(sdev_id);
for (i = nitems(iwx_dev_info_table) - 1; i >= 0; i--) {
const struct iwx_dev_info *dev_info = &iwx_dev_info_table[i];
const struct iwx_dev_info *dev_info = &iwx_dev_info_table[i];
if (dev_info->device != (uint16_t)IWX_CFG_ANY &&
dev_info->device != sc->sc_pid)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_ngbe.c,v 1.3 2024/04/12 19:27:43 jan Exp $ */
/* $OpenBSD: if_ngbe.c,v 1.4 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright (c) 2015-2017 Beijing WangXun Technology Co., Ltd.
@ -2952,7 +2952,7 @@ ngbe_host_interface_command(struct ngbe_softc *sc, uint32_t *buffer,
if (length == 0 || length > NGBE_HI_MAX_BLOCK_BYTE_LENGTH) {
printf("%s: buffer length failure\n", DEVNAME(sc));
return EINVAL;
return EINVAL;
}
if (hw->mac.ops.acquire_swfw_sync(sc, NGBE_MNG_SWFW_SYNC_SW_MB))
@ -3706,7 +3706,7 @@ ngbe_reset_hw(struct ngbe_softc *sc)
* mng is using it. If link is down or the flag to force full link
* reset is set, then perform link reset.
*/
if (hw->force_full_reset) {
if (hw->force_full_reset) {
rst_delay = (NGBE_READ_REG(hw, NGBE_MIS_RST_ST) &
NGBE_MIS_RST_ST_RST_INIT) >> NGBE_MIS_RST_ST_RST_INI_SHIFT;
if (hw->reset_type == NGBE_SW_RESET) {
@ -4528,9 +4528,9 @@ ngbe_update_mc_addr_list(struct ngbe_hw *hw, uint8_t *mc_addr_list,
if (clear)
memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow));
/* Update mta_shadow */
for (i = 0; i < mc_addr_count; i++)
ngbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq));
/* Update mta_shadow */
for (i = 0; i < mc_addr_count; i++)
ngbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq));
/* Enable mta */
for (i = 0; i < hw->mac.mcft_size; i++)

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_qwx_pci.c,v 1.14 2024/02/22 09:15:34 stsp Exp $ */
/* $OpenBSD: if_qwx_pci.c,v 1.15 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright 2023 Stefan Sperling <stsp@openbsd.org>
@ -2901,7 +2901,7 @@ qwx_mhi_start(struct qwx_pci_softc *psc)
#endif
/* Transition to primary runtime. */
if (MHI_IN_PBL(ee)) {
if (MHI_IN_PBL(ee)) {
ret = qwx_mhi_fw_load_handler(psc);
if (ret)
return ret;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_rge.c,v 1.23 2023/12/22 05:28:14 kevlo Exp $ */
/* $OpenBSD: if_rge.c,v 1.24 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright (c) 2019, 2020, 2023 Kevin Lo <kevlo@openbsd.org>
@ -1250,7 +1250,7 @@ rge_rxeof(struct rge_queues *q)
* If this is part of a multi-fragment packet,
* discard all the pieces.
*/
if (q->q_rx.rge_head != NULL) {
if (q->q_rx.rge_head != NULL) {
m_freem(q->q_rx.rge_head);
q->q_rx.rge_head = q->q_rx.rge_tail = NULL;
}

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_sis.c,v 1.143 2023/11/10 15:51:20 bluhm Exp $ */
/* $OpenBSD: if_sis.c,v 1.144 2024/04/13 23:44:11 jsg Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@ -1791,7 +1791,7 @@ sis_init(void *xsc)
* This resolves an issue with tons of errors in AcceptPerfectMatch
* (non-IFF_PROMISC) mode.
*/
if (sc->sis_type == SIS_TYPE_83815 && sc->sis_srr <= NS_SRR_15D) {
if (sc->sis_type == SIS_TYPE_83815 && sc->sis_srr <= NS_SRR_15D) {
CSR_WRITE_4(sc, NS_PHY_PAGE, 0x0001);
CSR_WRITE_4(sc, NS_PHY_CR, 0x189C);
/* set val for c2 */

View file

@ -31,7 +31,7 @@
*******************************************************************************/
/* $OpenBSD: ixgb_hw.c,v 1.9 2022/01/09 05:42:56 jsg Exp $ */
/* $OpenBSD: ixgb_hw.c,v 1.10 2024/04/13 23:44:11 jsg Exp $ */
/* ixgb_hw.c
* Shared functions for accessing and configuring the adapter
@ -83,14 +83,14 @@ ixgb_mac_reset(struct ixgb_hw *hw)
{
uint32_t ctrl_reg;
ctrl_reg = IXGB_CTRL0_RST |
IXGB_CTRL0_SDP3_DIR | /* All pins are Output=1 */
IXGB_CTRL0_SDP2_DIR |
IXGB_CTRL0_SDP1_DIR |
IXGB_CTRL0_SDP0_DIR |
IXGB_CTRL0_SDP3 | /* Initial value 1101 */
IXGB_CTRL0_SDP2 |
IXGB_CTRL0_SDP0;
ctrl_reg = IXGB_CTRL0_RST |
IXGB_CTRL0_SDP3_DIR | /* All pins are Output=1 */
IXGB_CTRL0_SDP2_DIR |
IXGB_CTRL0_SDP1_DIR |
IXGB_CTRL0_SDP0_DIR |
IXGB_CTRL0_SDP3 | /* Initial value 1101 */
IXGB_CTRL0_SDP2 |
IXGB_CTRL0_SDP0;
#ifdef HP_ZX1
/* Workaround for 82597EX reset errata */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: maestro.c,v 1.50 2022/10/28 15:09:46 kn Exp $ */
/* $OpenBSD: maestro.c,v 1.51 2024/04/13 23:44:11 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
@ -900,7 +900,7 @@ maestro_set_speed(struct maestro_channel *ch, u_long *prate)
} else {
/* compute 16 bits fixed point value of speed/48000,
* being careful not to overflow */
ch->dv = (((ch->speed % 48000) << 16U) + 24000) / 48000
ch->dv = (((ch->speed % 48000) << 16U) + 24000) / 48000
+ ((ch->speed / 48000) << 16U);
/* And this is the real rate obtained */
ch->speed = (ch->dv >> 16U) * 48000 +

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pciide.c,v 1.363 2022/03/11 18:00:51 mpi Exp $ */
/* $OpenBSD: pciide.c,v 1.364 2024/04/13 23:44:11 jsg Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@ -2939,8 +2939,8 @@ piix_setup_channel(struct channel_softc *chp)
(drvp[1].drive_flags & DRIVE_DMA)) {
mode[0] = mode[1] =
min(drvp[0].DMA_mode, drvp[1].DMA_mode);
drvp[0].DMA_mode = mode[0];
drvp[1].DMA_mode = mode[1];
drvp[0].DMA_mode = mode[0];
drvp[1].DMA_mode = mode[1];
goto ok;
}
/*
@ -4127,7 +4127,7 @@ cmd680_channel_map(struct pci_attach_args *pa, struct pciide_softc *sc,
printf("%s %s: "
"cannot allocate channel queue",
sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
return;
return;
}
/* XXX */
@ -7972,9 +7972,9 @@ acard_setup_channel(struct channel_softc *chp)
acard_act_pio[drvp->PIO_mode],
acard_rec_pio[drvp->PIO_mode]);
}
pci_conf_write(sc->sc_pc, sc->sc_tag, ATP8x0_CTRL,
pci_conf_read(sc->sc_pc, sc->sc_tag, ATP8x0_CTRL)
| ATP8x0_CTRL_EN(channel));
pci_conf_write(sc->sc_pc, sc->sc_tag, ATP8x0_CTRL,
pci_conf_read(sc->sc_pc, sc->sc_tag, ATP8x0_CTRL) |
ATP8x0_CTRL_EN(channel));
}
}

View file

@ -1,4 +1,4 @@
/* $OpenBSD: qle.c,v 1.63 2022/04/16 19:19:59 naddy Exp $ */
/* $OpenBSD: qle.c,v 1.64 2024/04/14 00:38:26 jsg Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@ -359,7 +359,7 @@ qle_attach(struct device *parent, struct device *self, void *aux)
pcireg_t bars[] = { QLE_PCI_MEM_BAR, QLE_PCI_IO_BAR };
pcireg_t memtype;
int r, i, rv, loop_up;
int r, i, rv, loop_up = 0;
sc->sc_pc = pa->pa_pc;
sc->sc_tag = pa->pa_tag;