This commit is contained in:
purplerain 2023-06-24 02:57:55 +00:00
parent be633fa56a
commit 82bafdd0b3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
18 changed files with 514 additions and 213 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ksmn.c,v 1.7 2022/04/25 16:17:19 claudio Exp $ */
/* $OpenBSD: ksmn.c,v 1.8 2023/06/23 03:47:10 mlarkin Exp $ */
/*
* Copyright (c) 2019 Bryan Steele <brynet@openbsd.org>
@ -105,6 +105,7 @@ static const struct pci_matchid ksmn_devices[] = {
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_1X_RC },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_3X_RC },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_17_6X_RC },
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_19_6X_RC },
};
int
@ -172,6 +173,9 @@ ksmn_attach(struct device *parent, struct device *self, void *aux)
(m >= 0xa0 && m <= 0xaf))
sc->sc_ccd_offset = 0x300;
if (m >= 0x60 && m <= 0x6f)
sc->sc_ccd_offset = 0x308;
if ((m >= 0x10 && m <= 0x1f) ||
(m >= 0xa0 && m <= 0xaf))
ksmn_ccd_attach(sc, 12);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: uipc_mbuf.c,v 1.286 2023/05/16 20:09:27 mvs Exp $ */
/* $OpenBSD: uipc_mbuf.c,v 1.287 2023/06/23 04:36:49 gnezdo Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@ -214,7 +214,7 @@ nmbclust_update(long newval)
{
int i;
if (newval < 0 || newval > LONG_MAX / MCLBYTES)
if (newval <= 0 || newval > LONG_MAX / MCLBYTES)
return ERANGE;
/* update the global mbuf memory limit */
nmbclust = newval;