sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-10-08 00:42:41 +00:00
parent a959d2beea
commit 3252c81e6b
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
29 changed files with 283 additions and 186 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_iwx.c,v 1.176 2023/08/26 09:05:34 stsp Exp $ */
/* $OpenBSD: if_iwx.c,v 1.177 2023/10/06 15:15:29 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@ -10127,6 +10127,16 @@ iwx_rx_pkt(struct iwx_softc *sc, struct iwx_rx_data *data, struct mbuf_list *ml)
case IWX_WIDE_ID(IWX_DATA_PATH_GROUP, IWX_RLC_CONFIG_CMD):
break;
/*
* Ignore for now. The Linux driver only acts on this request
* with 160Mhz channels in 11ax mode.
*/
case IWX_WIDE_ID(IWX_DATA_PATH_GROUP,
IWX_THERMAL_DUAL_CHAIN_REQUEST):
DPRINTF(("%s: thermal dual-chain request received\n",
DEVNAME(sc)));
break;
/* undocumented notification from iwx-ty-a0-gf-a0-77 image */
case IWX_WIDE_ID(IWX_DATA_PATH_GROUP, 0xf8):
break;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_iwxreg.h,v 1.51 2023/03/06 11:18:37 stsp Exp $ */
/* $OpenBSD: if_iwxreg.h,v 1.52 2023/10/06 15:15:41 stsp Exp $ */
/*-
* Based on BSD-licensed source modules in the Linux iwlwifi driver,
@ -2010,6 +2010,7 @@ struct iwx_tx_queue_cfg_rsp {
#define IWX_RX_BAID_ALLOCATION_CONFIG_CMD 0x16
#define IWX_SCD_QUEUE_CONFIG_CMD 0x17
#define IWX_RX_NO_DATA_NOTIF 0xf5
#define IWX_THERMAL_DUAL_CHAIN_REQUEST 0xf6
#define IWX_TLC_MNG_UPDATE_NOTIF 0xf7
/* REGULATORY_AND_NVM group subcommand IDs */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ucom.c,v 1.77 2023/10/02 23:38:11 krw Exp $ */
/* $OpenBSD: ucom.c,v 1.78 2023/10/06 16:06:11 krw Exp $ */
/* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */
/*
@ -1256,7 +1256,7 @@ sysctl_ucominit(void)
int rslt;
unsigned int unit;
uint32_t route;
uint8_t bus, ifaceidx;
uint8_t bus, ifaceno;
KERNEL_ASSERT_LOCKED();
@ -1272,11 +1272,11 @@ sysctl_ucominit(void)
if (sc == NULL || sc->sc_iface == NULL)
continue;
if (usbd_get_location(sc->sc_uparent, sc->sc_iface,
&bus, &route, &ifaceidx) == -1)
&bus, &route, &ifaceno) == -1)
continue;
rslt = snprintf(name, sizeof(name),
"%s:usb%u.%u.%05x.%u,", sc->sc_dev.dv_xname, bus,
ROUTEROOTPORT(route), ROUTESTRING(route), ifaceidx);
ROUTEROOTPORT(route), ROUTESTRING(route), ifaceno);
if (rslt < sizeof(name) && (strlen(ucoms) + rslt) <
ucomslen)
strlcat(ucoms, name, ucomslen);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: usb_subr.c,v 1.161 2023/10/02 23:38:11 krw Exp $ */
/* $OpenBSD: usb_subr.c,v 1.162 2023/10/06 16:06:11 krw Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@ -1362,7 +1362,7 @@ usbd_get_routestring(struct usbd_device *dev, uint32_t *route)
int
usbd_get_location(struct usbd_device *dev, struct usbd_interface *iface,
uint8_t *bus, uint32_t *route, uint8_t *ifaceidx)
uint8_t *bus, uint32_t *route, uint8_t *ifaceno)
{
int i;
uint32_t r;
@ -1380,7 +1380,7 @@ usbd_get_location(struct usbd_device *dev, struct usbd_interface *iface,
if (iface == &dev->ifaces[i]) {
*bus = dev->bus->usbctl->dv_unit;
*route = (usbd_get_routestring(dev, &r)) ? 0 : r;
*ifaceidx = i;
*ifaceno = i;
return 0;
}
}

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_sig.c,v 1.319 2023/09/29 12:47:34 claudio Exp $ */
/* $OpenBSD: kern_sig.c,v 1.320 2023/10/06 08:58:13 claudio Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@ -1812,7 +1812,6 @@ sys_nosys(struct proc *p, void *v, register_t *retval)
int
sys___thrsigdivert(struct proc *p, void *v, register_t *retval)
{
static int sigwaitsleep;
struct sys___thrsigdivert_args /* {
syscallarg(sigset_t) sigmask;
syscallarg(siginfo_t *) info;
@ -1863,8 +1862,7 @@ sys___thrsigdivert(struct proc *p, void *v, register_t *retval)
if (error != 0)
break;
error = tsleep_nsec(&sigwaitsleep, PPAUSE|PCATCH, "sigwait",
nsecs);
error = tsleep_nsec(&nowake, PPAUSE|PCATCH, "sigwait", nsecs);
}
if (error == 0) {