sync with OpenBSD -current

This commit is contained in:
purplerain 2024-08-11 00:21:13 +00:00
parent 32e75f5310
commit b321f55ead
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
23 changed files with 206 additions and 161 deletions

View file

@ -1166,7 +1166,6 @@
./usr/include/openssl/ts.h ./usr/include/openssl/ts.h
./usr/include/openssl/txt_db.h ./usr/include/openssl/txt_db.h
./usr/include/openssl/ui.h ./usr/include/openssl/ui.h
./usr/include/openssl/ui_compat.h
./usr/include/openssl/whrlpool.h ./usr/include/openssl/whrlpool.h
./usr/include/openssl/x509.h ./usr/include/openssl/x509.h
./usr/include/openssl/x509_vfy.h ./usr/include/openssl/x509_vfy.h

View file

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.201 2024/08/02 10:48:54 jsing Exp $ # $OpenBSD: Makefile,v 1.202 2024/08/10 06:41:49 tb Exp $
LIB= crypto LIB= crypto
LIBREBUILD=y LIBREBUILD=y
@ -723,7 +723,6 @@ HDRS=\
${LCRYPTO_SRC}/ts/ts.h \ ${LCRYPTO_SRC}/ts/ts.h \
${LCRYPTO_SRC}/txt_db/txt_db.h \ ${LCRYPTO_SRC}/txt_db/txt_db.h \
${LCRYPTO_SRC}/ui/ui.h \ ${LCRYPTO_SRC}/ui/ui.h \
${LCRYPTO_SRC}/ui/ui_compat.h \
${LCRYPTO_SRC}/whrlpool/whrlpool.h \ ${LCRYPTO_SRC}/whrlpool/whrlpool.h \
${LCRYPTO_SRC}/x509/x509.h \ ${LCRYPTO_SRC}/x509/x509.h \
${LCRYPTO_SRC}/x509/x509_vfy.h \ ${LCRYPTO_SRC}/x509/x509_vfy.h \

View file

@ -1,65 +0,0 @@
/* $OpenBSD: ui_compat.h,v 1.5 2022/12/23 02:20:28 jsing Exp $ */
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
* project 2001.
*/
/* ====================================================================
* Copyright (c) 2001 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#ifndef HEADER_UI_COMPAT_H
#define HEADER_UI_COMPAT_H
#include <openssl/opensslconf.h>
#include <openssl/ui.h>
#endif

View file

@ -1001,25 +1001,21 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)
u32 pte_flags; u32 pte_flags;
int ret; int ret;
/* For Modern GENs the PTEs and register space are split in the BAR */
type = pci_mapreg_type(i915->pc, i915->tag, 0x10); type = pci_mapreg_type(i915->pc, i915->tag, 0x10);
ret = -pci_mapreg_info(i915->pc, i915->tag, 0x10, type, ret = -pci_mapreg_info(i915->pc, i915->tag, 0x10, type,
&addr, &len, NULL); &addr, &len, NULL);
if (ret) if (ret)
return ret; return ret;
/* GEM_WARN_ON(len != gen6_gttmmadr_size(i915));
* On BXT+/ICL+ writes larger than 64 bit to the GTT pagetable range phys_addr = addr + gen6_gttadr_offset(i915);
* will be dropped. For WC mappings in general we have 64 byte burst
* writes when the WC buffer is flushed, so we can't use it, but have to if (needs_wc_ggtt_mapping(i915))
* resort to an uncached mapping. The WC issue is easily caught by the
* readback check when writing GTT PTE entries.
*/
if (IS_GEN9_LP(i915) || GRAPHICS_VER(i915) >= 11)
flags = 0;
else
flags = BUS_SPACE_MAP_PREFETCHABLE; flags = BUS_SPACE_MAP_PREFETCHABLE;
ret = -bus_space_map(i915->bst, addr + len / 2, size, else
flags = 0;
ret = -bus_space_map(i915->bst, phys_addr, size,
flags | BUS_SPACE_MAP_LINEAR, &ggtt->gsm_bsh); flags | BUS_SPACE_MAP_LINEAR, &ggtt->gsm_bsh);
if (ret) { if (ret) {
drm_err(&i915->drm, "Failed to map the ggtt page table\n"); drm_err(&i915->drm, "Failed to map the ggtt page table\n");
@ -1028,7 +1024,7 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)
ggtt->gsm = bus_space_vaddr(i915->bst, ggtt->gsm_bsh); ggtt->gsm = bus_space_vaddr(i915->bst, ggtt->gsm_bsh);
ggtt->gsm_size = size; ggtt->gsm_size = size;
if (!ggtt->gsm) { if (!ggtt->gsm) {
DRM_ERROR("Failed to map the ggtt page table\n"); drm_err(&i915->drm, "Failed to map the ggtt page table\n");
return -ENOMEM; return -ENOMEM;
} }

View file

@ -184,7 +184,7 @@ static int guc_wait_ucode(struct intel_guc *guc)
* in the seconds range. However, there is a limit on how long an * in the seconds range. However, there is a limit on how long an
* individual wait_for() can wait. So wrap it in a loop. * individual wait_for() can wait. So wrap it in a loop.
*/ */
before_freq = intel_rps_read_actual_frequency(&uncore->gt->rps); before_freq = intel_rps_read_actual_frequency(&gt->rps);
before = ktime_get(); before = ktime_get();
for (count = 0; count < GUC_LOAD_RETRY_LIMIT; count++) { for (count = 0; count < GUC_LOAD_RETRY_LIMIT; count++) {
ret = wait_for(guc_load_done(uncore, &status, &success), 1000); ret = wait_for(guc_load_done(uncore, &status, &success), 1000);
@ -192,7 +192,7 @@ static int guc_wait_ucode(struct intel_guc *guc)
break; break;
guc_dbg(guc, "load still in progress, count = %d, freq = %dMHz, status = 0x%08X [0x%02X/%02X]\n", guc_dbg(guc, "load still in progress, count = %d, freq = %dMHz, status = 0x%08X [0x%02X/%02X]\n",
count, intel_rps_read_actual_frequency(&uncore->gt->rps), status, count, intel_rps_read_actual_frequency(&gt->rps), status,
REG_FIELD_GET(GS_BOOTROM_MASK, status), REG_FIELD_GET(GS_BOOTROM_MASK, status),
REG_FIELD_GET(GS_UKERNEL_MASK, status)); REG_FIELD_GET(GS_UKERNEL_MASK, status));
} }
@ -204,7 +204,7 @@ static int guc_wait_ucode(struct intel_guc *guc)
u32 bootrom = REG_FIELD_GET(GS_BOOTROM_MASK, status); u32 bootrom = REG_FIELD_GET(GS_BOOTROM_MASK, status);
guc_info(guc, "load failed: status = 0x%08X, time = %lldms, freq = %dMHz, ret = %d\n", guc_info(guc, "load failed: status = 0x%08X, time = %lldms, freq = %dMHz, ret = %d\n",
status, delta_ms, intel_rps_read_actual_frequency(&uncore->gt->rps), ret); status, delta_ms, intel_rps_read_actual_frequency(&gt->rps), ret);
guc_info(guc, "load failed: status: Reset = %d, BootROM = 0x%02X, UKernel = 0x%02X, MIA = 0x%02X, Auth = 0x%02X\n", guc_info(guc, "load failed: status: Reset = %d, BootROM = 0x%02X, UKernel = 0x%02X, MIA = 0x%02X, Auth = 0x%02X\n",
REG_FIELD_GET(GS_MIA_IN_RESET, status), REG_FIELD_GET(GS_MIA_IN_RESET, status),
bootrom, ukernel, bootrom, ukernel,
@ -254,11 +254,11 @@ static int guc_wait_ucode(struct intel_guc *guc)
guc_warn(guc, "excessive init time: %lldms! [status = 0x%08X, count = %d, ret = %d]\n", guc_warn(guc, "excessive init time: %lldms! [status = 0x%08X, count = %d, ret = %d]\n",
delta_ms, status, count, ret); delta_ms, status, count, ret);
guc_warn(guc, "excessive init time: [freq = %dMHz, before = %dMHz, perf_limit_reasons = 0x%08X]\n", guc_warn(guc, "excessive init time: [freq = %dMHz, before = %dMHz, perf_limit_reasons = 0x%08X]\n",
intel_rps_read_actual_frequency(&uncore->gt->rps), before_freq, intel_rps_read_actual_frequency(&gt->rps), before_freq,
intel_uncore_read(uncore, intel_gt_perf_limit_reasons_reg(gt))); intel_uncore_read(uncore, intel_gt_perf_limit_reasons_reg(gt)));
} else { } else {
guc_dbg(guc, "init took %lldms, freq = %dMHz, before = %dMHz, status = 0x%08X, count = %d, ret = %d\n", guc_dbg(guc, "init took %lldms, freq = %dMHz, before = %dMHz, status = 0x%08X, count = %d, ret = %d\n",
delta_ms, intel_rps_read_actual_frequency(&uncore->gt->rps), delta_ms, intel_rps_read_actual_frequency(&gt->rps),
before_freq, status, count, ret); before_freq, status, count, ret);
} }

View file

@ -6,6 +6,7 @@
#include <linux/types.h> #include <linux/types.h>
#include "gt/intel_gt.h" #include "gt/intel_gt.h"
#include "gt/intel_rps.h"
#include "intel_guc_reg.h" #include "intel_guc_reg.h"
#include "intel_huc.h" #include "intel_huc.h"
#include "intel_huc_print.h" #include "intel_huc_print.h"
@ -462,17 +463,68 @@ static const char *auth_mode_string(struct intel_huc *huc,
return partial ? "clear media" : "all workloads"; return partial ? "clear media" : "all workloads";
} }
/*
* Use a longer timeout for debug builds so that problems can be detected
* and analysed. But a shorter timeout for releases so that user's don't
* wait forever to find out there is a problem. Note that the only reason
* an end user should hit the timeout is in case of extreme thermal throttling.
* And a system that is that hot during boot is probably dead anyway!
*/
#if defined(CONFIG_DRM_I915_DEBUG_GEM)
#define HUC_LOAD_RETRY_LIMIT 20
#else
#define HUC_LOAD_RETRY_LIMIT 3
#endif
int intel_huc_wait_for_auth_complete(struct intel_huc *huc, int intel_huc_wait_for_auth_complete(struct intel_huc *huc,
enum intel_huc_authentication_type type) enum intel_huc_authentication_type type)
{ {
struct intel_gt *gt = huc_to_gt(huc); struct intel_gt *gt = huc_to_gt(huc);
int ret; struct intel_uncore *uncore = gt->uncore;
ktime_t before, after, delta;
int ret, count;
u64 delta_ms;
u32 before_freq;
ret = __intel_wait_for_register(gt->uncore, /*
huc->status[type].reg, * The KMD requests maximum frequency during driver load, however thermal
huc->status[type].mask, * throttling can force the frequency down to minimum (although the board
huc->status[type].value, * really should never get that hot in real life!). IFWI issues have been
2, 50, NULL); * seen to cause sporadic failures to grant the higher frequency. And at
* minimum frequency, the authentication time can be in the seconds range.
* Note that there is a limit on how long an individual wait_for() can wait.
* So wrap it in a loop.
*/
before_freq = intel_rps_read_actual_frequency(&gt->rps);
before = ktime_get();
for (count = 0; count < HUC_LOAD_RETRY_LIMIT; count++) {
ret = __intel_wait_for_register(gt->uncore,
huc->status[type].reg,
huc->status[type].mask,
huc->status[type].value,
2, 1000, NULL);
if (!ret)
break;
huc_dbg(huc, "auth still in progress, count = %d, freq = %dMHz, status = 0x%08X\n",
count, intel_rps_read_actual_frequency(&gt->rps),
huc->status[type].reg.reg);
}
after = ktime_get();
delta = ktime_sub(after, before);
delta_ms = ktime_to_ms(delta);
if (delta_ms > 50) {
huc_warn(huc, "excessive auth time: %lldms! [status = 0x%08X, count = %d, ret = %d]\n",
delta_ms, huc->status[type].reg.reg, count, ret);
huc_warn(huc, "excessive auth time: [freq = %dMHz, before = %dMHz, perf_limit_reasons = 0x%08X]\n",
intel_rps_read_actual_frequency(&gt->rps), before_freq,
intel_uncore_read(uncore, intel_gt_perf_limit_reasons_reg(gt)));
} else {
huc_dbg(huc, "auth took %lldms, freq = %dMHz, before = %dMHz, status = 0x%08X, count = %d, ret = %d\n",
delta_ms, intel_rps_read_actual_frequency(&gt->rps),
before_freq, huc->status[type].reg.reg, count, ret);
}
/* mark the load process as complete even if the wait failed */ /* mark the load process as complete even if the wait failed */
delayed_huc_load_complete(huc); delayed_huc_load_complete(huc);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if_rge.c,v 1.27 2024/06/30 08:13:02 kevlo Exp $ */ /* $OpenBSD: if_rge.c,v 1.28 2024/08/10 21:53:06 patrick Exp $ */
/* /*
* Copyright (c) 2019, 2020, 2023, 2024 * Copyright (c) 2019, 2020, 2023, 2024
@ -480,24 +480,27 @@ rge_encap(struct rge_queues *q, struct mbuf *m, int idx)
if (cur == RGE_TX_LIST_CNT - 1) if (cur == RGE_TX_LIST_CNT - 1)
cmdsts |= RGE_TDCMDSTS_EOR; cmdsts |= RGE_TDCMDSTS_EOR;
if (i == (txmap->dm_nsegs - 1))
cmdsts |= RGE_TDCMDSTS_EOF;
d->rge_cmdsts = htole32(cmdsts); d->rge_cmdsts = htole32(cmdsts);
bus_dmamap_sync(sc->sc_dmat, q->q_tx.rge_tx_list_map,
cur * sizeof(struct rge_tx_desc), sizeof(struct rge_tx_desc),
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
last = cur; last = cur;
cmdsts = RGE_TDCMDSTS_OWN; cmdsts = RGE_TDCMDSTS_OWN;
cur = RGE_NEXT_TX_DESC(cur); cur = RGE_NEXT_TX_DESC(cur);
} }
/* Set EOF on the last descriptor. */
d->rge_cmdsts |= htole32(RGE_TDCMDSTS_EOF);
/* Transfer ownership of packet to the chip. */ /* Transfer ownership of packet to the chip. */
d = &q->q_tx.rge_tx_list[idx]; d = &q->q_tx.rge_tx_list[idx];
d->rge_cmdsts |= htole32(RGE_TDCMDSTS_OWN); d->rge_cmdsts |= htole32(RGE_TDCMDSTS_OWN);
bus_dmamap_sync(sc->sc_dmat, q->q_tx.rge_tx_list_map, bus_dmamap_sync(sc->sc_dmat, q->q_tx.rge_tx_list_map,
cur * sizeof(struct rge_tx_desc), sizeof(struct rge_tx_desc), idx * sizeof(struct rge_tx_desc), sizeof(struct rge_tx_desc),
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
/* Update info of TX queue and descriptors. */ /* Update info of TX queue and descriptors. */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pci.c,v 1.128 2024/03/18 21:20:46 kettenis Exp $ */ /* $OpenBSD: pci.c,v 1.129 2024/08/10 20:20:50 kettenis Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/* /*
@ -752,8 +752,22 @@ pci_get_powerstate(pci_chipset_tag_t pc, pcitag_t tag)
int int
pci_set_powerstate(pci_chipset_tag_t pc, pcitag_t tag, int state) pci_set_powerstate(pci_chipset_tag_t pc, pcitag_t tag, int state)
{ {
pcireg_t reg; pcireg_t id, reg;
int offset, ostate = state; int offset, ostate = state;
int d3_delay = 10 * 1000;
/* Some AMD Ryzen xHCI controllers need a bit more time to wake up. */
id = pci_conf_read(pc, tag, PCI_ID_REG);
if (PCI_VENDOR(id) == PCI_VENDOR_AMD) {
switch (PCI_PRODUCT(id)) {
case PCI_PRODUCT_AMD_17_1X_XHCI_1:
case PCI_PRODUCT_AMD_17_1X_XHCI_2:
case PCI_PRODUCT_AMD_17_6X_XHCI:
d3_delay = 20 * 1000;
default:
break;
}
}
/* /*
* Warn the firmware that we are going to put the device * Warn the firmware that we are going to put the device
@ -783,7 +797,7 @@ pci_set_powerstate(pci_chipset_tag_t pc, pcitag_t tag, int state)
(reg & ~PCI_PMCSR_STATE_MASK) | state); (reg & ~PCI_PMCSR_STATE_MASK) | state);
if (state == PCI_PMCSR_STATE_D3 || if (state == PCI_PMCSR_STATE_D3 ||
ostate == PCI_PMCSR_STATE_D3) ostate == PCI_PMCSR_STATE_D3)
delay(10 * 1000); delay(d3_delay);
} }
} }

View file

@ -1,4 +1,4 @@
$OpenBSD: pcidevs,v 1.2082 2024/08/09 01:50:16 jsg Exp $ $OpenBSD: pcidevs,v 1.2083 2024/08/10 11:00:14 jsg Exp $
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
/* /*
@ -8964,10 +8964,18 @@ product SANDISK WDSXXXG1X0C 0x5001 WD Black NVMe
product SANDISK WDSXXXG2X0C 0x5002 WD Black NVMe product SANDISK WDSXXXG2X0C 0x5002 WD Black NVMe
product SANDISK PCSN520_1 0x5003 PC SN520 product SANDISK PCSN520_1 0x5003 PC SN520
product SANDISK PCSN520_2 0x5004 PC SN520 product SANDISK PCSN520_2 0x5004 PC SN520
product SANDISK PCSN520_3 0x5005 PC SN520
product SANDISK WDSXXXG3X0C 0x5006 WD Black NVMe product SANDISK WDSXXXG3X0C 0x5006 WD Black NVMe
product SANDISK PCSN530 0x5008 PC SN530 product SANDISK PCSN530 0x5008 PC SN530
product SANDISK NVME_1 0x5009 NVMe
product SANDISK SN850 0x5011 SN850 product SANDISK SN850 0x5011 SN850
product SANDISK PCSN740 0x5015 PC SN740 product SANDISK NVME_2 0x5014 NVMe
product SANDISK PCSN740_1 0x5015 PC SN740
product SANDISK PCSN740_2 0x5016 PC SN740
product SANDISK NVME_3 0x5017 NVMe
product SANDISK SN750 0x501a SN750
product SANDISK SN850X 0x5030 SN850X
product SANDISK SN580 0x5041 SN580
/* Sangoma products */ /* Sangoma products */
product SANGOMA A10X 0x0300 A10x product SANGOMA A10X 0x0300 A10x

View file

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
* *
* generated from: * generated from:
* OpenBSD: pcidevs,v 1.2082 2024/08/09 01:50:16 jsg Exp * OpenBSD: pcidevs,v 1.2083 2024/08/10 11:00:14 jsg Exp
*/ */
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
@ -8969,10 +8969,18 @@
#define PCI_PRODUCT_SANDISK_WDSXXXG2X0C 0x5002 /* WD Black NVMe */ #define PCI_PRODUCT_SANDISK_WDSXXXG2X0C 0x5002 /* WD Black NVMe */
#define PCI_PRODUCT_SANDISK_PCSN520_1 0x5003 /* PC SN520 */ #define PCI_PRODUCT_SANDISK_PCSN520_1 0x5003 /* PC SN520 */
#define PCI_PRODUCT_SANDISK_PCSN520_2 0x5004 /* PC SN520 */ #define PCI_PRODUCT_SANDISK_PCSN520_2 0x5004 /* PC SN520 */
#define PCI_PRODUCT_SANDISK_PCSN520_3 0x5005 /* PC SN520 */
#define PCI_PRODUCT_SANDISK_WDSXXXG3X0C 0x5006 /* WD Black NVMe */ #define PCI_PRODUCT_SANDISK_WDSXXXG3X0C 0x5006 /* WD Black NVMe */
#define PCI_PRODUCT_SANDISK_PCSN530 0x5008 /* PC SN530 */ #define PCI_PRODUCT_SANDISK_PCSN530 0x5008 /* PC SN530 */
#define PCI_PRODUCT_SANDISK_NVME_1 0x5009 /* NVMe */
#define PCI_PRODUCT_SANDISK_SN850 0x5011 /* SN850 */ #define PCI_PRODUCT_SANDISK_SN850 0x5011 /* SN850 */
#define PCI_PRODUCT_SANDISK_PCSN740 0x5015 /* PC SN740 */ #define PCI_PRODUCT_SANDISK_NVME_2 0x5014 /* NVMe */
#define PCI_PRODUCT_SANDISK_PCSN740_1 0x5015 /* PC SN740 */
#define PCI_PRODUCT_SANDISK_PCSN740_2 0x5016 /* PC SN740 */
#define PCI_PRODUCT_SANDISK_NVME_3 0x5017 /* NVMe */
#define PCI_PRODUCT_SANDISK_SN750 0x501a /* SN750 */
#define PCI_PRODUCT_SANDISK_SN850X 0x5030 /* SN850X */
#define PCI_PRODUCT_SANDISK_SN580 0x5041 /* SN580 */
/* Sangoma products */ /* Sangoma products */
#define PCI_PRODUCT_SANGOMA_A10X 0x0300 /* A10x */ #define PCI_PRODUCT_SANGOMA_A10X 0x0300 /* A10x */

View file

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
* *
* generated from: * generated from:
* OpenBSD: pcidevs,v 1.2082 2024/08/09 01:50:16 jsg Exp * OpenBSD: pcidevs,v 1.2083 2024/08/10 11:00:14 jsg Exp
*/ */
/* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */ /* $NetBSD: pcidevs,v 1.30 1997/06/24 06:20:24 thorpej Exp $ */
@ -32331,6 +32331,10 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN520_2, PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN520_2,
"PC SN520", "PC SN520",
}, },
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN520_3,
"PC SN520",
},
{ {
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_WDSXXXG3X0C, PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_WDSXXXG3X0C,
"WD Black NVMe", "WD Black NVMe",
@ -32339,14 +32343,42 @@ static const struct pci_known_product pci_known_products[] = {
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN530, PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN530,
"PC SN530", "PC SN530",
}, },
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_NVME_1,
"NVMe",
},
{ {
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_SN850, PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_SN850,
"SN850", "SN850",
}, },
{ {
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN740, PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_NVME_2,
"NVMe",
},
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN740_1,
"PC SN740", "PC SN740",
}, },
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_PCSN740_2,
"PC SN740",
},
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_NVME_3,
"NVMe",
},
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_SN750,
"SN750",
},
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_SN850X,
"SN850X",
},
{
PCI_VENDOR_SANDISK, PCI_PRODUCT_SANDISK_SN580,
"SN580",
},
{ {
PCI_VENDOR_SANGOMA, PCI_PRODUCT_SANGOMA_A10X, PCI_VENDOR_SANGOMA, PCI_PRODUCT_SANGOMA_A10X,
"A10x", "A10x",

View file

@ -1,4 +1,4 @@
/* $OpenBSD: kern_sig.c,v 1.337 2024/08/06 08:44:54 claudio Exp $ */ /* $OpenBSD: kern_sig.c,v 1.338 2024/08/10 09:18:09 jsg Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/* /*
@ -2146,7 +2146,7 @@ single_thread_set(struct proc *p, int flags)
SCHED_UNLOCK(); SCHED_UNLOCK();
} }
/* count ourselfs out */ /* count ourself out */
--pr->ps_singlecnt; --pr->ps_singlecnt;
mtx_leave(&pr->ps_mtx); mtx_leave(&pr->ps_mtx);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: auth.c,v 1.41 2024/08/09 05:16:13 deraadt Exp $ */ /* $OpenBSD: auth.c,v 1.42 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* auth.c - PPP authentication and phase control. * auth.c - PPP authentication and phase control.
@ -519,7 +519,7 @@ connect_time_expired(void *arg)
* auth_check_options - called to check authentication options. * auth_check_options - called to check authentication options.
*/ */
void void
auth_check_options() auth_check_options(void)
{ {
lcp_options *wo = &lcp_wantoptions[0]; lcp_options *wo = &lcp_wantoptions[0];
int can_auth; int can_auth;
@ -758,7 +758,7 @@ plogin(char *user, char *passwd, char **msg, int *msglen)
* plogout - Logout the user. * plogout - Logout the user.
*/ */
static void static void
plogout() plogout(void)
{ {
char *tty; char *tty;
@ -846,7 +846,7 @@ get_pap_passwd(char *passwd)
* secrets that we could possibly use for authenticating the peer. * secrets that we could possibly use for authenticating the peer.
*/ */
static int static int
have_pap_secret() have_pap_secret(void)
{ {
FILE *f; FILE *f;
int ret; int ret;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: chat.c,v 1.36 2024/08/09 05:16:15 deraadt Exp $ */ /* $OpenBSD: chat.c,v 1.37 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* Chat -- a program for automatic session establishment (i.e. dial * Chat -- a program for automatic session establishment (i.e. dial
@ -407,7 +407,7 @@ do_file(char *chat_file)
/* /*
* We got an error parsing the command line. * We got an error parsing the command line.
*/ */
void usage() void usage(void)
{ {
fprintf(stderr, "\ fprintf(stderr, "\
usage: %s [-eSsVv] [-f chat_file] [-r report_file] [-T phone_number]\n\ usage: %s [-eSsVv] [-f chat_file] [-r report_file] [-T phone_number]\n\
@ -472,7 +472,7 @@ SIGTYPE sigalrm(int signo)
logmsg("alarm"); logmsg("alarm");
} }
void unalarm() void unalarm(void)
{ {
int flags; int flags;
@ -498,7 +498,7 @@ SIGTYPE sighup(int signo)
fatal(2, "SIGHUP"); fatal(2, "SIGHUP");
} }
void init() void init(void)
{ {
signal(SIGINT, sigint); signal(SIGINT, sigint);
signal(SIGTERM, sigterm); signal(SIGTERM, sigterm);
@ -510,7 +510,7 @@ void init()
alarmed = 0; alarmed = 0;
} }
void set_tty_parameters() void set_tty_parameters(void)
{ {
#if defined(get_term_param) #if defined(get_term_param)
term_parms t; term_parms t;
@ -534,7 +534,7 @@ void set_tty_parameters()
#endif #endif
} }
void break_sequence() void break_sequence(void)
{ {
#ifdef TERMIOS #ifdef TERMIOS
tcsendbreak (0, 0); tcsendbreak (0, 0);
@ -1108,7 +1108,7 @@ void chat_send (char *s)
fatal(1, "Failed"); fatal(1, "Failed");
} }
int get_char() int get_char(void)
{ {
int status; int status;
char c; char c;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: demand.c,v 1.12 2024/08/09 05:16:13 deraadt Exp $ */ /* $OpenBSD: demand.c,v 1.13 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* demand.c - Support routines for demand-dialling. * demand.c - Support routines for demand-dialling.
@ -80,7 +80,7 @@ static int active_packet(unsigned char *, int);
* demand_conf - configure the interface for doing dial-on-demand. * demand_conf - configure the interface for doing dial-on-demand.
*/ */
void void
demand_conf() demand_conf(void)
{ {
int i; int i;
struct protent *protp; struct protent *protp;
@ -119,7 +119,7 @@ demand_conf()
* without an error. * without an error.
*/ */
void void
demand_drop() demand_drop(void)
{ {
struct packet *pkt, *nextpkt; struct packet *pkt, *nextpkt;
int i; int i;
@ -146,7 +146,7 @@ demand_drop()
* demand_unblock - set each enabled network protocol to pass packets. * demand_unblock - set each enabled network protocol to pass packets.
*/ */
void void
demand_unblock() demand_unblock(void)
{ {
int i; int i;
struct protent *protp; struct protent *protp;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ipcp.c,v 1.16 2024/08/09 05:16:13 deraadt Exp $ */ /* $OpenBSD: ipcp.c,v 1.17 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* ipcp.c - PPP IP Control Protocol. * ipcp.c - PPP IP Control Protocol.
@ -1048,7 +1048,7 @@ endswitch:
* and assign appropriate defaults. * and assign appropriate defaults.
*/ */
static void static void
ip_check_options() ip_check_options(void)
{ {
struct hostent *hp; struct hostent *hp;
u_int32_t local; u_int32_t local;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: magic.c,v 1.10 2013/09/29 16:24:22 deraadt Exp $ */ /* $OpenBSD: magic.c,v 1.11 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* magic.c - PPP Magic Number routines. * magic.c - PPP Magic Number routines.
@ -59,7 +59,7 @@
* and current time, currently. * and current time, currently.
*/ */
void void
magic_init() magic_init(void)
{ {
} }
@ -67,7 +67,7 @@ magic_init()
* magic - Returns the next magic number. * magic - Returns the next magic number.
*/ */
u_int32_t u_int32_t
magic() magic(void)
{ {
return arc4random(); return arc4random();
} }

View file

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.57 2024/08/09 05:16:13 deraadt Exp $ */ /* $OpenBSD: main.c,v 1.58 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* main.c - Point-to-Point Protocol main module * main.c - Point-to-Point Protocol main module
@ -606,7 +606,7 @@ main(int argc, char *argv[])
* detach - detach us from the controlling terminal. * detach - detach us from the controlling terminal.
*/ */
void void
detach() detach(void)
{ {
if (detached) if (detached)
return; return;
@ -631,7 +631,7 @@ holdoff_end(void *arg)
* get_input - called when incoming data is available. * get_input - called when incoming data is available.
*/ */
static void static void
get_input() get_input(void)
{ {
int len, i; int len, i;
u_char *p; u_char *p;
@ -710,7 +710,7 @@ get_input()
* quit - Clean up state and exit (with an error indication). * quit - Clean up state and exit (with an error indication).
*/ */
void void
quit() quit(void)
{ {
die(1); die(1);
} }
@ -732,7 +732,7 @@ die(int status)
* cleanup - restore anything which needs to be restored before we exit * cleanup - restore anything which needs to be restored before we exit
*/ */
static void static void
cleanup() cleanup(void)
{ {
sys_cleanup(); sys_cleanup();
@ -747,7 +747,7 @@ cleanup()
* close_tty - restore the terminal device and close it. * close_tty - restore the terminal device and close it.
*/ */
static void static void
close_tty() close_tty(void)
{ {
disestablish_ppp(ttyfd); disestablish_ppp(ttyfd);
@ -847,7 +847,7 @@ untimeout(void (*func)(void *), void *arg)
* calltimeout - Call any timeout routines which are now due. * calltimeout - Call any timeout routines which are now due.
*/ */
static void static void
calltimeout() calltimeout(void)
{ {
struct callout *p; struct callout *p;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: options.c,v 1.31 2024/08/09 05:16:13 deraadt Exp $ */ /* $OpenBSD: options.c,v 1.32 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* options.c - handles option processing for PPP. * options.c - handles option processing for PPP.
@ -509,7 +509,7 @@ scan_args(int argc, char **argv)
* usage - print out a message telling how to use the program. * usage - print out a message telling how to use the program.
*/ */
void void
usage() usage(void)
{ {
if (phase == PHASE_INITIALIZE) if (phase == PHASE_INITIALIZE)
fprintf(stderr, usage_string, VERSION, PATCHLEVEL, IMPLEMENTATION, fprintf(stderr, usage_string, VERSION, PATCHLEVEL, IMPLEMENTATION,
@ -623,7 +623,7 @@ err:
* and if so, interpret options from it. * and if so, interpret options from it.
*/ */
int int
options_from_user() options_from_user(void)
{ {
char *user, *path, *file; char *user, *path, *file;
int ret; int ret;
@ -645,7 +645,7 @@ options_from_user()
* device, and if so, interpret options from it. * device, and if so, interpret options from it.
*/ */
int int
options_for_tty() options_for_tty(void)
{ {
char *dev, *path; char *dev, *path;
int ret; int ret;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pppstats.c,v 1.13 2024/08/09 05:16:15 deraadt Exp $ */ /* $OpenBSD: pppstats.c,v 1.14 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* print PPP statistics: * print PPP statistics:
@ -82,7 +82,7 @@ void intpr(void);
int main(int, char *argv[]); int main(int, char *argv[]);
void void
usage() usage(void)
{ {
extern char *__progname; extern char *__progname;
@ -155,7 +155,7 @@ get_ppp_cstats(struct ppp_comp_stats *csp)
* First line printed is cumulative. * First line printed is cumulative.
*/ */
void void
intpr() intpr(void)
{ {
register int line = 0; register int line = 0;
sigset_t oldmask, mask; sigset_t oldmask, mask;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sys-bsd.c,v 1.34 2024/08/09 05:16:13 deraadt Exp $ */ /* $OpenBSD: sys-bsd.c,v 1.35 2024/08/10 05:32:28 jsg Exp $ */
/* /*
* sys-bsd.c - System-dependent procedures for setting up * sys-bsd.c - System-dependent procedures for setting up
@ -147,7 +147,7 @@ static int get_ether_addr(u_int32_t, struct sockaddr_dl *);
* sys_init - System-dependent initialization. * sys_init - System-dependent initialization.
*/ */
void void
sys_init() sys_init(void)
{ {
/* Get an internet socket for doing socket ioctl's on. */ /* Get an internet socket for doing socket ioctl's on. */
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
@ -162,7 +162,7 @@ sys_init()
* This should call die() because it's called from die(). * This should call die() because it's called from die().
*/ */
void void
sys_cleanup() sys_cleanup(void)
{ {
struct ifreq ifr; struct ifreq ifr;
@ -186,7 +186,7 @@ sys_cleanup()
* sys_close - Clean up in a child process before execing. * sys_close - Clean up in a child process before execing.
*/ */
void void
sys_close() sys_close(void)
{ {
close(sockfd); close(sockfd);
if (loop_slave >= 0) { if (loop_slave >= 0) {
@ -199,7 +199,7 @@ sys_close()
* sys_check_options - check the options that the user specified * sys_check_options - check the options that the user specified
*/ */
void void
sys_check_options() sys_check_options(void)
{ {
} }
@ -208,7 +208,7 @@ sys_check_options()
* (in fact we check whether we can do an ioctl on ppp0). * (in fact we check whether we can do an ioctl on ppp0).
*/ */
int int
ppp_available() ppp_available(void)
{ {
int s, ok; int s, ok;
struct ifreq ifr; struct ifreq ifr;
@ -311,7 +311,7 @@ establish_ppp(int fd)
* restore_loop - reattach the ppp unit to the loopback. * restore_loop - reattach the ppp unit to the loopback.
*/ */
void void
restore_loop() restore_loop(void)
{ {
int x; int x;
@ -368,7 +368,7 @@ disestablish_ppp(int fd)
* Check whether the link seems not to be 8-bit clean. * Check whether the link seems not to be 8-bit clean.
*/ */
void void
clean_check() clean_check(void)
{ {
int x; int x;
char *s; char *s;
@ -507,7 +507,7 @@ setdtr(int fd, int on)
* Here we use a pty. * Here we use a pty.
*/ */
void void
open_ppp_loopback() open_ppp_loopback(void)
{ {
int flags; int flags;
struct termios tios; struct termios tios;
@ -676,7 +676,7 @@ read_packet(u_char *buf)
* Return value is 1 if we need to bring up the link, 0 otherwise. * Return value is 1 if we need to bring up the link, 0 otherwise.
*/ */
int int
get_loop_output() get_loop_output(void)
{ {
int rv = 0; int rv = 0;
int n; int n;
@ -1445,7 +1445,7 @@ lock(char *dev)
* unlock - remove our lockfile * unlock - remove our lockfile
*/ */
void void
unlock() unlock(void)
{ {
if (lock_file) { if (lock_file) {
unlink(lock_file); unlink(lock_file);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: parse.y,v 1.256 2024/06/17 08:02:57 sashan Exp $ */ /* $OpenBSD: parse.y,v 1.257 2024/08/10 05:47:29 tb Exp $ */
/* /*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@ -490,7 +490,7 @@ rdr : REDIRECT STRING {
if (strlcpy(srv->conf.name, $2, if (strlcpy(srv->conf.name, $2,
sizeof(srv->conf.name)) >= sizeof(srv->conf.name)) >=
sizeof(srv->conf.name)) { sizeof(srv->conf.name)) {
yyerror("redirection name truncated"); yyerror("redirection name truncated: %s", $2);
free($2); free($2);
free(srv); free(srv);
YYERROR; YYERROR;
@ -628,7 +628,8 @@ rdroptsl : forwardmode TO tablespec interface {
if (strlcpy(rdr->conf.tag, $3, if (strlcpy(rdr->conf.tag, $3,
sizeof(rdr->conf.tag)) >= sizeof(rdr->conf.tag)) >=
sizeof(rdr->conf.tag)) { sizeof(rdr->conf.tag)) {
yyerror("redirection tag name truncated"); yyerror("redirection tag name truncated: %s",
$3);
free($3); free($3);
YYERROR; YYERROR;
} }

View file

@ -1,4 +1,4 @@
/* $OpenBSD: relayd.h,v 1.273 2024/06/17 08:02:57 sashan Exp $ */ /* $OpenBSD: relayd.h,v 1.274 2024/08/10 05:47:29 tb Exp $ */
/* /*
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org> * Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
@ -57,9 +57,7 @@
#define LABEL_NAME_SIZE 1024 #define LABEL_NAME_SIZE 1024
#define TAG_NAME_SIZE 64 #define TAG_NAME_SIZE 64
#define TABLE_NAME_SIZE 64 #define TABLE_NAME_SIZE 64
#define RD_TAG_NAME_SIZE 64
#define RT_LABEL_SIZE 32 #define RT_LABEL_SIZE 32
#define SRV_NAME_SIZE 64
#define MAX_NAME_SIZE 64 #define MAX_NAME_SIZE 64
#define SRV_MAX_VIRTS 16 #define SRV_MAX_VIRTS 16
#define TLS_NAME_SIZE 512 #define TLS_NAME_SIZE 512
@ -545,8 +543,8 @@ struct rdr_config {
objid_t backup_id; objid_t backup_id;
int mode; int mode;
union hashkey key; union hashkey key;
char name[SRV_NAME_SIZE]; char name[PF_TABLE_NAME_SIZE];
char tag[RD_TAG_NAME_SIZE]; char tag[PF_TAG_NAME_SIZE];
struct timeval timeout; struct timeval timeout;
}; };