CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Apr 28 13:30:11 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: usbdevs.h usbdevs_data.h Log Message: Regen for ticket #1837 To generate a diff of this commit: cvs rdiff -u -r1.760.4.13 -r1.760.4.14 src/sys/dev/usb/usbdevs.h \ src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Apr 28 13:29:40 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: uftdi.c usbdevs Log Message: Pull up following revision(s) (requested by maya in ticket #1837): sys/dev/usb/uftdi.c: revision 1.78 sys/dev/usb/usbdevs: revision 1.815 Add some USB serial adapters >From Cameron Williams in PR kern/58127 Add support for a range of USB serial adapters >From Cameron Williams in PR kern/58127 To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.70.2.1 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.770.4.13 -r1.770.4.14 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/uftdi.c diff -u src/sys/dev/usb/uftdi.c:1.70 src/sys/dev/usb/uftdi.c:1.70.2.1 --- src/sys/dev/usb/uftdi.c:1.70 Thu May 9 02:43:35 2019 +++ src/sys/dev/usb/uftdi.c Sun Apr 28 13:29:40 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.70 2019/05/09 02:43:35 mrg Exp $ */ +/* $NetBSD: uftdi.c,v 1.70.2.1 2024/04/28 13:29:40 martin Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.70 2019/05/09 02:43:35 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.70.2.1 2024/04/28 13:29:40 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -122,6 +122,25 @@ struct ucom_methods uftdi_methods = { */ static const struct usb_devno uftdi_devs[] = { { USB_VENDOR_BBELECTRONICS, USB_PRODUCT_BBELECTRONICS_USOTL4 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US101 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US159 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US235 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US257 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US279_12 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US279_34 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US279_56 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US279_78 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US313 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US320 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US324 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US346_12 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US346_34 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US701_12 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US701_34 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US842_12 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US842_34 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US842_56 }, + { USB_VENDOR_BRAINBOXES, USB_PRODUCT_BRAINBOXES_US842_78 }, { USB_VENDOR_FALCOM, USB_PRODUCT_FALCOM_TWIST }, { USB_VENDOR_FALCOM, USB_PRODUCT_FALCOM_SAMBA }, { USB_VENDOR_FTDI, USB_PRODUCT_FTDI_SERIAL_230X }, Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.770.4.13 src/sys/dev/usb/usbdevs:1.770.4.14 --- src/sys/dev/usb/usbdevs:1.770.4.13 Fri Feb 17 17:40:28 2023 +++ src/sys/dev/usb/usbdevs Sun Apr 28 13:29:40 2024 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.770.4.13 2023/02/17 17:40:28 martin Exp $ +$NetBSD: usbdevs,v 1.770.4.14 2024/04/28 13:29:40 martin Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -1110,6 +1110,27 @@ product BILLIONTON USBEL100 0x0988 USB10 product BILLIONTON USBE100 0x8511 USBE100 product BILLIONTON USB2AR 0x90ff USB2AR Ethernet +/* Brainboxes Limited products */ +product BRAINBOXES US101 0x1011 US-101 USB2Serial 1xRS232 +product BRAINBOXES US159 0x1021 US-159 USB2Serial 1xRS232 +product BRAINBOXES US235 0x1017 US-235 USB2Serial 1xRS232 +product BRAINBOXES US257 0x5001 US-257 USB2Serial 2xRS232 +product BRAINBOXES US279_12 0x2021 US-279 USB2Serial 8xRS232 (Port 1 and 2) +product BRAINBOXES US279_34 0x2022 US-279 USB2Serial 8xRS232 (Port 3 and 4) +product BRAINBOXES US279_56 0x2023 US-279 USB2Serial 8xRS232 (Port 5 and 6) +product BRAINBOXES US279_78 0x2024 US-279 USB2Serial 8xRS232 (Port 7 and 8) +product BRAINBOXES US313 0x6001 US-313 USB2Serial 2xRS422/485 +product BRAINBOXES US320 0x1019 US-320 USB2Serial 1xRS422/485 +product BRAINBOXES US324 0x1013 US-324 USB2Serial 1xRS422/485 +product BRAINBOXES US346_12 0x3011 US-346 USB2Serial 4xRS422/485 (Port 1 and 2) +product BRAINBOXES US346_34 0x3012 US-346 USB2Serial 4xRS422/485 (Port 3 and 4) +product BRAINBOXES US701_12 0x2011 US-701 USB2Serial 4xRS232 (Port 1 and 2) +product BRAINBOXES US701_34 0x2012 US-701 USB2Serial 4xRS232 (Port 3 and 4) +product BRAINBOXES US842_12 0x8001 US-842 USB2Serial 8xRS422/485 (Port 1 and 2) +product BRAINBOXES US842_34 0x8002 US-842 USB2Serial 8xRS422/485 (Port 3 and 4) +product BRAINBOXES US842_56 0x8003 US-842 USB2Serial 8xRS422/485 (Port 5 and 6) +product BRAINBOXES US842_78 0x8004 US-842 USB2Serial 8xRS422/485 (Port 7 and 8) + /* Broadcom products */ product BROADCOM BCMFW 0x0bdc BCMFW product BROADCOM
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Apr 28 13:29:40 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: uftdi.c usbdevs Log Message: Pull up following revision(s) (requested by maya in ticket #1837): sys/dev/usb/uftdi.c: revision 1.78 sys/dev/usb/usbdevs: revision 1.815 Add some USB serial adapters >From Cameron Williams in PR kern/58127 Add support for a range of USB serial adapters >From Cameron Williams in PR kern/58127 To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.70.2.1 src/sys/dev/usb/uftdi.c cvs rdiff -u -r1.770.4.13 -r1.770.4.14 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Apr 28 10:14:18 UTC 2024 Modified Files: src/sys/netinet6 [netbsd-9]: frag6.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1836): sys/netinet6/frag6.c: revision 1.78 frag6: fix calculation of fragment length Because of the miscalculation, 32 bytes fragmented IPv6 packets have been wrongly dropped. See https://mail-index.netbsd.org/tech-net/2024/04/14/msg008741.html for more details. Patch from Yasuyuki KOZAKAI (with minor tweaks) To generate a diff of this commit: cvs rdiff -u -r1.74.6.1 -r1.74.6.2 src/sys/netinet6/frag6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/frag6.c diff -u src/sys/netinet6/frag6.c:1.74.6.1 src/sys/netinet6/frag6.c:1.74.6.2 --- src/sys/netinet6/frag6.c:1.74.6.1 Thu Oct 27 16:06:24 2022 +++ src/sys/netinet6/frag6.c Sun Apr 28 10:14:18 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: frag6.c,v 1.74.6.1 2022/10/27 16:06:24 martin Exp $ */ +/* $NetBSD: frag6.c,v 1.74.6.2 2024/04/28 10:14:18 martin Exp $ */ /* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.74.6.1 2022/10/27 16:06:24 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.74.6.2 2024/04/28 10:14:18 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -197,9 +197,10 @@ frag6_input(struct mbuf **mp, int *offp, * sizeof(struct ip6_frag) == 8 * sizeof(struct ip6_hdr) = 40 */ - if ((ip6f->ip6f_offlg & IP6F_MORE_FRAG) && - (((ntohs(ip6->ip6_plen) - offset) == 0) || - ((ntohs(ip6->ip6_plen) - offset) & 0x7) != 0)) { + frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset + - sizeof(struct ip6_frag); + if ((frgpartlen == 0) || + ((ip6f->ip6f_offlg & IP6F_MORE_FRAG) && (frgpartlen & 0x7) != 0)) { icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offsetof(struct ip6_hdr, ip6_plen)); in6_ifstat_inc(dstifp, ifs6_reass_fail); @@ -307,7 +308,6 @@ frag6_input(struct mbuf **mp, int *offp, * in size. If it would exceed, discard the fragment and return an * ICMP error. */ - frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; if (q6->ip6q_unfrglen >= 0) { /* The 1st fragment has already arrived. */ if (q6->ip6q_unfrglen + fragoff + frgpartlen > IPV6_MAXPACKET) {
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Apr 28 10:14:18 UTC 2024 Modified Files: src/sys/netinet6 [netbsd-9]: frag6.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1836): sys/netinet6/frag6.c: revision 1.78 frag6: fix calculation of fragment length Because of the miscalculation, 32 bytes fragmented IPv6 packets have been wrongly dropped. See https://mail-index.netbsd.org/tech-net/2024/04/14/msg008741.html for more details. Patch from Yasuyuki KOZAKAI (with minor tweaks) To generate a diff of this commit: cvs rdiff -u -r1.74.6.1 -r1.74.6.2 src/sys/netinet6/frag6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Thu Apr 18 16:40:17 UTC 2024 Modified Files: src/sys/arch/x86/x86 [netbsd-9]: viac7temp.c Log Message: Pull up following revision(s) (requested by andvar in ticket #1835): sys/arch/x86/x86/viac7temp.c: revision 1.10 viac7temp(4): define module metadata using MODULE() macro and implement viac7temp_modcmd() to handle module load/unload events. Fixes PR kern/58148. Look OK by mrg@. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.32.1 src/sys/arch/x86/x86/viac7temp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/viac7temp.c diff -u src/sys/arch/x86/x86/viac7temp.c:1.8 src/sys/arch/x86/x86/viac7temp.c:1.8.32.1 --- src/sys/arch/x86/x86/viac7temp.c:1.8 Sun Aug 10 16:44:34 2014 +++ src/sys/arch/x86/x86/viac7temp.c Thu Apr 18 16:40:17 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: viac7temp.c,v 1.8 2014/08/10 16:44:34 tls Exp $ */ +/* $NetBSD: viac7temp.c,v 1.8.32.1 2024/04/18 16:40:17 martin Exp $ */ /*- * Copyright (c) 2009 Jared D. McNeill @@ -27,11 +27,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.8 2014/08/10 16:44:34 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.8.32.1 2024/04/18 16:40:17 martin Exp $"); #include #include #include +#include #include #include @@ -162,3 +163,32 @@ viac7temp_refresh_xcall(void *arg0, void edata->value_cur += 27315; edata->state = ENVSYS_SVALID; } + +MODULE(MODULE_CLASS_DRIVER, viac7temp, NULL); + +#ifdef _MODULE +#include "ioconf.c" +#endif + +static int +viac7temp_modcmd(modcmd_t cmd, void *arg __unused) +{ + int error = 0; + + switch (cmd) { + case MODULE_CMD_INIT: +#ifdef _MODULE + error = config_init_component(cfdriver_ioconf_viac7temp, + cfattach_ioconf_viac7temp, cfdata_ioconf_viac7temp); +#endif + return error; + case MODULE_CMD_FINI: +#ifdef _MODULE + error = config_fini_component(cfdriver_ioconf_viac7temp, + cfattach_ioconf_viac7temp, cfdata_ioconf_viac7temp); +#endif + return error; + default: + return ENOTTY; + } +}
CVS commit: [netbsd-9] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Thu Apr 18 16:40:17 UTC 2024 Modified Files: src/sys/arch/x86/x86 [netbsd-9]: viac7temp.c Log Message: Pull up following revision(s) (requested by andvar in ticket #1835): sys/arch/x86/x86/viac7temp.c: revision 1.10 viac7temp(4): define module metadata using MODULE() macro and implement viac7temp_modcmd() to handle module load/unload events. Fixes PR kern/58148. Look OK by mrg@. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.32.1 src/sys/arch/x86/x86/viac7temp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/stand/efiboot
Module Name:src Committed By: martin Date: Thu Apr 18 15:33:44 UTC 2024 Modified Files: src/sys/stand/efiboot [netbsd-9]: efiboot.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1828): sys/stand/efiboot/efiboot.c: revision 1.23 efiboot: Duplicate efi_bootdp before we clobber it in efi_net_probe. Patch from jakllsch@. Makes Socionext Synquacer boot considerably more reliably. PR kern/58075 To generate a diff of this commit: cvs rdiff -u -r1.16.4.1 -r1.16.4.2 src/sys/stand/efiboot/efiboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/stand/efiboot/efiboot.c diff -u src/sys/stand/efiboot/efiboot.c:1.16.4.1 src/sys/stand/efiboot/efiboot.c:1.16.4.2 --- src/sys/stand/efiboot/efiboot.c:1.16.4.1 Thu Sep 26 19:15:18 2019 +++ src/sys/stand/efiboot/efiboot.c Thu Apr 18 15:33:44 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: efiboot.c,v 1.16.4.1 2019/09/26 19:15:18 martin Exp $ */ +/* $NetBSD: efiboot.c,v 1.16.4.2 2024/04/18 15:33:44 martin Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -84,6 +84,8 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYS status = uefi_call_wrapper(BS->HandleProtocol, 3, efi_li->DeviceHandle, , (void **)_bootdp); if (EFI_ERROR(status)) efi_bootdp = NULL; + else + efi_bootdp = DuplicateDevicePath(efi_bootdp); #ifdef EFIBOOT_DEBUG Print(L"Loaded image : 0x%" PRIxEFIPTR "\n", efi_li);
CVS commit: [netbsd-9] src/sys/stand/efiboot
Module Name:src Committed By: martin Date: Thu Apr 18 15:33:44 UTC 2024 Modified Files: src/sys/stand/efiboot [netbsd-9]: efiboot.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1828): sys/stand/efiboot/efiboot.c: revision 1.23 efiboot: Duplicate efi_bootdp before we clobber it in efi_net_probe. Patch from jakllsch@. Makes Socionext Synquacer boot considerably more reliably. PR kern/58075 To generate a diff of this commit: cvs rdiff -u -r1.16.4.1 -r1.16.4.2 src/sys/stand/efiboot/efiboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Wed Apr 17 16:24:26 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_iwn.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1825): sys/dev/pci/if_iwn.c: revision 1.100 if_iwn.c: pick up proper firmware for Centrino Wireless-N 130 Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It seems only two specific product variants use iwlwifi-6000g2a-6. We could simplify by reversing the sense of the test, as OpenBSD does, but it doesn't seem to matter much, as what we now match seems to be the full gamut possible, so the simpler diff was chosen here.) Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code inspection of the FreeBSD driver indicates we should safely be able to match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.91.4.1 src/sys/dev/pci/if_iwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_iwn.c diff -u src/sys/dev/pci/if_iwn.c:1.91 src/sys/dev/pci/if_iwn.c:1.91.4.1 --- src/sys/dev/pci/if_iwn.c:1.91 Fri Apr 19 19:37:31 2019 +++ src/sys/dev/pci/if_iwn.c Wed Apr 17 16:24:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwn.c,v 1.91 2019/04/19 19:37:31 gutteridge Exp $ */ +/* $NetBSD: if_iwn.c,v 1.91.4.1 2024/04/17 16:24:26 martin Exp $ */ /* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */ /*- @@ -22,7 +22,7 @@ * adapters. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.91 2019/04/19 19:37:31 gutteridge Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.91.4.1 2024/04/17 16:24:26 martin Exp $"); #define IWN_USE_RBUF /* Use local storage for RX */ #undef IWN_HWCRYPTO /* XXX does not even compile yet */ @@ -775,6 +775,8 @@ iwn5000_attach(struct iwn_softc *sc, pci /* Type 6030 cards return IWN_HW_REV_TYPE_6005 */ if (pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_1 || pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_2 || + pid == PCI_PRODUCT_INTEL_WIFI_LINK_130_1 || + pid == PCI_PRODUCT_INTEL_WIFI_LINK_130_2 || pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_1 || pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_2 || pid == PCI_PRODUCT_INTEL_WIFI_LINK_6235 ||
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Wed Apr 17 16:24:26 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_iwn.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1825): sys/dev/pci/if_iwn.c: revision 1.100 if_iwn.c: pick up proper firmware for Centrino Wireless-N 130 Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It seems only two specific product variants use iwlwifi-6000g2a-6. We could simplify by reversing the sense of the test, as OpenBSD does, but it doesn't seem to matter much, as what we now match seems to be the full gamut possible, so the simpler diff was chosen here.) Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code inspection of the FreeBSD driver indicates we should safely be able to match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.91.4.1 src/sys/dev/pci/if_iwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/qbus
Module Name:src Committed By: martin Date: Mon Mar 25 15:35:50 UTC 2024 Modified Files: src/sys/dev/qbus [netbsd-9]: if_qe.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1822): sys/dev/qbus/if_qe.c: revision 1.82 vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash. convert the existing qeinit() to one compatible with if_init. should fix PR#58068. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/dev/qbus/if_qe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/qbus/if_qe.c diff -u src/sys/dev/qbus/if_qe.c:1.81 src/sys/dev/qbus/if_qe.c:1.81.2.1 --- src/sys/dev/qbus/if_qe.c:1.81 Tue May 28 07:41:49 2019 +++ src/sys/dev/qbus/if_qe.c Mon Mar 25 15:35:50 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_qe.c,v 1.81 2019/05/28 07:41:49 msaitoh Exp $ */ +/* $NetBSD: if_qe.c,v 1.81.2.1 2024/03/25 15:35:50 martin Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.81 2019/05/28 07:41:49 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.81.2.1 2024/03/25 15:35:50 martin Exp $"); #include "opt_inet.h" @@ -97,7 +97,7 @@ struct qe_softc { static int qematch(device_t, cfdata_t, void *); static void qeattach(device_t, device_t, void *); -static void qeinit(struct qe_softc *); +static int qeinit(struct ifnet *); static void qestart(struct ifnet *); static void qeintr(void *); static int qeioctl(struct ifnet *, u_long, void *); @@ -341,6 +341,7 @@ qeattach(device_t parent, device_t self, ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = qestart; + ifp->if_init = qeinit; ifp->if_ioctl = qeioctl; ifp->if_watchdog = qetimeout; IFQ_SET_READY(>if_snd); @@ -381,10 +382,10 @@ qeattach(device_t parent, device_t self, /* * Initialization of interface. */ -void -qeinit(struct qe_softc *sc) +int +qeinit(struct ifnet *ifp) { - struct ifnet *ifp = (struct ifnet *)>sc_if; + struct qe_softc *sc = ifp->if_softc; struct qe_cdata *qc = sc->sc_qedata; int i; @@ -411,7 +412,6 @@ qeinit(struct qe_softc *sc) qc->qc_xmit[i].qe_status1 = qc->qc_xmit[i].qe_flag = QE_NOTYET; } - /* * Init receive descriptors. */ @@ -436,6 +436,7 @@ qeinit(struct qe_softc *sc) */ qe_setup(sc); + return 0; } /* @@ -651,7 +652,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v switch (ifa->ifa_addr->sa_family) { #ifdef INET case AF_INET: - qeinit(sc); + qeinit(ifp); arp_ifinit(ifp, ifa); break; #endif @@ -677,7 +678,7 @@ qeioctl(struct ifnet *ifp, u_long cmd, v * If interface it marked up and it is stopped, then * start it. */ - qeinit(sc); + qeinit(ifp); break; case IFF_UP | IFF_RUNNING: /* @@ -868,5 +869,5 @@ qetimeout(struct ifnet *ifp) * Do a reset of interface, to get it going again. * Will it work by just restart the transmit logic? */ - qeinit(sc); + qeinit(ifp); }
CVS commit: [netbsd-9] src/sys/dev/qbus
Module Name:src Committed By: martin Date: Mon Mar 25 15:35:50 UTC 2024 Modified Files: src/sys/dev/qbus [netbsd-9]: if_qe.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1822): sys/dev/qbus/if_qe.c: revision 1.82 vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash. convert the existing qeinit() to one compatible with if_init. should fix PR#58068. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/dev/qbus/if_qe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Tue Mar 12 12:34:50 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: usbdi.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1807): sys/dev/usb/usbdi.c: revision 1.248 usbdi(9): Avoid calling ubm_softint with lock held and polling on. PR kern/57783 To generate a diff of this commit: cvs rdiff -u -r1.182.4.5 -r1.182.4.6 src/sys/dev/usb/usbdi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdi.c diff -u src/sys/dev/usb/usbdi.c:1.182.4.5 src/sys/dev/usb/usbdi.c:1.182.4.6 --- src/sys/dev/usb/usbdi.c:1.182.4.5 Sat Jul 18 15:09:28 2020 +++ src/sys/dev/usb/usbdi.c Tue Mar 12 12:34:50 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.182.4.5 2020/07/18 15:09:28 martin Exp $ */ +/* $NetBSD: usbdi.c,v 1.182.4.6 2024/03/12 12:34:50 martin Exp $ */ /* * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.182.4.5 2020/07/18 15:09:28 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.182.4.6 2024/03/12 12:34:50 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1229,14 +1229,34 @@ usbd_dopoll(struct usbd_interface *iface void usbd_set_polling(struct usbd_device *dev, int on) { - if (on) - dev->ud_bus->ub_usepolling++; - else - dev->ud_bus->ub_usepolling--; - /* Kick the host controller when switching modes */ mutex_enter(dev->ud_bus->ub_lock); - dev->ud_bus->ub_methods->ubm_softint(dev->ud_bus); + if (on) { + /* + * Enabling polling. If we're enabling for the first + * time, call the softint routine on transition while + * we hold the lock and polling is still disabled, and + * then enable polling -- once polling is enabled, we + * must not hold the lock when we call the softint + * routine. + */ + KASSERT(dev->ud_bus->ub_usepolling < __type_max(char)); + if (dev->ud_bus->ub_usepolling == 0) + dev->ud_bus->ub_methods->ubm_softint(dev->ud_bus); + dev->ud_bus->ub_usepolling++; + } else { + /* + * Disabling polling. If we're disabling polling for + * the last time, disable polling first and then call + * the softint routine while we hold the lock -- until + * polling is disabled, we must not hold the lock when + * we call the softint routine. + */ + KASSERT(dev->ud_bus->ub_usepolling > 0); + dev->ud_bus->ub_usepolling--; + if (dev->ud_bus->ub_usepolling == 0) + dev->ud_bus->ub_methods->ubm_softint(dev->ud_bus); + } mutex_exit(dev->ud_bus->ub_lock); }
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Tue Mar 12 12:34:50 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: usbdi.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1807): sys/dev/usb/usbdi.c: revision 1.248 usbdi(9): Avoid calling ubm_softint with lock held and polling on. PR kern/57783 To generate a diff of this commit: cvs rdiff -u -r1.182.4.5 -r1.182.4.6 src/sys/dev/usb/usbdi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/ic
Module Name:src Committed By: martin Date: Tue Mar 12 09:59:31 UTC 2024 Modified Files: src/sys/dev/ic [netbsd-9]: nvme.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1817): sys/dev/ic/nvme.c: revision 1.69 nvme(4): Disestablish admin q interrupt while suspended. And re-establish on resume. Fixes nvmectl(8) after a suspend/resume cycle on some systems. Adapted from a patch by mrg@. PR kern/58025 To generate a diff of this commit: cvs rdiff -u -r1.44.2.6 -r1.44.2.7 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/nvme.c diff -u src/sys/dev/ic/nvme.c:1.44.2.6 src/sys/dev/ic/nvme.c:1.44.2.7 --- src/sys/dev/ic/nvme.c:1.44.2.6 Mon Jun 21 17:25:48 2021 +++ src/sys/dev/ic/nvme.c Tue Mar 12 09:59:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: nvme.c,v 1.44.2.6 2021/06/21 17:25:48 martin Exp $ */ +/* $NetBSD: nvme.c,v 1.44.2.7 2024/03/12 09:59:31 martin Exp $ */ /* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.6 2021/06/21 17:25:48 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.7 2024/03/12 09:59:31 martin Exp $"); #include #include @@ -552,7 +552,6 @@ nvme_detach(struct nvme_softc *sc, int f return error; /* from now on we are committed to detach, following will never fail */ - sc->sc_intr_disestablish(sc, NVME_ADMIN_Q); for (i = 0; i < sc->sc_nq; i++) nvme_q_free(sc, sc->sc_q[i]); kmem_free(sc->sc_q, sizeof(*sc->sc_q) * sc->sc_nq); @@ -582,6 +581,11 @@ nvme_resume(struct nvme_softc *sc) } nvme_q_reset(sc, sc->sc_admin_q); + if (sc->sc_intr_establish(sc, NVME_ADMIN_Q, sc->sc_admin_q)) { + error = EIO; + device_printf(sc->sc_dev, "unable to establish admin q\n"); + goto disable; + } error = nvme_enable(sc, ffs(sc->sc_mps) - 1); if (error) { @@ -643,6 +647,8 @@ nvme_shutdown(struct nvme_softc *sc) if (disabled) goto disable; + sc->sc_intr_disestablish(sc, NVME_ADMIN_Q); + cc = nvme_read4(sc, NVME_CC); CLR(cc, NVME_CC_SHN_MASK); SET(cc, NVME_CC_SHN(NVME_CC_SHN_NORMAL));
CVS commit: [netbsd-9] src/sys/dev/ic
Module Name:src Committed By: martin Date: Tue Mar 12 09:59:31 UTC 2024 Modified Files: src/sys/dev/ic [netbsd-9]: nvme.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1817): sys/dev/ic/nvme.c: revision 1.69 nvme(4): Disestablish admin q interrupt while suspended. And re-establish on resume. Fixes nvmectl(8) after a suspend/resume cycle on some systems. Adapted from a patch by mrg@. PR kern/58025 To generate a diff of this commit: cvs rdiff -u -r1.44.2.6 -r1.44.2.7 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/net
Module Name:src Committed By: martin Date: Mon Mar 11 19:30:06 UTC 2024 Modified Files: src/sys/net [netbsd-9]: if_tun.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1815): sys/net/if_tun.c: revision 1.175 tun(4): Allow IPv6 packets with TUNSLMODE configured. PR kern/58013 To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.156.2.1 src/sys/net/if_tun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_tun.c diff -u src/sys/net/if_tun.c:1.156 src/sys/net/if_tun.c:1.156.2.1 --- src/sys/net/if_tun.c:1.156 Fri Apr 26 08:38:25 2019 +++ src/sys/net/if_tun.c Mon Mar 11 19:30:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tun.c,v 1.156 2019/04/26 08:38:25 pgoyette Exp $ */ +/* $NetBSD: if_tun.c,v 1.156.2.1 2024/03/11 19:30:06 martin Exp $ */ /* * Copyright (c) 1988, Julian Onions @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.156 2019/04/26 08:38:25 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.156.2.1 2024/03/11 19:30:06 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -586,9 +586,7 @@ tun_output(struct ifnet *ifp, struct mbu goto out; } memcpy(mtod(m0, char *), dst, dst->sa_len); - } - - if (tp->tun_flags & TUN_IFHEAD) { + } else if (tp->tun_flags & TUN_IFHEAD) { /* Prepend the address family */ M_PREPEND(m0, sizeof(*af), M_DONTWAIT); if (m0 == NULL) {
CVS commit: [netbsd-9] src/sys/net
Module Name:src Committed By: martin Date: Mon Mar 11 19:30:06 UTC 2024 Modified Files: src/sys/net [netbsd-9]: if_tun.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1815): sys/net/if_tun.c: revision 1.175 tun(4): Allow IPv6 packets with TUNSLMODE configured. PR kern/58013 To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.156.2.1 src/sys/net/if_tun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Mon Mar 11 18:01:48 UTC 2024 Modified Files: src/sys/kern [netbsd-9]: sysv_shm.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1814): sys/kern/sysv_shm.c: revision 1.142 Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and shmall (pages) values aligned and use arithmetic everywhere instead of shifts. Should fix PR 57979 To generate a diff of this commit: cvs rdiff -u -r1.135.2.4 -r1.135.2.5 src/sys/kern/sysv_shm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Mon Mar 11 18:01:48 UTC 2024 Modified Files: src/sys/kern [netbsd-9]: sysv_shm.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1814): sys/kern/sysv_shm.c: revision 1.142 Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and shmall (pages) values aligned and use arithmetic everywhere instead of shifts. Should fix PR 57979 To generate a diff of this commit: cvs rdiff -u -r1.135.2.4 -r1.135.2.5 src/sys/kern/sysv_shm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sysv_shm.c diff -u src/sys/kern/sysv_shm.c:1.135.2.4 src/sys/kern/sysv_shm.c:1.135.2.5 --- src/sys/kern/sysv_shm.c:1.135.2.4 Thu Oct 10 17:23:45 2019 +++ src/sys/kern/sysv_shm.c Mon Mar 11 18:01:48 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: sysv_shm.c,v 1.135.2.4 2019/10/10 17:23:45 martin Exp $ */ +/* $NetBSD: sysv_shm.c,v 1.135.2.5 2024/03/11 18:01:48 martin Exp $ */ /*- * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.135.2.4 2019/10/10 17:23:45 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.135.2.5 2024/03/11 18:01:48 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_sysv.h" @@ -961,10 +961,10 @@ shminit(struct sysctllog **clog) ALIGN(shminfo.shmmni * sizeof(struct shmid_ds))); if (shminfo.shmmax == 0) - shminfo.shmmax = uimax(physmem / 4, 1024) * PAGE_SIZE; + shminfo.shmall = uimax(physmem / 4, 1024); else - shminfo.shmmax *= PAGE_SIZE; - shminfo.shmall = shminfo.shmmax / PAGE_SIZE; + shminfo.shmall = shminfo.shmmax / PAGE_SIZE; + shminfo.shmmax = (uint64_t)shminfo.shmall * PAGE_SIZE; for (i = 0; i < shminfo.shmmni; i++) { cv_init(_cv[i], "shmwait"); @@ -1087,7 +1087,7 @@ sysctl_ipc_shmmax(SYSCTLFN_ARGS) return EINVAL; shminfo.shmmax = round_page(newsize); - shminfo.shmall = shminfo.shmmax >> PAGE_SHIFT; + shminfo.shmall = shminfo.shmmax / PAGE_SIZE; return 0; }
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Mar 10 19:12:05 UTC 2024 Modified Files: src/sys/netinet6 [netbsd-9]: in6.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1812): sys/netinet6/in6.c: revision 1.292 netinet6: Avoid NPD on `ifconfig ifN inet6 ... pltime 0 vltime 0'. PR kern/53922 To generate a diff of this commit: cvs rdiff -u -r1.275.2.2 -r1.275.2.3 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.275.2.2 src/sys/netinet6/in6.c:1.275.2.3 --- src/sys/netinet6/in6.c:1.275.2.2 Fri Aug 4 14:29:44 2023 +++ src/sys/netinet6/in6.c Sun Mar 10 19:12:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.275.2.2 2023/08/04 14:29:44 martin Exp $ */ +/* $NetBSD: in6.c,v 1.275.2.3 2024/03/10 19:12:05 martin Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.275.2.2 2023/08/04 14:29:44 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.275.2.3 2024/03/10 19:12:05 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -707,7 +707,14 @@ in6_control1(struct socket *so, u_long c int s = splsoftnet(); error = in6_update_ifa1(ifp, ifra, , , 0); splx(s); - if (error) + /* + * in6_update_ifa1 doesn't create the address if its + * valid lifetime (vltime) is zero, since we would just + * delete the address immediately in that case anyway. + * So it may succeed but return null ia. In that case, + * nothing left to do. + */ + if (error || ia == NULL) break; pfil_run_addrhooks(if_pfil, cmd, >ia_ifa); break;
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Mar 10 19:12:05 UTC 2024 Modified Files: src/sys/netinet6 [netbsd-9]: in6.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1812): sys/netinet6/in6.c: revision 1.292 netinet6: Avoid NPD on `ifconfig ifN inet6 ... pltime 0 vltime 0'. PR kern/53922 To generate a diff of this commit: cvs rdiff -u -r1.275.2.2 -r1.275.2.3 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Mar 10 18:59:19 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: if_urtwn.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1810): sys/dev/usb/if_urtwn.c: revision 1.109 (patch) urtwn(4): Ditch old queued commands on overflow. Don't increment ring->queued past what the task will decrement. This is a stop-gap measure; really, we should just have one task for each operation that is deferred to the task thread. PR kern/57965 To generate a diff of this commit: cvs rdiff -u -r1.71.2.6 -r1.71.2.7 src/sys/dev/usb/if_urtwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.71.2.6 src/sys/dev/usb/if_urtwn.c:1.71.2.7 --- src/sys/dev/usb/if_urtwn.c:1.71.2.6 Sat Oct 23 11:21:54 2021 +++ src/sys/dev/usb/if_urtwn.c Sun Mar 10 18:59:19 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.71.2.6 2021/10/23 11:21:54 martin Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.71.2.7 2024/03/10 18:59:19 martin Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.71.2.6 2021/10/23 11:21:54 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.71.2.7 2024/03/10 18:59:19 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -833,6 +833,24 @@ urtwn_tx_beacon(struct urtwn_softc *sc, } static void +urtwn_cmdq_invariants(struct urtwn_softc *sc) +{ + struct urtwn_host_cmd_ring *const ring __diagused = >cmdq; + + KASSERT(mutex_owned(>sc_task_mtx)); + KASSERTMSG((ring->cur >= 0 && ring->cur < URTWN_HOST_CMD_RING_COUNT), + "%s: cur=%d next=%d queued=%d", + device_xname(sc->sc_dev), ring->cur, ring->next, ring->queued); + KASSERTMSG((ring->next >= 0 && ring->next < URTWN_HOST_CMD_RING_COUNT), + "%s: cur=%d next=%d queued=%d", + device_xname(sc->sc_dev), ring->cur, ring->next, ring->queued); + KASSERTMSG((ring->queued >= 0 && + ring->queued <= URTWN_HOST_CMD_RING_COUNT), + "%s: %d commands queued", + device_xname(sc->sc_dev), ring->queued); +} + +static void urtwn_task(void *arg) { struct urtwn_softc *sc = arg; @@ -865,7 +883,11 @@ urtwn_task(void *arg) /* Process host commands. */ s = splusb(); mutex_spin_enter(>sc_task_mtx); + urtwn_cmdq_invariants(sc); while (ring->next != ring->cur) { + KASSERTMSG(ring->queued > 0, "%s: cur=%d next=%d queued=%d", + device_xname(sc->sc_dev), + ring->cur, ring->next, ring->queued); cmd = >cmd[ring->next]; mutex_spin_exit(>sc_task_mtx); splx(s); @@ -873,6 +895,10 @@ urtwn_task(void *arg) cmd->cb(sc, cmd->data); s = splusb(); mutex_spin_enter(>sc_task_mtx); + urtwn_cmdq_invariants(sc); + KASSERTMSG(ring->queued > 0, "%s: cur=%d next=%d queued=%d", + device_xname(sc->sc_dev), + ring->cur, ring->next, ring->queued); ring->queued--; ring->next = (ring->next + 1) % URTWN_HOST_CMD_RING_COUNT; } @@ -887,6 +913,7 @@ urtwn_do_async(struct urtwn_softc *sc, v { struct urtwn_host_cmd_ring *ring = >cmdq; struct urtwn_host_cmd *cmd; + bool schedtask = false; int s; DPRINTFN(DBG_FN, ("%s: %s: cb=%p, arg=%p, len=%d\n", @@ -894,19 +921,27 @@ urtwn_do_async(struct urtwn_softc *sc, v s = splusb(); mutex_spin_enter(>sc_task_mtx); + urtwn_cmdq_invariants(sc); cmd = >cmd[ring->cur]; cmd->cb = cb; KASSERT(len <= sizeof(cmd->data)); memcpy(cmd->data, arg, len); ring->cur = (ring->cur + 1) % URTWN_HOST_CMD_RING_COUNT; - /* If there is no pending command already, schedule a task. */ - if (!sc->sc_dying && ++ring->queued == 1) { - mutex_spin_exit(>sc_task_mtx); - usb_add_task(sc->sc_udev, >sc_task, USB_TASKQ_DRIVER); - } else - mutex_spin_exit(>sc_task_mtx); + /* + * Schedule a task to process the command if need be. + */ + if (!sc->sc_dying) { + if (ring->queued == URTWN_HOST_CMD_RING_COUNT) + device_printf(sc->sc_dev, "command queue overflow\n"); + else if (ring->queued++ == 0) + schedtask = true; + } + mutex_spin_exit(>sc_task_mtx); splx(s); + + if (schedtask) + usb_add_task(sc->sc_udev, >sc_task, USB_TASKQ_DRIVER); } static void
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Mar 10 18:59:19 UTC 2024 Modified Files: src/sys/dev/usb [netbsd-9]: if_urtwn.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1810): sys/dev/usb/if_urtwn.c: revision 1.109 (patch) urtwn(4): Ditch old queued commands on overflow. Don't increment ring->queued past what the task will decrement. This is a stop-gap measure; really, we should just have one task for each operation that is deferred to the task thread. PR kern/57965 To generate a diff of this commit: cvs rdiff -u -r1.71.2.6 -r1.71.2.7 src/sys/dev/usb/if_urtwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Mar 10 18:54:41 UTC 2024 Modified Files: src/sys/netinet6 [netbsd-9]: icmp6.c raw_ip6.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1809): sys/netinet6/raw_ip6.c: revision 1.184 (patch) sys/netinet6/icmp6.c: revision 1.256 (patch) Deliver timestamps also to raw sockets. Fixes PR 57955 To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.242.4.1 src/sys/netinet6/icmp6.c cvs rdiff -u -r1.175.4.1 -r1.175.4.2 src/sys/netinet6/raw_ip6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Mar 10 18:54:41 UTC 2024 Modified Files: src/sys/netinet6 [netbsd-9]: icmp6.c raw_ip6.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1809): sys/netinet6/raw_ip6.c: revision 1.184 (patch) sys/netinet6/icmp6.c: revision 1.256 (patch) Deliver timestamps also to raw sockets. Fixes PR 57955 To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.242.4.1 src/sys/netinet6/icmp6.c cvs rdiff -u -r1.175.4.1 -r1.175.4.2 src/sys/netinet6/raw_ip6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/icmp6.c diff -u src/sys/netinet6/icmp6.c:1.242 src/sys/netinet6/icmp6.c:1.242.4.1 --- src/sys/netinet6/icmp6.c:1.242 Sat Dec 22 14:07:54 2018 +++ src/sys/netinet6/icmp6.c Sun Mar 10 18:54:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.242 2018/12/22 14:07:54 maxv Exp $ */ +/* $NetBSD: icmp6.c,v 1.242.4.1 2024/03/10 18:54:41 martin Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.242 2018/12/22 14:07:54 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.242.4.1 2024/03/10 18:54:41 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1965,7 +1965,8 @@ icmp6_rip6_input(struct mbuf **mp, int o } #endif else if ((n = m_copypacket(m, M_DONTWAIT)) != NULL) { - if (last->in6p_flags & IN6P_CONTROLOPTS) + if (last->in6p_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->in6p_socket->so_options)) ip6_savecontrol(last, , ip6, n); /* strip intermediate headers */ m_adj(n, off); @@ -1992,7 +1993,8 @@ icmp6_rip6_input(struct mbuf **mp, int o } else #endif if (last) { - if (last->in6p_flags & IN6P_CONTROLOPTS) + if (last->in6p_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->in6p_socket->so_options)) ip6_savecontrol(last, , ip6, m); /* strip intermediate headers */ m_adj(m, off); Index: src/sys/netinet6/raw_ip6.c diff -u src/sys/netinet6/raw_ip6.c:1.175.4.1 src/sys/netinet6/raw_ip6.c:1.175.4.2 --- src/sys/netinet6/raw_ip6.c:1.175.4.1 Thu Mar 23 12:06:49 2023 +++ src/sys/netinet6/raw_ip6.c Sun Mar 10 18:54:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.175.4.1 2023/03/23 12:06:49 martin Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.175.4.2 2024/03/10 18:54:41 martin Exp $ */ /* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.175.4.1 2023/03/23 12:06:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.175.4.2 2024/03/10 18:54:41 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_ipsec.h" @@ -140,7 +140,8 @@ rip6_sbappendaddr(struct in6pcb *last, s { struct mbuf *opts = NULL; - if (last->in6p_flags & IN6P_CONTROLOPTS) + if (last->in6p_flags & IN6P_CONTROLOPTS || + SOOPT_TIMESTAMP(last->in6p_socket->so_options)) ip6_savecontrol(last, , ip6, n); m_adj(n, hlen);
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Feb 23 19:45:40 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c if_wmreg.h Log Message: Pull up the following, requested by msaitoh in ticket #1802: sys/dev/pci/if_wm.c 1.794-1.798 via patch sys/dev/pci/if_wmreg.h 1.131 - Add RQDPC(Receive Queue Drop Packet Count) to iqdrops. - Drop frames if the RX descriptor ring has no room on multiqueue system. - Improve dmesg output: - Print RX packet buffer size. - Fix the upper 16bit of Image Unique ID(EtrackID). To generate a diff of this commit: cvs rdiff -u -r1.645.2.20 -r1.645.2.21 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.115.2.8 -r1.115.2.9 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Feb 23 19:45:40 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c if_wmreg.h Log Message: Pull up the following, requested by msaitoh in ticket #1802: sys/dev/pci/if_wm.c 1.794-1.798 via patch sys/dev/pci/if_wmreg.h 1.131 - Add RQDPC(Receive Queue Drop Packet Count) to iqdrops. - Drop frames if the RX descriptor ring has no room on multiqueue system. - Improve dmesg output: - Print RX packet buffer size. - Fix the upper 16bit of Image Unique ID(EtrackID). To generate a diff of this commit: cvs rdiff -u -r1.645.2.20 -r1.645.2.21 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.115.2.8 -r1.115.2.9 src/sys/dev/pci/if_wmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.645.2.20 src/sys/dev/pci/if_wm.c:1.645.2.21 --- src/sys/dev/pci/if_wm.c:1.645.2.20 Sat Feb 3 12:02:58 2024 +++ src/sys/dev/pci/if_wm.c Fri Feb 23 19:45:40 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.645.2.20 2024/02/03 12:02:58 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.645.2.21 2024/02/23 19:45:40 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.20 2024/02/03 12:02:58 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.21 2024/02/23 19:45:40 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -472,9 +472,9 @@ struct wm_rxqueue { /* RX event counters */ WM_Q_EVCNT_DEFINE(rxq, intr); /* Interrupts */ WM_Q_EVCNT_DEFINE(rxq, defer); /* Rx deferred processing */ - WM_Q_EVCNT_DEFINE(rxq, ipsum); /* IP checksums checked */ WM_Q_EVCNT_DEFINE(rxq, tusum); /* TCP/UDP cksums checked */ + WM_Q_EVCNT_DEFINE(rxq, qdrop); /* Rx queue drop packet */ #endif }; @@ -2722,6 +2722,10 @@ alloc_retry: /* Reset the chip to a known state. */ wm_reset(sc); + /* sc->sc_pba is set in wm_reset(). */ + aprint_verbose_dev(sc->sc_dev, "RX packet buffer size: %uKB\n", + sc->sc_pba); + /* * Check for I21[01] PLL workaround. * @@ -6618,6 +6622,7 @@ wm_update_stats(struct wm_softc *sc) struct ifnet *ifp = >sc_ethercom.ec_if; uint64_t crcerrs, algnerrc, symerrc, mpc, colc, sec, rlec, rxerrc, cexterr; + uint64_t total_qdrop = 0; crcerrs = CSR_READ(sc, WMREG_CRCERRS); symerrc = CSR_READ(sc, WMREG_SYMERRC); @@ -6766,6 +6771,22 @@ wm_update_stats(struct wm_softc *sc) WM_EVCNT_ADD(>sc_ev_lenerrs, CSR_READ(sc, WMREG_LENERRS)); WM_EVCNT_ADD(>sc_ev_scvpc, CSR_READ(sc, WMREG_SCVPC)); WM_EVCNT_ADD(>sc_ev_hrmpc, CSR_READ(sc, WMREG_HRMPC)); +#ifdef WM_EVENT_COUNTERS + for (int i = 0; i < sc->sc_nqueues; i++) { + struct wm_rxqueue *rxq = >sc_queue[i].wmq_rxq; + uint32_t rqdpc; + + rqdpc = CSR_READ(sc, WMREG_RQDPC(i)); + /* + * On I210 and newer device, the RQDPC register is not + * cleard on read. + */ + if ((rqdpc != 0) && (sc->sc_type >= WM_T_I210)) +CSR_WRITE(sc, WMREG_RQDPC(i), 0); + WM_Q_EVCNT_ADD(rxq, qdrop, rqdpc); + total_qdrop += rqdpc; + } +#endif } if ((sc->sc_type >= WM_T_I350) && !WM_IS_ICHPCH(sc)) { WM_EVCNT_ADD(>sc_ev_tlpic, CSR_READ(sc, WMREG_TLPIC)); @@ -6794,7 +6815,7 @@ wm_update_stats(struct wm_softc *sc) * If you want to know the nubmer of WMREG_RMBC, you should use such as * own EVCNT instead of if_iqdrops. */ - ifp->if_iqdrops += mpc; + ifp->if_iqdrops += mpc + total_qdrop; } void @@ -6811,6 +6832,8 @@ wm_clear_evcnt(struct wm_softc *sc) WM_Q_EVCNT_STORE(rxq, defer, 0); WM_Q_EVCNT_STORE(rxq, ipsum, 0); WM_Q_EVCNT_STORE(rxq, tusum, 0); + if ((sc->sc_type >= WM_T_82575) && !WM_IS_ICHPCH(sc)) + WM_Q_EVCNT_STORE(rxq, qdrop, 0); } /* TX queues */ @@ -8147,9 +8170,10 @@ wm_alloc_txrx_queues(struct wm_softc *sc WM_Q_INTR_EVCNT_ATTACH(rxq, intr, rxq, i, xname); WM_Q_INTR_EVCNT_ATTACH(rxq, defer, rxq, i, xname); - WM_Q_MISC_EVCNT_ATTACH(rxq, ipsum, rxq, i, xname); WM_Q_MISC_EVCNT_ATTACH(rxq, tusum, rxq, i, xname); + if ((sc->sc_type >= WM_T_82575) && !WM_IS_ICHPCH(sc)) + WM_Q_MISC_EVCNT_ATTACH(rxq, qdrop, rxq, i, xname); #endif /* WM_EVENT_COUNTERS */ rx_done++; @@ -8212,6 +8236,8 @@ wm_free_txrx_queues(struct wm_softc *sc) WM_Q_EVCNT_DETACH(rxq, defer, rxq, i); WM_Q_EVCNT_DETACH(rxq, ipsum, rxq, i); WM_Q_EVCNT_DETACH(rxq, tusum, rxq, i); + if ((sc->sc_type >= WM_T_82575) && !WM_IS_ICHPCH(sc)) + WM_Q_EVCNT_DETACH(rxq, qdrop, rxq, i); #endif /* WM_EVENT_COUNTERS */ wm_free_rx_buffer(sc, rxq); @@ -8401,6 +8427,8 @@ wm_init_rx_regs(struct wm_softc *sc, str rxq->rxq_descsize * rxq->rxq_ndesc); if ((sc->sc_flags & WM_F_NEWQUEUE) != 0) { + uint32_t srrctl; + if (MCLBYTES & ((1 << SRRCTL_BSIZEPKT_SHIFT) - 1)) panic("%s: MCLBYTES %d unsupported for 82575 " "or
CVS commit: [netbsd-9] src/sys/arch/vax/vsa
Module Name:src Committed By: martin Date: Mon Feb 19 09:02:17 UTC 2024 Modified Files: src/sys/arch/vax/vsa [netbsd-9]: ncr.c vsbus.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1800): sys/arch/vax/vsa/vsbus.c: revision 1.69 (patch) sys/arch/vax/vsa/ncr.c: revision 1.52 Fix SCSI tranfer corruption on VAXstation 3100/m30 (KA420) on netboot. See my post on port-vax@ for details: https://mail-index.netbsd.org/port-vax/2024/02/16/msg004866.html and "go ahead!" from ragge@. To generate a diff of this commit: cvs rdiff -u -r1.49.4.1 -r1.49.4.2 src/sys/arch/vax/vsa/ncr.c cvs rdiff -u -r1.65 -r1.65.4.1 src/sys/arch/vax/vsa/vsbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/vax/vsa/ncr.c diff -u src/sys/arch/vax/vsa/ncr.c:1.49.4.1 src/sys/arch/vax/vsa/ncr.c:1.49.4.2 --- src/sys/arch/vax/vsa/ncr.c:1.49.4.1 Mon Mar 23 10:06:26 2020 +++ src/sys/arch/vax/vsa/ncr.c Mon Feb 19 09:02:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ncr.c,v 1.49.4.1 2020/03/23 10:06:26 martin Exp $ */ +/* $NetBSD: ncr.c,v 1.49.4.2 2024/02/19 09:02:16 martin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49.4.1 2020/03/23 10:06:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49.4.2 2024/02/19 09:02:16 martin Exp $"); #include #include @@ -67,6 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49 #include #include #include +#include #include "ioconf.h" @@ -209,6 +210,16 @@ si_vsbus_attach(device_t parent, device_ else target = (clk_page[0xbc/2] >> tweak) & 7; + /* + * Explicitly enable upto 128KB "Big DMA" on KA420. + * (It looks KA420 firmware doesn't enable it on network boot) + */ +#define STC_MODE_OFF (KA420_STC_MODE - KA420_SCS_BASE) + if (vax_boardtype == VAX_BTYP_420) { + bus_space_write_1(ncr_sc->sc_regt, ncr_sc->sc_regh, + STC_MODE_OFF, 1); + } + aprint_normal("\n"); aprint_normal_dev(self, "NCR5380, SCSI ID %d\n", target); Index: src/sys/arch/vax/vsa/vsbus.c diff -u src/sys/arch/vax/vsa/vsbus.c:1.65 src/sys/arch/vax/vsa/vsbus.c:1.65.4.1 --- src/sys/arch/vax/vsa/vsbus.c:1.65 Mon Sep 3 16:29:28 2018 +++ src/sys/arch/vax/vsa/vsbus.c Mon Feb 19 09:02:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: vsbus.c,v 1.65 2018/09/03 16:29:28 riastradh Exp $ */ +/* $NetBSD: vsbus.c,v 1.65.4.1 2024/02/19 09:02:16 martin Exp $ */ /* * Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vsbus.c,v 1.65 2018/09/03 16:29:28 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vsbus.c,v 1.65.4.1 2024/02/19 09:02:16 martin Exp $"); #include "opt_cputype.h" @@ -146,7 +146,6 @@ vsbus_attach(device_t parent, device_t s } else { dbase = KA420_DMA_BASE; dsize = KA420_DMA_SIZE; - *(char *)(sc->sc_vsregs + 0xe0) = 1; /* Big DMA */ } sc->sc_dmasize = dsize; sc->sc_dmaaddr = uvm_km_alloc(kernel_map, dsize, 0,
CVS commit: [netbsd-9] src/sys/arch/vax/vsa
Module Name:src Committed By: martin Date: Mon Feb 19 09:02:17 UTC 2024 Modified Files: src/sys/arch/vax/vsa [netbsd-9]: ncr.c vsbus.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1800): sys/arch/vax/vsa/vsbus.c: revision 1.69 (patch) sys/arch/vax/vsa/ncr.c: revision 1.52 Fix SCSI tranfer corruption on VAXstation 3100/m30 (KA420) on netboot. See my post on port-vax@ for details: https://mail-index.netbsd.org/port-vax/2024/02/16/msg004866.html and "go ahead!" from ragge@. To generate a diff of this commit: cvs rdiff -u -r1.49.4.1 -r1.49.4.2 src/sys/arch/vax/vsa/ncr.c cvs rdiff -u -r1.65 -r1.65.4.1 src/sys/arch/vax/vsa/vsbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/tc
Module Name:src Committed By: martin Date: Sun Feb 18 16:30:20 UTC 2024 Modified Files: src/sys/dev/tc [netbsd-9]: zskbd.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1799): sys/dev/tc/zskbd.c: revision 1.22 Fix another fatal typo that causes zskbd_cngetc() to stall as dzkbd. Tested on my DEC 3000/300 and LK421. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.24.1 src/sys/dev/tc/zskbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/tc
Module Name:src Committed By: martin Date: Sun Feb 18 16:30:20 UTC 2024 Modified Files: src/sys/dev/tc [netbsd-9]: zskbd.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1799): sys/dev/tc/zskbd.c: revision 1.22 Fix another fatal typo that causes zskbd_cngetc() to stall as dzkbd. Tested on my DEC 3000/300 and LK421. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.24.1 src/sys/dev/tc/zskbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/tc/zskbd.c diff -u src/sys/dev/tc/zskbd.c:1.18 src/sys/dev/tc/zskbd.c:1.18.24.1 --- src/sys/dev/tc/zskbd.c:1.18 Fri Jan 2 21:32:26 2015 +++ src/sys/dev/tc/zskbd.c Sun Feb 18 16:30:20 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: zskbd.c,v 1.18 2015/01/02 21:32:26 jklos Exp $ */ +/* $NetBSD: zskbd.c,v 1.18.24.1 2024/02/18 16:30:20 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.18 2015/01/02 21:32:26 jklos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.18.24.1 2024/02/18 16:30:20 martin Exp $"); #include #include @@ -281,7 +281,7 @@ zskbd_cngetc(void *v, u_int *type, int * do { c = zs_getc(zsi->zsi_cs); - } while (!lk201_decode(>zsi_ks, 0, c, type, data) == LKD_NODATA); + } while (lk201_decode(>zsi_ks, 0, c, type, data) == LKD_NODATA); } static void
CVS commit: [netbsd-9] src/sys/dev/dec
Module Name:src Committed By: martin Date: Sat Feb 17 16:19:14 UTC 2024 Modified Files: src/sys/dev/dec [netbsd-9]: dzkbd.c lk201_ws.c lk201var.h Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1798): sys/dev/dec/dzkbd.c: revision 1.32 sys/dev/dec/lk201var.h: revision 1.8 sys/dev/dec/lk201_ws.c: revision 1.11 Fix a fatal typo that causes dzkbd_cngetc() to stall. Use proper macro for return values and remove #if 0'ed out block. Mostly from OpenBSD/vax. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.24.1 src/sys/dev/dec/dzkbd.c cvs rdiff -u -r1.10 -r1.10.24.1 src/sys/dev/dec/lk201_ws.c cvs rdiff -u -r1.7 -r1.7.24.1 src/sys/dev/dec/lk201var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dec/dzkbd.c diff -u src/sys/dev/dec/dzkbd.c:1.27 src/sys/dev/dec/dzkbd.c:1.27.24.1 --- src/sys/dev/dec/dzkbd.c:1.27 Fri Jan 2 21:32:26 2015 +++ src/sys/dev/dec/dzkbd.c Sat Feb 17 16:19:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: dzkbd.c,v 1.27 2015/01/02 21:32:26 jklos Exp $ */ +/* $NetBSD: dzkbd.c,v 1.27.24.1 2024/02/17 16:19:14 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.27 2015/01/02 21:32:26 jklos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.27.24.1 2024/02/17 16:19:14 martin Exp $"); #include #include @@ -237,7 +237,7 @@ dzkbd_cngetc(void *v, u_int *type, int * do { c = dzgetc(dzi->dzi_ls); - } while (!lk201_decode(>dzi_ks, 0, c, type, data) == LKD_NODATA); + } while (lk201_decode(>dzi_ks, 0, c, type, data) == LKD_NODATA); } static void Index: src/sys/dev/dec/lk201_ws.c diff -u src/sys/dev/dec/lk201_ws.c:1.10 src/sys/dev/dec/lk201_ws.c:1.10.24.1 --- src/sys/dev/dec/lk201_ws.c:1.10 Mon Jul 11 10:55:35 2016 +++ src/sys/dev/dec/lk201_ws.c Sat Feb 17 16:19:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: lk201_ws.c,v 1.10 2016/07/11 10:55:35 skrll Exp $ */ +/* $NetBSD: lk201_ws.c,v 1.10.24.1 2024/02/17 16:19:14 martin Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v 1.10 2016/07/11 10:55:35 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v 1.10.24.1 2024/02/17 16:19:14 martin Exp $"); #include #include @@ -133,17 +133,10 @@ lk201_decode(struct lk201_state *lks, in } switch (datain) { -#if 0 - case LK_KEY_UP: - for (i = 0; i < LK_KLL; i++) - lks->down_keys_list[i] = -1; - *type = WSCONS_EVENT_ALL_KEYS_UP; - return (1); -#endif case LK_POWER_UP: printf("lk201_decode: powerup detected\n"); lk201_init(lks); - return (0); + return LKD_NODATA; case LK_KDOWN_ERROR: case LK_POWER_ERROR: case LK_OUTPUT_ERROR: @@ -152,7 +145,7 @@ lk201_decode(struct lk201_state *lks, in /* FALLTHRU */ case LK_KEY_REPEAT: /* autorepeat handled by wskbd */ case LK_MODE_CHANGE: /* ignore silently */ - return (0); + return LKD_NODATA; } @@ -164,18 +157,18 @@ lk201_decode(struct lk201_state *lks, in *dataout = lks->down_keys_list[i] - MIN_LK201_KEY; lks->down_keys_list[i] = -1; - return (LKD_MORE); + return LKD_MORE; } - return (LKD_NODATA); + return LKD_NODATA; } else { for (i = 0; i < LK_KLL; i++) lks->down_keys_list[i] = -1; *type = WSCONS_EVENT_ALL_KEYS_UP; - return (LKD_COMPLETE); + return LKD_COMPLETE; } } else if (datain < MIN_LK201_KEY || datain > MAX_LK201_KEY) { printf("lk201_decode: %x\n", datain); - return (0); + return LKD_NODATA; } *dataout = datain - MIN_LK201_KEY; @@ -185,7 +178,7 @@ lk201_decode(struct lk201_state *lks, in if (lks->down_keys_list[i] == datain) { *type = WSCONS_EVENT_KEY_UP; lks->down_keys_list[i] = -1; - return (1); + return LKD_COMPLETE; } if (lks->down_keys_list[i] == -1 && freeslot == -1) freeslot = i; @@ -193,12 +186,12 @@ lk201_decode(struct lk201_state *lks, in if (freeslot == -1) { printf("lk201_decode: down(%d) no free slot\n", datain); - return (0); + return LKD_NODATA; } *type = WSCONS_EVENT_KEY_DOWN; lks->down_keys_list[freeslot] = datain; - return (1); + return LKD_COMPLETE; } void Index: src/sys/dev/dec/lk201var.h diff -u src/sys/dev/dec/lk201var.h:1.7 src/sys/dev/dec/lk201var.h:1.7.24.1 --- src/sys/dev/dec/lk201var.h:1.7 Fri Jan 2 21:32:26 2015 +++ src/sys/dev/dec/lk201var.h Sat Feb 17 16:19:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: lk201var.h,v 1.7 2015/01/02 21:32:26 jklos Exp $ */ +/* $NetBSD: lk201var.h,v 1.7.24.1 2024/02/17 16:19:14 martin Exp $ */ /* * Copyright (c) 1998 @@ -54,7 +54,7 @@ void lk201_bell(struct lk201_state *, st void lk201_set_leds(struct lk201_state *, int); void lk201_set_keyclick(struct lk201_state *, int); +/* Values returned by lk201_decode */ #define LKD_NODATA 0x00 #define LKD_COMPLETE 0x01 #define
CVS commit: [netbsd-9] src/sys/dev/dec
Module Name:src Committed By: martin Date: Sat Feb 17 16:19:14 UTC 2024 Modified Files: src/sys/dev/dec [netbsd-9]: dzkbd.c lk201_ws.c lk201var.h Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1798): sys/dev/dec/dzkbd.c: revision 1.32 sys/dev/dec/lk201var.h: revision 1.8 sys/dev/dec/lk201_ws.c: revision 1.11 Fix a fatal typo that causes dzkbd_cngetc() to stall. Use proper macro for return values and remove #if 0'ed out block. Mostly from OpenBSD/vax. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.24.1 src/sys/dev/dec/dzkbd.c cvs rdiff -u -r1.10 -r1.10.24.1 src/sys/dev/dec/lk201_ws.c cvs rdiff -u -r1.7 -r1.7.24.1 src/sys/dev/dec/lk201var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:24:38 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1795): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/dev/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hdaudio/hdafg.c diff -u src/sys/dev/hdaudio/hdafg.c:1.18.2.1 src/sys/dev/hdaudio/hdafg.c:1.18.2.2 --- src/sys/dev/hdaudio/hdafg.c:1.18.2.1 Sat Apr 25 10:40:45 2020 +++ src/sys/dev/hdaudio/hdafg.c Sat Feb 3 14:24:38 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.18.2.1 2020/04/25 10:40:45 martin Exp $ */ +/* $NetBSD: hdafg.c,v 1.18.2.2 2024/02/03 14:24:38 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.18.2.1 2020/04/25 10:40:45 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.18.2.2 2024/02/03 14:24:38 martin Exp $"); #include #include @@ -4223,9 +4223,12 @@ hdafg_freem(void *opaque, void *addr, si struct hdaudio_audiodev *ad = opaque; struct hdaudio_stream *st; - if (addr == DMA_KERNADDR(>ad_playback->st_data)) + if (ad == NULL) + return; + + if (ad->ad_playback != NULL && addr == DMA_KERNADDR(>ad_playback->st_data)) st = ad->ad_playback; - else if (addr == DMA_KERNADDR(>ad_capture->st_data)) + else if (ad->ad_capture != NULL && addr == DMA_KERNADDR(>ad_capture->st_data)) st = ad->ad_capture; else return;
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:24:38 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1795): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/dev/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sat Feb 3 12:41:30 UTC 2024 Modified Files: src/sys/dev/sdmmc [netbsd-9]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1793): sys/dev/sdmmc/ld_sdmmc.c: revision 1.43 ld@sdmmc(4): Hack around deadlock in cache sync on detach. Yanking a card triggers the sdmmc discovery task, which runs in the sdmmc task thread, to detach any attached child devices. Detaching ld@sdmmc triggers a cache flush (via ldbegindetach -> disk_begindetach -> ld_lastclose -> ld_flush -> ioctl DIOCCACHESYNC), which is implemented by scheduling a task to do sdmmc_mem_flush_cache and then waiting for it to complete. The sdmmc_mem_cache_flush is done by an sdmmc task so it happens after all previously scheduled I/O operations -- that way the cache flush doesn't complete until the previously scheduled I/O operations are complete. However, when the cache flush task is issued from the discovery task, this doesn't work, because the cache flush task can't start until the discovery task has returned -- but the discovery task won't return until the cache flush task has completed. To work around this deadlock, which usually happens only when the device has been yanked anyway so further I/O would be lost anyway, just do the cache flush synchronously in DIOCCACHESYNC if we're running in the task thread. This isn't quite right -- implementation details of the task thread shouldn't bleed into ld@sdmmc, and running the cache sync _before_ any subsequently scheduled I/O tasks is asking for trouble -- but it should serve to avoid the deadlock in PR kern/57870 until we can fix a host of concurrency bugs in sdmmc by fixing the locking scheme and running discovery in a separate thread from tasks. To generate a diff of this commit: cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/dev/sdmmc/ld_sdmmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sat Feb 3 12:41:30 UTC 2024 Modified Files: src/sys/dev/sdmmc [netbsd-9]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1793): sys/dev/sdmmc/ld_sdmmc.c: revision 1.43 ld@sdmmc(4): Hack around deadlock in cache sync on detach. Yanking a card triggers the sdmmc discovery task, which runs in the sdmmc task thread, to detach any attached child devices. Detaching ld@sdmmc triggers a cache flush (via ldbegindetach -> disk_begindetach -> ld_lastclose -> ld_flush -> ioctl DIOCCACHESYNC), which is implemented by scheduling a task to do sdmmc_mem_flush_cache and then waiting for it to complete. The sdmmc_mem_cache_flush is done by an sdmmc task so it happens after all previously scheduled I/O operations -- that way the cache flush doesn't complete until the previously scheduled I/O operations are complete. However, when the cache flush task is issued from the discovery task, this doesn't work, because the cache flush task can't start until the discovery task has returned -- but the discovery task won't return until the cache flush task has completed. To work around this deadlock, which usually happens only when the device has been yanked anyway so further I/O would be lost anyway, just do the cache flush synchronously in DIOCCACHESYNC if we're running in the task thread. This isn't quite right -- implementation details of the task thread shouldn't bleed into ld@sdmmc, and running the cache sync _before_ any subsequently scheduled I/O tasks is asking for trouble -- but it should serve to avoid the deadlock in PR kern/57870 until we can fix a host of concurrency bugs in sdmmc by fixing the locking scheme and running discovery in a separate thread from tasks. To generate a diff of this commit: cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/dev/sdmmc/ld_sdmmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.36.4.1 src/sys/dev/sdmmc/ld_sdmmc.c:1.36.4.2 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.36.4.1 Sun Aug 9 14:03:07 2020 +++ src/sys/dev/sdmmc/ld_sdmmc.c Sat Feb 3 12:41:29 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.36.4.1 2020/08/09 14:03:07 martin Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.36.4.2 2024/02/03 12:41:29 martin Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.36.4.1 2020/08/09 14:03:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.36.4.2 2024/02/03 12:41:29 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -589,9 +589,24 @@ static int ld_sdmmc_cachesync(struct ld_softc *ld, bool poll) { struct ld_sdmmc_softc *sc = device_private(ld->sc_dv); + struct sdmmc_softc *sdmmc = device_private(device_parent(ld->sc_dv)); struct ld_sdmmc_task *task; int error = -1; + /* + * If we come here through the sdmmc discovery task, we can't + * wait for a new task because the new task can't even begin + * until the sdmmc discovery task has completed. + * + * XXX This is wrong, because there may already be queued I/O + * tasks ahead of us. Fixing this properly requires doing + * discovery in a separate thread. But this should avoid the + * deadlock of PR kern/57870 (https://gnats.NetBSD.org/57870) + * until we do split that up. + */ + if (curlwp == sdmmc->sc_tskq_lwp) + return sdmmc_mem_flush_cache(sc->sc_sf, poll); + mutex_enter(>sc_lock); /* Acquire a free task, or fail with EBUSY. */
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sat Feb 3 12:13:33 UTC 2024 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_type.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1792: sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 sys/dev/pci/ixgbe/ixgbe_type.h 1.62 sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 - Clear the WTHRESH bit field before writing it. - Optimize ixgbe_txeof(). - Use kmem_zalloc() instead of malloc(,M_ZERO). - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. - No functional change - Move assignment of TXD. - ixv(4): Remove unused IFF_OACTIVE. - Don't include the Flow Director related members to reduce the size of struct tx_ring. On amd64 and aarch64, the real size is not changed because of the alignment. - The descriptor ring size and the alignment are tested in the attach function, so it's not required to use roundup2(size, DBA_ALIGN). - Use #ifdef LRO more to reduce the size of struct rx_ring. - Change "me" from 32bit to 8bit because the max is 128. This commit doesn't change the real size of ix_queue, tx_ring and rx_ring because of the alignment. - Th RSC (hardware receive side coalescing) feature has been disabled all along, so enclose the code with #ifdef RSC. - Remove unused. - Modify for the readability. - Modify comment. - Fix comment. Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.54.2.14 -r1.54.2.15 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.29 -r1.199.2.30 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.12 -r1.56.2.13 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.41.2.11 -r1.41.2.12 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.125.2.24 -r1.125.2.25 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.14 src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.15 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.14 Wed Oct 18 14:05:27 2023 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Sat Feb 3 12:13:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.54.2.14 2023/10/18 14:05:27 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.54.2.15 2024/02/03 12:13:32 martin Exp $ */ /** @@ -64,13 +64,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.14 2023/10/18 14:05:27 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.15 2024/02/03 12:13:32 martin Exp $"); #include "opt_inet.h" #include "opt_inet6.h" #include "ixgbe.h" +#ifdef RSC /* * HW RSC control: * this feature only works with @@ -84,7 +85,9 @@ __KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v * to enable. */ static bool ixgbe_rsc_enable = FALSE; +#endif +#ifdef IXGBE_FDIR /* * For Flow Director: this is the * number of TX packets we sample @@ -95,6 +98,7 @@ static bool ixgbe_rsc_enable = FALSE; * setting this to 0. */ static int atr_sample_rate = 20; +#endif #define IXGBE_M_ADJ(sc, rxr, mp) \ if (sc->max_frame_size <= (rxr->mbuf_sz - ETHER_ALIGN)) \ @@ -122,8 +126,9 @@ static __inline void ixgbe_rx_input(stru static int ixgbe_dma_malloc(struct ixgbe_softc *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct ixgbe_softc *, struct ixgbe_dma_alloc *); - -static void ixgbe_setup_hw_rsc(struct rx_ring *); +#ifdef RSC +static void ixgbe_setup_hw_rsc(struct rx_ring *); +#endif / * ixgbe_legacy_start_locked - Transmit entry point @@ -406,7 +411,7 @@ ixgbe_drain_all(struct ixgbe_softc *sc) static int ixgbe_xmit(struct tx_ring *txr, struct mbuf *m_head) { - struct ixgbe_softc *sc = txr->sc; + struct ixgbe_softc *sc = txr->sc; struct ixgbe_tx_buf *txbuf; union ixgbe_adv_tx_desc *txd = NULL; struct ifnet *ifp = sc->ifp; @@ -487,8 +492,8 @@ retry: } /* - * Set up the appropriate offload context - * this will consume the first descriptor + * Set up the appropriate offload context if requested, + * this may consume one TX descriptor. */ error = ixgbe_tx_ctx_setup(txr, m_head, _type_len, _status); if (__predict_false(error)) { @@ -625,14 +630,8 @@ ixgbe_allocate_transmit_buffers(struct t goto fail; } - txr->tx_buffers = - (struct ixgbe_tx_buf *) malloc(sizeof(struct ixgbe_tx_buf) * - sc->num_tx_desc, M_DEVBUF, M_NOWAIT | M_ZERO); - if (txr->tx_buffers == NULL) { - aprint_error_dev(dev,
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sat Feb 3 12:13:33 UTC 2024 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_type.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1792: sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 sys/dev/pci/ixgbe/ixgbe_type.h 1.62 sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 - Clear the WTHRESH bit field before writing it. - Optimize ixgbe_txeof(). - Use kmem_zalloc() instead of malloc(,M_ZERO). - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. - No functional change - Move assignment of TXD. - ixv(4): Remove unused IFF_OACTIVE. - Don't include the Flow Director related members to reduce the size of struct tx_ring. On amd64 and aarch64, the real size is not changed because of the alignment. - The descriptor ring size and the alignment are tested in the attach function, so it's not required to use roundup2(size, DBA_ALIGN). - Use #ifdef LRO more to reduce the size of struct rx_ring. - Change "me" from 32bit to 8bit because the max is 128. This commit doesn't change the real size of ix_queue, tx_ring and rx_ring because of the alignment. - Th RSC (hardware receive side coalescing) feature has been disabled all along, so enclose the code with #ifdef RSC. - Remove unused. - Modify for the readability. - Modify comment. - Fix comment. Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.54.2.14 -r1.54.2.15 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.29 -r1.199.2.30 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.12 -r1.56.2.13 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.41.2.11 -r1.41.2.12 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.125.2.24 -r1.125.2.25 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 12:02:58 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1791): sys/dev/pci/if_wm.c: revision 1.793 Add Intel I219-{LM,V}(20,21) support. To generate a diff of this commit: cvs rdiff -u -r1.645.2.19 -r1.645.2.20 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.645.2.19 src/sys/dev/pci/if_wm.c:1.645.2.20 --- src/sys/dev/pci/if_wm.c:1.645.2.19 Wed Oct 18 14:29:18 2023 +++ src/sys/dev/pci/if_wm.c Sat Feb 3 12:02:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.645.2.19 2023/10/18 14:29:18 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.645.2.20 2024/02/03 12:02:58 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.19 2023/10/18 14:29:18 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.20 2024/02/03 12:02:58 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1761,6 +1761,12 @@ static const struct wm_product { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM19, "I219 LM (19) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM20, + "I219 LM (20) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM21, + "I219 LM (21) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM22, "I219 LM (22) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */ @@ -1821,6 +1827,12 @@ static const struct wm_product { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V19, "I219 V (19) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V20, + "I219 V (20) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V21, + "I219 V (21) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V22, "I219 V (22) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 12:02:58 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1791): sys/dev/pci/if_wm.c: revision 1.793 Add Intel I219-{LM,V}(20,21) support. To generate a diff of this commit: cvs rdiff -u -r1.645.2.19 -r1.645.2.20 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 11:26:39 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h Log Message: regen (ticket #1790) To generate a diff of this commit: cvs rdiff -u -r1.1371.2.21 -r1.1371.2.22 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1370.2.21 -r1.1370.2.22 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 11:26:39 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h Log Message: regen (ticket #1790) To generate a diff of this commit: cvs rdiff -u -r1.1371.2.21 -r1.1371.2.22 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1370.2.21 -r1.1370.2.22 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 11:24:19 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1790): sys/dev/pci/pcidevs: revision 1.1494 sys/dev/pci/pcidevs: revision 1.1498 sys/dev/pci/pcidevs: revision 1.1499 sys/dev/pci/pcidevs: revision 1.1500 sys/dev/pci/pcidevs: revision 1.1501 sys/dev/pci/pcidevs: revision 1.1502 pcidevs: Add missing I225/I226 series devices pcidevs: Add Mellanox ConnectX-6 Lx. add some newer Areca boards in prep for updating driver Add Intel C26[26] eSPI. Update Intel Raptor Lake devices. Add Intel I219-{LM,V}(20,21) To generate a diff of this commit: cvs rdiff -u -r1.1383.2.21 -r1.1383.2.22 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 11:24:19 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1790): sys/dev/pci/pcidevs: revision 1.1494 sys/dev/pci/pcidevs: revision 1.1498 sys/dev/pci/pcidevs: revision 1.1499 sys/dev/pci/pcidevs: revision 1.1500 sys/dev/pci/pcidevs: revision 1.1501 sys/dev/pci/pcidevs: revision 1.1502 pcidevs: Add missing I225/I226 series devices pcidevs: Add Mellanox ConnectX-6 Lx. add some newer Areca boards in prep for updating driver Add Intel C26[26] eSPI. Update Intel Raptor Lake devices. Add Intel I219-{LM,V}(20,21) To generate a diff of this commit: cvs rdiff -u -r1.1383.2.21 -r1.1383.2.22 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1383.2.21 src/sys/dev/pci/pcidevs:1.1383.2.22 --- src/sys/dev/pci/pcidevs:1.1383.2.21 Wed Oct 18 14:29:18 2023 +++ src/sys/dev/pci/pcidevs Sat Feb 3 11:24:19 2024 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1383.2.21 2023/10/18 14:29:18 martin Exp $ +$NetBSD: pcidevs,v 1.1383.2.22 2024/02/03 11:24:19 martin Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -1488,6 +1488,7 @@ product ARECA ARC1170 0x1170 ARC-1170 product ARECA ARC1200 0x1200 ARC-1200 product ARECA ARC1200_B 0x1201 ARC-1200 rev B product ARECA ARC1202 0x1202 ARC-1202 +product ARECA ARC1203 0x1203 ARC-1203 product ARECA ARC1210 0x1210 ARC-1210 product ARECA ARC1214 0x1214 ARC-1214 product ARECA ARC1220 0x1220 ARC-1220 @@ -1500,6 +1501,8 @@ product ARECA ARC1381 0x1381 ARC-1381 product ARECA ARC1680 0x1680 ARC-1680 product ARECA ARC1681 0x1681 ARC-1681 product ARECA ARC1880 0x1880 ARC-1880 +product ARECA ARC1884 0x1884 ARC-1884 +product ARECA ARC1886 0x1886 ARC-1886 /* ASIX Electronics products */ product ASIX AX88140A 0x1400 AX88140A 10/100 Ethernet @@ -3934,6 +3937,7 @@ product INTEL I219_LM11 0x0d4c I219-LM product INTEL I219_V11 0x0d4d I219-V (11) Ethernet Connection product INTEL I219_LM10 0x0d4e I219-LM (10) Ethernet Connection product INTEL I219_V10 0x0d4f I219-V (10) Ethernet Connection +product INTEL I225_IT 0x0d9f I225-IT Ethernet Connection product INTEL I219_LM12 0x0d53 I219-LM (12) Ethernet Connection product INTEL I219_V12 0x0d55 I219-V (12) Ethernet Connection product INTEL I219_LM23 0x0dc5 I219-LM (23) Ethernet Connection @@ -4254,6 +4258,8 @@ product INTEL 82439HX 0x1250 82439HX (T product INTEL I226_LM 0x125b I226-LM Ethernet product INTEL I226_V 0x125c I226-V Ethernet product INTEL I226_IT 0x125d I226-IT Ethernet +product INTEL I221_V 0x125e I221-V Ethernet Connection +product INTEL I226_BLANK_NVM 0x125f I226 Ethernet Connection (blankNVM) product INTEL C3K_X553_10G 0x1306 C3000 X553 10G Ethernet product INTEL C3K_X553_1G 0x1307 C3000 X553 1G Ethernet product INTEL 82870P2_PPB 0x1460 82870P2 P64H2 PCI-PCI Bridge @@ -4380,9 +4386,12 @@ product INTEL C3K_X553_SGMII 0x15e4 C300 product INTEL C3K_X553_SGMII_L 0x15e5 C3000 X553 1GbE SGMII (non-10G SKU) product INTEL I225_LM 0x15f2 I225 LM Ethernet product INTEL I225_V 0x15f3 I225 V Ethernet +product INTEL I220_V 0x15f7 I220-V Ethernet Connection +product INTEL I225_BLANK_NVM 0x15fd I225 Ethernet Connection (blankNVM) product INTEL I219_LM15 0x15f4 I219-LM (15) Ethernet Connection product INTEL I219_V15 0x15f5 I219-V (15) Ethernet Connection product INTEL I210_SGMII_WOF 0x15f6 I210 Ethernet (SGMII) +product INTEL I225_I 0x15f8 I225-I Ethernet Connection product INTEL I219_LM14 0x15f9 I219-LM (14) Ethernet Connection product INTEL I219_V14 0x15fa I219-V (14) Ethernet Connection product INTEL I219_LM13 0x15fb I219-LM (13) Ethernet Connection @@ -5415,6 +5424,9 @@ product INTEL XE5_V3_BRA4 0x2ffb Xeon E product INTEL XE5_V3_SADBR1 0x2ffc Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers product INTEL XE5_V3_SADBR2 0x2ffd Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers product INTEL XE5_V3_SADBR3 0x2ffe Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers +product INTEL I225_K 0x3100 I225-K Ethernet Connection +product INTEL I225_K2 0x3101 I225-K2 Ethernet Connection +product INTEL I226_K 0x3102 I226-K Ethernet Connection product INTEL WIFI_LINK_3165_1 0x3165 Dual Band Wireless AC 3165 product INTEL WIFI_LINK_3165_2 0x3166 Dual Band Wireless AC 3165 product INTEL GLK_IGD_1 0x3184 UHD Graphics 605 @@ -5951,7 +5963,7 @@ product INTEL ADL_U15_2_4_HOST 0x4609 Al product INTEL ADL_U9_2_4_HOST 0x460a Alder Lake (U9,2+4) Host product INTEL ADL_PCIE_RP_0 0x460d Alder Lake PCIe G5 Root Port 0 (x16) product INTEL ADL_XDCI 0x460e Alder Lake USB-C Device (xDCI) -product INTEL ADL_S_2_0_HOST 0x4610 Alder Lake
CVS commit: [netbsd-9] src/sys/conf
Module Name:src Committed By: martin Date: Mon Jan 1 11:37:13 UTC 2024 Modified Files: src/sys/conf [netbsd-9]: copyright Log Message: Pull up following revision(s) (requested by hgutch in ticket #1785): sys/conf/copyright: revision 1.22 Update copyright notice for 2024. To generate a diff of this commit: cvs rdiff -u -r1.17.4.3 -r1.17.4.4 src/sys/conf/copyright Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/copyright diff -u src/sys/conf/copyright:1.17.4.3 src/sys/conf/copyright:1.17.4.4 --- src/sys/conf/copyright:1.17.4.3 Tue Jan 3 16:46:12 2023 +++ src/sys/conf/copyright Mon Jan 1 11:37:13 2024 @@ -1,6 +1,7 @@ Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, -2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 +2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, +2024 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved.
CVS commit: [netbsd-9] src/sys/conf
Module Name:src Committed By: martin Date: Mon Jan 1 11:37:13 UTC 2024 Modified Files: src/sys/conf [netbsd-9]: copyright Log Message: Pull up following revision(s) (requested by hgutch in ticket #1785): sys/conf/copyright: revision 1.22 Update copyright notice for 2024. To generate a diff of this commit: cvs rdiff -u -r1.17.4.3 -r1.17.4.4 src/sys/conf/copyright Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/nfs
Module Name:src Committed By: martin Date: Mon Dec 11 12:34:43 UTC 2023 Modified Files: src/sys/nfs [netbsd-9]: nfs_vnops.c Log Message: Pull up following revision(s) (requested by schmonz in ticket #1778): sys/nfs/nfs_vnops.c: revision 1.325 NFS client: fix interop with macOS 14 servers. Symptom: a bunch of "Cannot open `.' (Invalid argument)". thorpej@ analysis and fix: on the first request to read a given directory, make sure READDIR and READDIRPLUS cookie verifiers are being set to 0. This is in RFC1813 and macOS must have gotten stricter about it. Verified on 10.0_RC1/aarch64 to fix the reproducers in PR kern/57691 as well as the original use case in which I met the bug: pkg_rr once again runs to completion. To generate a diff of this commit: cvs rdiff -u -r1.311 -r1.311.4.1 src/sys/nfs/nfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_vnops.c diff -u src/sys/nfs/nfs_vnops.c:1.311 src/sys/nfs/nfs_vnops.c:1.311.4.1 --- src/sys/nfs/nfs_vnops.c:1.311 Mon Sep 3 16:29:36 2018 +++ src/sys/nfs/nfs_vnops.c Mon Dec 11 12:34:43 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_vnops.c,v 1.311 2018/09/03 16:29:36 riastradh Exp $ */ +/* $NetBSD: nfs_vnops.c,v 1.311.4.1 2023/12/11 12:34:43 martin Exp $ */ /* * Copyright (c) 1989, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.311 2018/09/03 16:29:36 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.311.4.1 2023/12/11 12:34:43 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -2466,8 +2466,13 @@ nfs_readdirrpc(struct vnode *vp, struct txdr_cookie3(uiop->uio_offset, tl); } tl += 2; - *tl++ = dnp->n_cookieverf.nfsuquad[0]; - *tl++ = dnp->n_cookieverf.nfsuquad[1]; + if (uiop->uio_offset == 0) { +*tl++ = 0; +*tl++ = 0; + } else { +*tl++ = dnp->n_cookieverf.nfsuquad[0]; +*tl++ = dnp->n_cookieverf.nfsuquad[1]; + } } else #endif { @@ -2676,8 +2681,13 @@ nfs_readdirplusrpc(struct vnode *vp, str txdr_cookie3(uiop->uio_offset, tl); } tl += 2; - *tl++ = dnp->n_cookieverf.nfsuquad[0]; - *tl++ = dnp->n_cookieverf.nfsuquad[1]; + if (uiop->uio_offset == 0) { + *tl++ = 0; + *tl++ = 0; + } else { + *tl++ = dnp->n_cookieverf.nfsuquad[0]; + *tl++ = dnp->n_cookieverf.nfsuquad[1]; + } *tl++ = txdr_unsigned(nmp->nm_readdirsize); *tl = txdr_unsigned(nmp->nm_rsize); nfsm_request(dnp, NFSPROC_READDIRPLUS, curlwp, cred);
CVS commit: [netbsd-9] src/sys/nfs
Module Name:src Committed By: martin Date: Mon Dec 11 12:34:43 UTC 2023 Modified Files: src/sys/nfs [netbsd-9]: nfs_vnops.c Log Message: Pull up following revision(s) (requested by schmonz in ticket #1778): sys/nfs/nfs_vnops.c: revision 1.325 NFS client: fix interop with macOS 14 servers. Symptom: a bunch of "Cannot open `.' (Invalid argument)". thorpej@ analysis and fix: on the first request to read a given directory, make sure READDIR and READDIRPLUS cookie verifiers are being set to 0. This is in RFC1813 and macOS must have gotten stricter about it. Verified on 10.0_RC1/aarch64 to fix the reproducers in PR kern/57691 as well as the original use case in which I met the bug: pkg_rr once again runs to completion. To generate a diff of this commit: cvs rdiff -u -r1.311 -r1.311.4.1 src/sys/nfs/nfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Sat Dec 9 12:57:16 UTC 2023 Modified Files: src/sys/arch/mips/mips [netbsd-9]: lock_stubs_llsc.S Log Message: Pull up following revision(s) (requested by andvar in ticket #1773): sys/arch/mips/mips/lock_stubs_llsc.S: revision 1.18 Add missing PTR_WORD command in front of 0. Likely accidentally missed in the commit, since rev 1.9. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/mips/mips/lock_stubs_llsc.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/lock_stubs_llsc.S diff -u src/sys/arch/mips/mips/lock_stubs_llsc.S:1.9 src/sys/arch/mips/mips/lock_stubs_llsc.S:1.9.4.1 --- src/sys/arch/mips/mips/lock_stubs_llsc.S:1.9 Sat Apr 6 03:06:26 2019 +++ src/sys/arch/mips/mips/lock_stubs_llsc.S Sat Dec 9 12:57:16 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: lock_stubs_llsc.S,v 1.9 2019/04/06 03:06:26 thorpej Exp $ */ +/* $NetBSD: lock_stubs_llsc.S,v 1.9.4.1 2023/12/09 12:57:16 martin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include -RCSID("$NetBSD: lock_stubs_llsc.S,v 1.9 2019/04/06 03:06:26 thorpej Exp $") +RCSID("$NetBSD: lock_stubs_llsc.S,v 1.9.4.1 2023/12/09 12:57:16 martin Exp $") #include "assym.h" @@ -364,7 +364,7 @@ EXPORT(mips_llsc_locore_atomicvec) #ifdef _LP64 PTR_WORD llsc_ucas_64 #else - 0 + PTR_WORD 0 #endif /* _LP64 */ #ifdef LOCKDEBUG PTR_WORD mutex_vector_enter
CVS commit: [netbsd-9] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Sat Dec 9 12:57:16 UTC 2023 Modified Files: src/sys/arch/mips/mips [netbsd-9]: lock_stubs_llsc.S Log Message: Pull up following revision(s) (requested by andvar in ticket #1773): sys/arch/mips/mips/lock_stubs_llsc.S: revision 1.18 Add missing PTR_WORD command in front of 0. Likely accidentally missed in the commit, since rev 1.9. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/mips/mips/lock_stubs_llsc.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/wscons
Module Name:src Committed By: martin Date: Wed Nov 29 18:59:00 UTC 2023 Modified Files: src/sys/dev/wscons [netbsd-9]: wsemul_vt100.c Log Message: Pull up following revision(s) (requested by gutteridge in ticket #1772): sys/dev/wscons/wsemul_vt100.c: revision 1.47 sys/dev/wscons/wsemul_vt100.c: revision 1.48 PR/56223: David Shao ^[]8;;^G make console unresponsive. From OpenBSD: In `string' state, accept bell (^G) as an end of sequence in addition to `ESC \', as supported by xterm; some third-party software such as ncmpcpp rely upon this. fix the NetBSD tag. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.45.4.1 src/sys/dev/wscons/wsemul_vt100.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/wscons/wsemul_vt100.c diff -u src/sys/dev/wscons/wsemul_vt100.c:1.45 src/sys/dev/wscons/wsemul_vt100.c:1.45.4.1 --- src/sys/dev/wscons/wsemul_vt100.c:1.45 Mon Sep 3 16:29:34 2018 +++ src/sys/dev/wscons/wsemul_vt100.c Wed Nov 29 18:59:00 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: wsemul_vt100.c,v 1.45 2018/09/03 16:29:34 riastradh Exp $ */ +/* $NetBSD: wsemul_vt100.c,v 1.45.4.1 2023/11/29 18:59:00 martin Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.45 2018/09/03 16:29:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.45.4.1 2023/11/29 18:59:00 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_wsmsgattrs.h" @@ -429,7 +429,13 @@ wsemul_vt100_output_c0c1(struct wsemul_v /* ignore */ break; case ASCII_BEL: - wsdisplay_emulbell(vd->cbcookie); + if (edp->state == VT100_EMUL_STATE_STRING) { + /* acts as an equivalent to the ``ESC \'' string end */ + wsemul_vt100_handle_dcs(vd); + edp->state = VT100_EMUL_STATE_NORMAL; + } else { + wsdisplay_emulbell(vd->cbcookie); + } break; case ASCII_BS: if (vd->ccol > 0) { @@ -489,7 +495,7 @@ wsemul_vt100_output_c0c1(struct wsemul_v break; case ST: /* string end 8-bit */ /* XXX only in VT100_EMUL_STATE_STRING */ - wsemul_vt100_handle_dcs(edp); + wsemul_vt100_handle_dcs(vd); edp->state = VT100_EMUL_STATE_NORMAL; break; #endif
CVS commit: [netbsd-9] src/sys/dev/wscons
Module Name:src Committed By: martin Date: Wed Nov 29 18:59:00 UTC 2023 Modified Files: src/sys/dev/wscons [netbsd-9]: wsemul_vt100.c Log Message: Pull up following revision(s) (requested by gutteridge in ticket #1772): sys/dev/wscons/wsemul_vt100.c: revision 1.47 sys/dev/wscons/wsemul_vt100.c: revision 1.48 PR/56223: David Shao ^[]8;;^G make console unresponsive. From OpenBSD: In `string' state, accept bell (^G) as an end of sequence in addition to `ESC \', as supported by xterm; some third-party software such as ncmpcpp rely upon this. fix the NetBSD tag. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.45.4.1 src/sys/dev/wscons/wsemul_vt100.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Wed Nov 29 12:27:05 UTC 2023 Modified Files: src/sys/kern [netbsd-9]: exec_subr.c Log Message: Additionally pull up the following for ticket #1769: sys/kern/exec_subr.c1.87 Fix build for kernels w/o PAX_MPROTECT. To generate a diff of this commit: cvs rdiff -u -r1.82.10.1 -r1.82.10.2 src/sys/kern/exec_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/exec_subr.c diff -u src/sys/kern/exec_subr.c:1.82.10.1 src/sys/kern/exec_subr.c:1.82.10.2 --- src/sys/kern/exec_subr.c:1.82.10.1 Tue Nov 28 12:59:21 2023 +++ src/sys/kern/exec_subr.c Wed Nov 29 12:27:05 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_subr.c,v 1.82.10.1 2023/11/28 12:59:21 martin Exp $ */ +/* $NetBSD: exec_subr.c,v 1.82.10.2 2023/11/29 12:27:05 martin Exp $ */ /* * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: exec_subr.c,v 1.82.10.1 2023/11/28 12:59:21 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exec_subr.c,v 1.82.10.2 2023/11/29 12:27:05 martin Exp $"); #include "opt_pax.h" @@ -162,7 +162,7 @@ static int vmcmd_get_prot(struct lwp *l, const struct exec_vmcmd *cmd, vm_prot_t *prot, vm_prot_t *maxprot) { - vm_prot_t extraprot = PROT_MPROTECT_EXTRACT(cmd->ev_prot); + vm_prot_t extraprot __unused = PROT_MPROTECT_EXTRACT(cmd->ev_prot); *prot = cmd->ev_prot & UVM_PROT_ALL; *maxprot = PAX_MPROTECT_MAXPROTECT(l, *prot, extraprot, UVM_PROT_ALL);
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Wed Nov 29 12:27:05 UTC 2023 Modified Files: src/sys/kern [netbsd-9]: exec_subr.c Log Message: Additionally pull up the following for ticket #1769: sys/kern/exec_subr.c1.87 Fix build for kernels w/o PAX_MPROTECT. To generate a diff of this commit: cvs rdiff -u -r1.82.10.1 -r1.82.10.2 src/sys/kern/exec_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/ufs/ffs
Module Name:src Committed By: martin Date: Tue Nov 28 13:11:38 UTC 2023 Modified Files: src/sys/ufs/ffs [netbsd-9]: ffs_vfsops.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1770): sys/ufs/ffs/ffs_vfsops.c: revision 1.382 ffs_sync: Avoid unlocked access to v_numoutput/v_dirtyblkhd. Found by lockdoc. PR kern/57606 To generate a diff of this commit: cvs rdiff -u -r1.362 -r1.362.2.1 src/sys/ufs/ffs/ffs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ffs/ffs_vfsops.c diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.362 src/sys/ufs/ffs/ffs_vfsops.c:1.362.2.1 --- src/sys/ufs/ffs/ffs_vfsops.c:1.362 Thu Jun 20 03:31:30 2019 +++ src/sys/ufs/ffs/ffs_vfsops.c Tue Nov 28 13:11:37 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_vfsops.c,v 1.362 2019/06/20 03:31:30 pgoyette Exp $ */ +/* $NetBSD: ffs_vfsops.c,v 1.362.2.1 2023/11/28 13:11:37 martin Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.362 2019/06/20 03:31:30 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.362.2.1 2023/11/28 13:11:37 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -1926,14 +1926,25 @@ ffs_sync(struct mount *mp, int waitfor, /* * Force stale file system control information to be flushed. */ - if (waitfor != MNT_LAZY && (ump->um_devvp->v_numoutput > 0 || - !LIST_EMPTY(>um_devvp->v_dirtyblkhd))) { - vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); - if ((error = VOP_FSYNC(ump->um_devvp, cred, - (waitfor == MNT_WAIT ? FSYNC_WAIT : 0) | FSYNC_NOLOG, - 0, 0)) != 0) - allerror = error; - VOP_UNLOCK(ump->um_devvp); + if (waitfor != MNT_LAZY) { + bool need_devvp_fsync; + + mutex_enter(ump->um_devvp->v_interlock); + need_devvp_fsync = (ump->um_devvp->v_numoutput > 0 || + !LIST_EMPTY(>um_devvp->v_dirtyblkhd)); + mutex_exit(ump->um_devvp->v_interlock); + if (need_devvp_fsync) { + int flags = FSYNC_NOLOG; + + if (waitfor == MNT_WAIT) +flags |= FSYNC_WAIT; + + vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); + if ((error = VOP_FSYNC(ump->um_devvp, cred, flags, 0, +0)) != 0) +allerror = error; + VOP_UNLOCK(ump->um_devvp); + } } #if defined(QUOTA) || defined(QUOTA2) qsync(mp);
CVS commit: [netbsd-9] src/sys/ufs/ffs
Module Name:src Committed By: martin Date: Tue Nov 28 13:11:38 UTC 2023 Modified Files: src/sys/ufs/ffs [netbsd-9]: ffs_vfsops.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1770): sys/ufs/ffs/ffs_vfsops.c: revision 1.382 ffs_sync: Avoid unlocked access to v_numoutput/v_dirtyblkhd. Found by lockdoc. PR kern/57606 To generate a diff of this commit: cvs rdiff -u -r1.362 -r1.362.2.1 src/sys/ufs/ffs/ffs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 27 20:01:40 UTC 2023 Modified Files: src/sys/kern [netbsd-9]: uipc_mbuf.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1768): sys/kern/uipc_mbuf.c: revision 1.252 mbuf: avoid assertion failure when splitting mbuf cluster >From OpenBSD: commit 7b4d35e0a60ba1dd4daf4b1c2932020a22463a89 Author: bluhm Date: Fri Oct 20 16:25:15 2023 + Avoid assertion failure when splitting mbuf cluster. m_split() calls m_align() to initialize the data pointer of newly allocated mbuf. If the new mbuf will be converted to a cluster, this is not necessary. If additionally the new mbuf is larger than MLEN, this can lead to a panic. Only call m_align() when a valid m_data is needed. This is the case if we do not refecence the existing cluster, but memcpy() the data into the new mbuf. Reported-by: syzbot+0e6817f5877926f0e...@syzkaller.appspotmail.com OK claudio@ deraadt@ The issue is harmless if DIAGNOSTIC is not enabled. To generate a diff of this commit: cvs rdiff -u -r1.232.4.2 -r1.232.4.3 src/sys/kern/uipc_mbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Mon Nov 27 20:01:40 UTC 2023 Modified Files: src/sys/kern [netbsd-9]: uipc_mbuf.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1768): sys/kern/uipc_mbuf.c: revision 1.252 mbuf: avoid assertion failure when splitting mbuf cluster >From OpenBSD: commit 7b4d35e0a60ba1dd4daf4b1c2932020a22463a89 Author: bluhm Date: Fri Oct 20 16:25:15 2023 + Avoid assertion failure when splitting mbuf cluster. m_split() calls m_align() to initialize the data pointer of newly allocated mbuf. If the new mbuf will be converted to a cluster, this is not necessary. If additionally the new mbuf is larger than MLEN, this can lead to a panic. Only call m_align() when a valid m_data is needed. This is the case if we do not refecence the existing cluster, but memcpy() the data into the new mbuf. Reported-by: syzbot+0e6817f5877926f0e...@syzkaller.appspotmail.com OK claudio@ deraadt@ The issue is harmless if DIAGNOSTIC is not enabled. To generate a diff of this commit: cvs rdiff -u -r1.232.4.2 -r1.232.4.3 src/sys/kern/uipc_mbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/uipc_mbuf.c diff -u src/sys/kern/uipc_mbuf.c:1.232.4.2 src/sys/kern/uipc_mbuf.c:1.232.4.3 --- src/sys/kern/uipc_mbuf.c:1.232.4.2 Mon Oct 25 15:47:50 2021 +++ src/sys/kern/uipc_mbuf.c Mon Nov 27 20:01:40 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_mbuf.c,v 1.232.4.2 2021/10/25 15:47:50 martin Exp $ */ +/* $NetBSD: uipc_mbuf.c,v 1.232.4.3 2023/11/27 20:01:40 martin Exp $ */ /* * Copyright (c) 1999, 2001, 2018 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.232.4.2 2021/10/25 15:47:50 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.232.4.3 2023/11/27 20:01:40 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_mbuftrace.h" @@ -1273,10 +1273,7 @@ m_split_internal(struct mbuf *m0, int le len_save = m0->m_pkthdr.len; m0->m_pkthdr.len = len0; - if (m->m_flags & M_EXT) - goto extpacket; - - if (remain > MHLEN) { + if ((m->m_flags & M_EXT) == 0 && remain > MHLEN) { /* m can't be the lead packet */ m_align(n, 0); n->m_len = 0; @@ -1287,8 +1284,6 @@ m_split_internal(struct mbuf *m0, int le return NULL; } return n; - } else { - m_align(n, remain); } } else if (remain == 0) { n = m->m_next; @@ -1299,14 +1294,13 @@ m_split_internal(struct mbuf *m0, int le if (n == NULL) return NULL; MCLAIM(n, m->m_owner); - m_align(n, remain); } -extpacket: if (m->m_flags & M_EXT) { n->m_data = m->m_data + len; MCLADDREFERENCE(m, n); } else { + m_align(n, remain); memcpy(mtod(n, void *), mtod(m, char *) + len, remain); }
CVS commit: [netbsd-9] src/sys/dev/acpi
Module Name:src Committed By: martin Date: Mon Nov 27 19:39:54 UTC 2023 Modified Files: src/sys/dev/acpi [netbsd-9]: acpi.c Log Message: Pull up following revision(s) (requested by abs in ticket #1765): sys/dev/acpi/acpi.c: revision 1.284 Stop walking MADT / GTDT subtables if we hit a header with length 0 To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.278.4.1 src/sys/dev/acpi/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.278 src/sys/dev/acpi/acpi.c:1.278.4.1 --- src/sys/dev/acpi/acpi.c:1.278 Sun Oct 21 13:41:15 2018 +++ src/sys/dev/acpi/acpi.c Mon Nov 27 19:39:53 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.278 2018/10/21 13:41:15 jmcneill Exp $ */ +/* $NetBSD: acpi.c,v 1.278.4.1 2023/11/27 19:39:53 martin Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.278 2018/10/21 13:41:15 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.278.4.1 2023/11/27 19:39:53 martin Exp $"); #include "pci.h" #include "opt_acpi.h" @@ -1757,7 +1757,7 @@ acpi_madt_walk(ACPI_STATUS (*func)(ACPI_ hdrp = (ACPI_SUBTABLE_HEADER *)where; - if (ACPI_FAILURE(func(hdrp, aux))) + if (hdrp->Length == 0 || ACPI_FAILURE(func(hdrp, aux))) break; where += hdrp->Length; @@ -1777,7 +1777,7 @@ acpi_gtdt_walk(ACPI_STATUS (*func)(ACPI_ hdrp = (ACPI_GTDT_HEADER *)where; - if (ACPI_FAILURE(func(hdrp, aux))) + if (hdrp->Length == 0 || ACPI_FAILURE(func(hdrp, aux))) break; where += hdrp->Length;
CVS commit: [netbsd-9] src/sys/dev/acpi
Module Name:src Committed By: martin Date: Mon Nov 27 19:39:54 UTC 2023 Modified Files: src/sys/dev/acpi [netbsd-9]: acpi.c Log Message: Pull up following revision(s) (requested by abs in ticket #1765): sys/dev/acpi/acpi.c: revision 1.284 Stop walking MADT / GTDT subtables if we hit a header with length 0 To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.278.4.1 src/sys/dev/acpi/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/newsmips/dev
Module Name:src Committed By: martin Date: Mon Nov 27 19:32:23 UTC 2023 Modified Files: src/sys/arch/newsmips/dev [netbsd-9]: dmac_0448.h scsi_1185.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1764): sys/arch/newsmips/dev/dmac_0448.h: revision 1.7 sys/arch/newsmips/dev/scsi_1185.c: revision 1.25 Use DELAY(9), not empty for() loop that could be optimized out. No visible regression on NWS-3260 and NWS-3470. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.96.1 src/sys/arch/newsmips/dev/dmac_0448.h cvs rdiff -u -r1.23 -r1.23.20.1 src/sys/arch/newsmips/dev/scsi_1185.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/newsmips/dev/dmac_0448.h diff -u src/sys/arch/newsmips/dev/dmac_0448.h:1.6 src/sys/arch/newsmips/dev/dmac_0448.h:1.6.96.1 --- src/sys/arch/newsmips/dev/dmac_0448.h:1.6 Wed Apr 9 15:40:30 2008 +++ src/sys/arch/newsmips/dev/dmac_0448.h Mon Nov 27 19:32:23 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dmac_0448.h,v 1.6 2008/04/09 15:40:30 tsutsui Exp $ */ +/* $NetBSD: dmac_0448.h,v 1.6.96.1 2023/11/27 19:32:23 martin Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -120,7 +120,7 @@ struct dm_stat { unsigned int dm_width; }; -#define DMAC_WAIT nops(10) +#define DMAC_WAIT DELAY(1) #define PINTEN 0xbfc80001 # define DMA_INTEN 0x10 Index: src/sys/arch/newsmips/dev/scsi_1185.c diff -u src/sys/arch/newsmips/dev/scsi_1185.c:1.23 src/sys/arch/newsmips/dev/scsi_1185.c:1.23.20.1 --- src/sys/arch/newsmips/dev/scsi_1185.c:1.23 Thu Jul 21 19:49:58 2016 +++ src/sys/arch/newsmips/dev/scsi_1185.c Mon Nov 27 19:32:23 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: scsi_1185.c,v 1.23 2016/07/21 19:49:58 christos Exp $ */ +/* $NetBSD: scsi_1185.c,v 1.23.20.1 2023/11/27 19:32:23 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.23 2016/07/21 19:49:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.23.20.1 2023/11/27 19:32:23 martin Exp $"); #define __INTR_PRIVATE #include @@ -116,10 +116,9 @@ __KERNEL_RCSID(0, "$NetBSD: scsi_1185.c, #define splscsi splsc #if defined(__mips__) && defined(CPU_SINGLE) -#define nops(x) { int __i; for (__i = 0; __i < (x); __i++) ; } -#define DMAC_WAIT0 ; +#define DMAC_WAIT0 __nothing #else -#define DMAC_WAIT0 DMAC_WAIT +#define DMAC_WAIT0 DMAC_WAIT /* see MODIFY HISTORY comment above */ #endif #ifdef DMAC_MAP_INIT
CVS commit: [netbsd-9] src/sys/arch/newsmips/dev
Module Name:src Committed By: martin Date: Mon Nov 27 19:32:23 UTC 2023 Modified Files: src/sys/arch/newsmips/dev [netbsd-9]: dmac_0448.h scsi_1185.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1764): sys/arch/newsmips/dev/dmac_0448.h: revision 1.7 sys/arch/newsmips/dev/scsi_1185.c: revision 1.25 Use DELAY(9), not empty for() loop that could be optimized out. No visible regression on NWS-3260 and NWS-3470. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.96.1 src/sys/arch/newsmips/dev/dmac_0448.h cvs rdiff -u -r1.23 -r1.23.20.1 src/sys/arch/newsmips/dev/scsi_1185.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/newsmips
Module Name:src Committed By: martin Date: Sun Nov 5 17:47:07 UTC 2023 Modified Files: src/sys/arch/newsmips/conf [netbsd-9]: GENERIC INSTALL src/sys/arch/newsmips/dev [netbsd-9]: fb.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1763): sys/arch/newsmips/dev/fb.c: revision 1.34 sys/arch/newsmips/conf/GENERIC: revision 1.146 sys/arch/newsmips/conf/INSTALL: revision 1.49 sys/arch/newsmips/dev/fb.c: revision 1.30 sys/arch/newsmips/dev/fb.c: revision 1.31 sys/arch/newsmips/dev/fb.c: revision 1.32 sys/arch/newsmips/dev/fb.c: revision 1.33 Make local functions and variables static. Use proper C99 exact-width integer types. Use C99 designated struct initializers. Remove trailing spaces and tab. Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines. Tested on NWS-3260, which was sent from ryo@'s belongins and repaired by me, and also tested on my NWS-3470D, including Xorg mono server. (Note X.org server on NEWS machines requires keymap modifications) Also add proper initialization on consinit() in NMB-253 case. To generate a diff of this commit: cvs rdiff -u -r1.137.2.1 -r1.137.2.2 src/sys/arch/newsmips/conf/GENERIC cvs rdiff -u -r1.47 -r1.47.4.1 src/sys/arch/newsmips/conf/INSTALL cvs rdiff -u -r1.26 -r1.26.34.1 src/sys/arch/newsmips/dev/fb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/newsmips/conf/GENERIC diff -u src/sys/arch/newsmips/conf/GENERIC:1.137.2.1 src/sys/arch/newsmips/conf/GENERIC:1.137.2.2 --- src/sys/arch/newsmips/conf/GENERIC:1.137.2.1 Sun Nov 5 17:30:38 2023 +++ src/sys/arch/newsmips/conf/GENERIC Sun Nov 5 17:47:07 2023 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.137.2.1 2023/11/05 17:30:38 martin Exp $ +# $NetBSD: GENERIC,v 1.137.2.2 2023/11/05 17:47:07 martin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/newsmips/conf/std.newsmip options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.137.2.1 $" +#ident "GENERIC-$Revision: 1.137.2.2 $" maxusers 16 @@ -166,6 +166,7 @@ zstty4 at zsc2 channel 0 # tty04 zstty5 at zsc2 channel 1 # tty05 fb0 at hb0 addr 0x8800 # NWB-253 frame buffer +fb0 at hb0 addr 0x9020 # LCD-MONO on NWS-32x0 wsdisplay0 at fb? console ? xafb* at ap?# "XA" frame buffer Index: src/sys/arch/newsmips/conf/INSTALL diff -u src/sys/arch/newsmips/conf/INSTALL:1.47 src/sys/arch/newsmips/conf/INSTALL:1.47.4.1 --- src/sys/arch/newsmips/conf/INSTALL:1.47 Thu Feb 7 04:33:58 2019 +++ src/sys/arch/newsmips/conf/INSTALL Sun Nov 5 17:47:07 2023 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.47 2019/02/07 04:33:58 mrg Exp $ +# $NetBSD: INSTALL,v 1.47.4.1 2023/11/05 17:47:07 martin Exp $ # # INSTALL kernel for RISC-NEWS @@ -81,7 +81,8 @@ zsc0 at ap? zstty0 at zsc0 channel 0 # tty00 zstty1 at zsc0 channel 1 # tty01 -fb0 at hb0 addr 0x8800 # frame buffer +fb0 at hb0 addr 0x8800 # NWB-253 frame buffer +fb0 at hb0 addr 0x9020 # LCD-MONO on NWS-32x0 xafb* at ap? kb0 at ap? Index: src/sys/arch/newsmips/dev/fb.c diff -u src/sys/arch/newsmips/dev/fb.c:1.26 src/sys/arch/newsmips/dev/fb.c:1.26.34.1 --- src/sys/arch/newsmips/dev/fb.c:1.26 Fri Jan 31 15:43:06 2014 +++ src/sys/arch/newsmips/dev/fb.c Sun Nov 5 17:47:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: fb.c,v 1.26 2014/01/31 15:43:06 tsutsui Exp $ */ +/* $NetBSD: fb.c,v 1.26.34.1 2023/11/05 17:47:07 martin Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -25,9 +25,32 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/*- + * Copyright (c) 2023 Izumi Tsutsui. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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
CVS commit: [netbsd-9] src/sys/arch/newsmips
Module Name:src Committed By: martin Date: Sun Nov 5 17:47:07 UTC 2023 Modified Files: src/sys/arch/newsmips/conf [netbsd-9]: GENERIC INSTALL src/sys/arch/newsmips/dev [netbsd-9]: fb.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1763): sys/arch/newsmips/dev/fb.c: revision 1.34 sys/arch/newsmips/conf/GENERIC: revision 1.146 sys/arch/newsmips/conf/INSTALL: revision 1.49 sys/arch/newsmips/dev/fb.c: revision 1.30 sys/arch/newsmips/dev/fb.c: revision 1.31 sys/arch/newsmips/dev/fb.c: revision 1.32 sys/arch/newsmips/dev/fb.c: revision 1.33 Make local functions and variables static. Use proper C99 exact-width integer types. Use C99 designated struct initializers. Remove trailing spaces and tab. Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines. Tested on NWS-3260, which was sent from ryo@'s belongins and repaired by me, and also tested on my NWS-3470D, including Xorg mono server. (Note X.org server on NEWS machines requires keymap modifications) Also add proper initialization on consinit() in NMB-253 case. To generate a diff of this commit: cvs rdiff -u -r1.137.2.1 -r1.137.2.2 src/sys/arch/newsmips/conf/GENERIC cvs rdiff -u -r1.47 -r1.47.4.1 src/sys/arch/newsmips/conf/INSTALL cvs rdiff -u -r1.26 -r1.26.34.1 src/sys/arch/newsmips/dev/fb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/newsmips/conf
Module Name:src Committed By: martin Date: Sun Nov 5 17:30:38 UTC 2023 Modified Files: src/sys/arch/newsmips/conf [netbsd-9]: DEJIKO GENERIC WAPIKO Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1759): sys/arch/newsmips/conf/GENERIC: revision 1.144 sys/arch/newsmips/conf/WAPIKO: revision 1.50 sys/arch/newsmips/conf/DEJIKO: revision 1.36 Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/arch/newsmips/conf/DEJIKO cvs rdiff -u -r1.137 -r1.137.2.1 src/sys/arch/newsmips/conf/GENERIC cvs rdiff -u -r1.49 -r1.49.4.1 src/sys/arch/newsmips/conf/WAPIKO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/newsmips/conf/DEJIKO diff -u src/sys/arch/newsmips/conf/DEJIKO:1.35 src/sys/arch/newsmips/conf/DEJIKO:1.35.4.1 --- src/sys/arch/newsmips/conf/DEJIKO:1.35 Wed Aug 1 20:04:13 2018 +++ src/sys/arch/newsmips/conf/DEJIKO Sun Nov 5 17:30:38 2023 @@ -1,4 +1,4 @@ -# $NetBSD: DEJIKO,v 1.35 2018/08/01 20:04:13 maxv Exp $ +# $NetBSD: DEJIKO,v 1.35.4.1 2023/11/05 17:30:38 martin Exp $ # # Dejiko's sekai-seifuku NEWS5000 nyo. @@ -45,7 +45,8 @@ include "conf/compat_netbsd14.config" # wscons options options WSEMUL_VT100 # VT100 / VT220 emulation options WSDISPLAY_COMPAT_USL # wsconscfg VT handling -options FONT_GALLANT12x22 +#options FONT_GALLANT12x22 +options FONT_SONY12x24 config netbsd root on ? type ? Index: src/sys/arch/newsmips/conf/GENERIC diff -u src/sys/arch/newsmips/conf/GENERIC:1.137 src/sys/arch/newsmips/conf/GENERIC:1.137.2.1 --- src/sys/arch/newsmips/conf/GENERIC:1.137 Fri Apr 26 21:40:31 2019 +++ src/sys/arch/newsmips/conf/GENERIC Sun Nov 5 17:30:38 2023 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.137 2019/04/26 21:40:31 sevan Exp $ +# $NetBSD: GENERIC,v 1.137.2.1 2023/11/05 17:30:38 martin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/newsmips/conf/std.newsmip options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.137 $" +#ident "GENERIC-$Revision: 1.137.2.1 $" maxusers 16 @@ -124,7 +124,8 @@ options NFS_BOOT_DHCP # wscons options options WSEMUL_VT100 # VT100 / VT220 emulation options WSDISPLAY_COMPAT_USL # wsconscfg VT handling -options FONT_GALLANT12x22 +#options FONT_GALLANT12x22 +options FONT_SONY12x24 config netbsd root on ? type ? Index: src/sys/arch/newsmips/conf/WAPIKO diff -u src/sys/arch/newsmips/conf/WAPIKO:1.49 src/sys/arch/newsmips/conf/WAPIKO:1.49.4.1 --- src/sys/arch/newsmips/conf/WAPIKO:1.49 Wed Aug 1 20:04:13 2018 +++ src/sys/arch/newsmips/conf/WAPIKO Sun Nov 5 17:30:38 2023 @@ -1,7 +1,7 @@ # # NEWS3400 config file # -# $NetBSD: WAPIKO,v 1.49 2018/08/01 20:04:13 maxv Exp $ +# $NetBSD: WAPIKO,v 1.49.4.1 2023/11/05 17:30:38 martin Exp $ # include "arch/newsmips/conf/std.newsmips" @@ -84,7 +84,8 @@ sd* at scsibus? target ? lun ? # SCSI di options WSEMUL_VT100 # VT100 / VT220 emulation options WSDISPLAY_COMPAT_USL # wsconscfg VT handling -options FONT_GALLANT12x22 +#options FONT_GALLANT12x22 +options FONT_SONY12x24 wsdisplay0 at fb? console ? wskbd0 at kb? console ?
CVS commit: [netbsd-9] src/sys/arch/newsmips/conf
Module Name:src Committed By: martin Date: Sun Nov 5 17:30:38 UTC 2023 Modified Files: src/sys/arch/newsmips/conf [netbsd-9]: DEJIKO GENERIC WAPIKO Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1759): sys/arch/newsmips/conf/GENERIC: revision 1.144 sys/arch/newsmips/conf/WAPIKO: revision 1.50 sys/arch/newsmips/conf/DEJIKO: revision 1.36 Use FONT_SONY12x24 for Sony fans, rather than Gallant fonts used on Sun. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/arch/newsmips/conf/DEJIKO cvs rdiff -u -r1.137 -r1.137.2.1 src/sys/arch/newsmips/conf/GENERIC cvs rdiff -u -r1.49 -r1.49.4.1 src/sys/arch/newsmips/conf/WAPIKO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/newsmips/dev
Module Name:src Committed By: martin Date: Sun Nov 5 17:08:09 UTC 2023 Modified Files: src/sys/arch/newsmips/dev [netbsd-9]: zs_hb.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1760): sys/arch/newsmips/dev/zs_hb.c: revision 1.30 Don't use aprint_error(9) for a normal attach message. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.20.1 src/sys/arch/newsmips/dev/zs_hb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/newsmips/dev/zs_hb.c diff -u src/sys/arch/newsmips/dev/zs_hb.c:1.27 src/sys/arch/newsmips/dev/zs_hb.c:1.27.20.1 --- src/sys/arch/newsmips/dev/zs_hb.c:1.27 Thu Jul 21 19:49:58 2016 +++ src/sys/arch/newsmips/dev/zs_hb.c Sun Nov 5 17:08:08 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: zs_hb.c,v 1.27 2016/07/21 19:49:58 christos Exp $ */ +/* $NetBSD: zs_hb.c,v 1.27.20.1 2023/11/05 17:08:08 martin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1.27 2016/07/21 19:49:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs_hb.c,v 1.27.20.1 2023/11/05 17:08:08 martin Exp $"); #include #include @@ -214,7 +214,7 @@ zs_hb_attach(device_t parent, device_t s #endif } - aprint_error(" level %d\n", intlevel); + aprint_normal(" level %d\n", intlevel); zs_delay = zs_hb_delay;
CVS commit: [netbsd-9] src/sys/arch/newsmips/dev
Module Name:src Committed By: martin Date: Sun Nov 5 17:08:09 UTC 2023 Modified Files: src/sys/arch/newsmips/dev [netbsd-9]: zs_hb.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1760): sys/arch/newsmips/dev/zs_hb.c: revision 1.30 Don't use aprint_error(9) for a normal attach message. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.20.1 src/sys/arch/newsmips/dev/zs_hb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:12:10 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #1756): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.22.4.1 -r1.22.4.2 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/mpii.c diff -u src/sys/dev/pci/mpii.c:1.22.4.1 src/sys/dev/pci/mpii.c:1.22.4.2 --- src/sys/dev/pci/mpii.c:1.22.4.1 Sun Aug 9 14:14:34 2020 +++ src/sys/dev/pci/mpii.c Thu Oct 26 15:12:10 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.22.4.1 2020/08/09 14:14:34 martin Exp $ */ +/* $NetBSD: mpii.c,v 1.22.4.2 2023/10/26 15:12:10 martin Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.22.4.1 2020/08/09 14:14:34 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.22.4.2 2023/10/26 15:12:10 martin Exp $"); #include "bio.h" @@ -3225,7 +3225,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) } KASSERT(xs->error == XS_NOERROR); - KASSERT(xs->resid == xs->datalen); KASSERT(xs->status == SCSI_OK); if (ccb->ccb_rcb == NULL) { @@ -3285,7 +3284,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) break; case MPII_SCSIIO_STATUS_CHECK_COND: - xs->resid = 0; xs->error = XS_SENSE; break;
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:12:10 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #1756): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.22.4.1 -r1.22.4.2 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Wed Oct 18 15:07:06 UTC 2023 Modified Files: src/sys/kern [netbsd-9]: subr_thmap.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1755): sys/kern/subr_thmap.c: revision 1.14 sys/kern/subr_thmap.c: revision 1.15 thmap(9): Test alloc failure, not THMAP_GETPTR failure. THMAP_GETPTR may return nonnull even though alloc returned zero. Note that this failure branch is not actually appropriate; thmap_create should not fail. We really need to pass KM_SLEEP through in this call site even though there are other call sites for which KM_NOSLEEP is appropriate. Adapted from: https://github.com/rmind/thmap/pull/14 PR kern/57666 https://github.com/rmind/thmap/issues/13 thmap(9): Preallocate GC list storage for thmap_del. thmap_del can't fail, and it is used in places in npf where sleeping is forbidden, so it can't rely on allocating memory either. Instead of having thmap_del allocate memory on the fly for each object to defer freeing until thmap_gc, arrange to have thmap(9) preallocate the same storage when allocating all the objects in the first place, with a GC header. This is suboptimal for memory usage, especially on insertion- and lookup-heavy but deletion-light workloads, but it's not clear rmind's alternative (https://github.com/rmind/thmap/tree/thmap_del_mem_fail) is ready to use yet, so we'll go with this for correctness. PR kern/57208 https://github.com/rmind/npf/issues/129 To generate a diff of this commit: cvs rdiff -u -r1.5.6.1 -r1.5.6.2 src/sys/kern/subr_thmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/kern
Module Name:src Committed By: martin Date: Wed Oct 18 15:07:06 UTC 2023 Modified Files: src/sys/kern [netbsd-9]: subr_thmap.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1755): sys/kern/subr_thmap.c: revision 1.14 sys/kern/subr_thmap.c: revision 1.15 thmap(9): Test alloc failure, not THMAP_GETPTR failure. THMAP_GETPTR may return nonnull even though alloc returned zero. Note that this failure branch is not actually appropriate; thmap_create should not fail. We really need to pass KM_SLEEP through in this call site even though there are other call sites for which KM_NOSLEEP is appropriate. Adapted from: https://github.com/rmind/thmap/pull/14 PR kern/57666 https://github.com/rmind/thmap/issues/13 thmap(9): Preallocate GC list storage for thmap_del. thmap_del can't fail, and it is used in places in npf where sleeping is forbidden, so it can't rely on allocating memory either. Instead of having thmap_del allocate memory on the fly for each object to defer freeing until thmap_gc, arrange to have thmap(9) preallocate the same storage when allocating all the objects in the first place, with a GC header. This is suboptimal for memory usage, especially on insertion- and lookup-heavy but deletion-light workloads, but it's not clear rmind's alternative (https://github.com/rmind/thmap/tree/thmap_del_mem_fail) is ready to use yet, so we'll go with this for correctness. PR kern/57208 https://github.com/rmind/npf/issues/129 To generate a diff of this commit: cvs rdiff -u -r1.5.6.1 -r1.5.6.2 src/sys/kern/subr_thmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_thmap.c diff -u src/sys/kern/subr_thmap.c:1.5.6.1 src/sys/kern/subr_thmap.c:1.5.6.2 --- src/sys/kern/subr_thmap.c:1.5.6.1 Mon May 25 17:19:37 2020 +++ src/sys/kern/subr_thmap.c Wed Oct 18 15:07:06 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_thmap.c,v 1.5.6.1 2020/05/25 17:19:37 martin Exp $ */ +/* $NetBSD: subr_thmap.c,v 1.5.6.2 2023/10/18 15:07:06 martin Exp $ */ /*- * Copyright (c) 2018 Mindaugas Rasiukevicius @@ -111,7 +111,7 @@ #include "utils.h" #endif -THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5.6.1 2020/05/25 17:19:37 martin Exp $"); +THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5.6.2 2023/10/18 15:07:06 martin Exp $"); /* * NetBSD kernel wrappers @@ -207,11 +207,17 @@ typedef struct { uint32_t hashval; // current hash value } thmap_query_t; -typedef struct { - uintptr_t addr; +union thmap_align { + void * p; + uint64_t v; +}; + +typedef struct thmap_gc thmap_gc_t; +struct thmap_gc { size_t len; - void * next; -} thmap_gc_t; + thmap_gc_t * next; + char data[] __aligned(sizeof(union thmap_align)); +}; #define THMAP_ROOT_LEN (sizeof(thmap_ptr_t) * ROOT_SIZE) @@ -246,6 +252,34 @@ static const thmap_ops_t thmap_default_o .free = free_wrapper }; +static uintptr_t +gc_alloc(const thmap_t *thmap, size_t len) +{ + const size_t alloclen = offsetof(struct thmap_gc, data[len]); + const uintptr_t gcaddr = thmap->ops->alloc(alloclen); + + if (!gcaddr) + return 0; + + thmap_gc_t *const gc = THMAP_GETPTR(thmap, gcaddr); + gc->len = len; + return THMAP_GETOFF(thmap, >data[0]); +} + +static void +gc_free(const thmap_t *thmap, uintptr_t addr, size_t len) +{ + const size_t alloclen = offsetof(struct thmap_gc, data[len]); + char *const ptr = THMAP_GETPTR(thmap, addr); + thmap_gc_t *const gc = container_of(ptr, struct thmap_gc, data[0]); + const uintptr_t gcaddr = THMAP_GETOFF(thmap, gc); + + KASSERTMSG(gc->len == len, "thmap=%p ops=%p addr=%p len=%zu" + " gc=%p gc->len=%zu", + thmap, thmap->ops, (void *)addr, len, gc, gc->len); + thmap->ops->free(gcaddr, alloclen); +} + /* * NODE LOCKING. */ @@ -361,7 +395,7 @@ node_create(thmap_t *thmap, thmap_inode_ thmap_inode_t *node; uintptr_t p; - p = thmap->ops->alloc(THMAP_INODE_LEN); + p = gc_alloc(thmap, THMAP_INODE_LEN); if (!p) { return NULL; } @@ -422,7 +456,7 @@ leaf_create(const thmap_t *thmap, const thmap_leaf_t *leaf; uintptr_t leaf_off, key_off; - leaf_off = thmap->ops->alloc(sizeof(thmap_leaf_t)); + leaf_off = gc_alloc(thmap, sizeof(thmap_leaf_t)); if (!leaf_off) { return NULL; } @@ -433,9 +467,9 @@ leaf_create(const thmap_t *thmap, const /* * Copy the key. */ - key_off = thmap->ops->alloc(len); + key_off = gc_alloc(thmap, len); if (!key_off) { - thmap->ops->free(leaf_off, sizeof(thmap_leaf_t)); + gc_free(thmap, leaf_off, sizeof(thmap_leaf_t)); return NULL; } memcpy(THMAP_GETPTR(thmap, key_off), key, len); @@ -453,9 +487,9 @@ static void leaf_free(const thmap_t *thmap, thmap_leaf_t *leaf) { if ((thmap->flags & THMAP_NOCOPY) == 0) { - thmap->ops->free(leaf->key, leaf->len); + gc_free(thmap, leaf->key, leaf->len); } - thmap->ops->free(THMAP_GETOFF(thmap, leaf), sizeof(thmap_leaf_t)); + gc_free(thmap, THMAP_GETOFF(thmap, leaf),
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Wed Oct 18 14:35:17 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h Log Message: Regen for ticket #1915 To generate a diff of this commit: cvs rdiff -u -r1.1371.2.20 -r1.1371.2.21 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1370.2.20 -r1.1370.2.21 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Wed Oct 18 14:29:19 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c if_wmvar.h pcidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1754): sys/dev/pci/pcidevs: revision 1.1497 sys/dev/pci/if_wm.c: revision 1.790 sys/dev/pci/if_wm.c: revision 1.791 sys/dev/pci/if_wmvar.h: revision 1.51 pcidevs: Add Intel I219{V,LM}({22,23}) wm(4): Add a new workaround for Tiger Lake and newer. - Define new WM_T_PCH_TGP and use it for Tiger Lake and newer. Note that we don't define WM_T_PCH_ADP because we have no any Alder Lake specific workaround yet. - Add new workaround for Tiger Lake (and newer) in wm_init_locked() to avoid packet loss. wm(4): Add I219{V,LM}({22,23}) devices (Raptor Lake). To generate a diff of this commit: cvs rdiff -u -r1.645.2.18 -r1.645.2.19 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.44.4.6 -r1.44.4.7 src/sys/dev/pci/if_wmvar.h cvs rdiff -u -r1.1383.2.20 -r1.1383.2.21 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Wed Oct 18 14:29:19 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c if_wmvar.h pcidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1754): sys/dev/pci/pcidevs: revision 1.1497 sys/dev/pci/if_wm.c: revision 1.790 sys/dev/pci/if_wm.c: revision 1.791 sys/dev/pci/if_wmvar.h: revision 1.51 pcidevs: Add Intel I219{V,LM}({22,23}) wm(4): Add a new workaround for Tiger Lake and newer. - Define new WM_T_PCH_TGP and use it for Tiger Lake and newer. Note that we don't define WM_T_PCH_ADP because we have no any Alder Lake specific workaround yet. - Add new workaround for Tiger Lake (and newer) in wm_init_locked() to avoid packet loss. wm(4): Add I219{V,LM}({22,23}) devices (Raptor Lake). To generate a diff of this commit: cvs rdiff -u -r1.645.2.18 -r1.645.2.19 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.44.4.6 -r1.44.4.7 src/sys/dev/pci/if_wmvar.h cvs rdiff -u -r1.1383.2.20 -r1.1383.2.21 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.645.2.18 src/sys/dev/pci/if_wm.c:1.645.2.19 --- src/sys/dev/pci/if_wm.c:1.645.2.18 Sun Oct 8 15:28:49 2023 +++ src/sys/dev/pci/if_wm.c Wed Oct 18 14:29:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.645.2.18 2023/10/08 15:28:49 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.645.2.19 2023/10/18 14:29:18 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.18 2023/10/08 15:28:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.19 2023/10/18 14:29:18 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1742,25 +1742,31 @@ static const struct wm_product { WM_T_PCH_SPT, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM13, "I219 LM (13) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM14, "I219 LM (14) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM15, "I219 LM (15) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM16, "I219 LM (16) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM17, "I219 LM (17) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM18, "I219 LM (18) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM19, "I219 LM (19) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM22, + "I219 LM (22) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM23, + "I219 LM (23) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V, "I219 V Ethernet Connection", WM_T_PCH_SPT, WMP_F_COPPER }, @@ -1796,25 +1802,31 @@ static const struct wm_product { WM_T_PCH_SPT, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V13, "I219 V (13) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V14, "I219 V (14) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V15, "I219 V (15) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V16, "I219 V (16) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V17, "I219 V (17) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V18, "I219 V (18) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V19, "I219 V (19) Ethernet Connection", - WM_T_PCH_CNP, WMP_F_COPPER }, + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V22, + "I219 V (22) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */ + { PCI_VENDOR_INTEL,
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Wed Oct 18 14:05:28 UTC 2023 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82599.c ixgbe_api.c ixgbe_bypass.h ixgbe_common.c ixgbe_common.h ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_type.h ixgbe_x540.c ixgbe_x550.c ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1753: sys/dev/pci/ixgbe/ix_txrx.c 1.103-1.104 sys/dev/pci/ixgbe/ixgbe.c 1.334-1.338, 1.341-1.344 via patch sys/dev/pci/ixgbe/ixgbe.h 1.90-1.93 sys/dev/pci/ixgbe/ixgbe_82599.c 1.31-1.32 sys/dev/pci/ixgbe/ixgbe_api.c 1.29 sys/dev/pci/ixgbe/ixgbe_bypass.h1.5 sys/dev/pci/ixgbe/ixgbe_common.c1.46-1.47 sys/dev/pci/ixgbe/ixgbe_common.h1.18 sys/dev/pci/ixgbe/ixgbe_dcb.c 1.14-1.15 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.13 sys/dev/pci/ixgbe/ixgbe_type.h 1.59-1.61 sys/dev/pci/ixgbe/ixgbe_x540.c 1.24 sys/dev/pci/ixgbe/ixgbe_x550.c 1.28 sys/dev/pci/ixgbe/ixv.c 1.187-1.192 - ixg(4): Add 82599 LS support once again. - ixg(4): Filter out spurious link up indication more. - ixg(4): Print DEVICE_CAPS register. - ixg(4): Fix a bug that the number of queues is unintentionally limited to a small number or wrong error message may be printed when two devices' number of MSI-X vectors are different. - Modify error message of wrong TX/RX descriptor size. - Enable interrupt after setting IFF_RUNNING. - Fix a bug that changing hw.ix[gv]X.qY.interrupt_rate would change all devices all queues default interrupt rate. - Cleanup the code. To generate a diff of this commit: cvs rdiff -u -r1.54.2.13 -r1.54.2.14 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.28 -r1.199.2.29 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.11 -r1.56.2.12 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.21.4.5 -r1.21.4.6 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.23.2.4 -r1.23.2.5 src/sys/dev/pci/ixgbe/ixgbe_api.c cvs rdiff -u -r1.1.14.3 -r1.1.14.4 src/sys/dev/pci/ixgbe/ixgbe_bypass.h cvs rdiff -u -r1.25.2.8 -r1.25.2.9 src/sys/dev/pci/ixgbe/ixgbe_common.c cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/pci/ixgbe/ixgbe_common.h cvs rdiff -u -r1.9.4.2 -r1.9.4.3 src/sys/dev/pci/ixgbe/ixgbe_dcb.c cvs rdiff -u -r1.7.8.2 -r1.7.8.3 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c cvs rdiff -u -r1.41.2.10 -r1.41.2.11 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.16.8.4 -r1.16.8.5 src/sys/dev/pci/ixgbe/ixgbe_x540.c cvs rdiff -u -r1.15.2.7 -r1.15.2.8 src/sys/dev/pci/ixgbe/ixgbe_x550.c cvs rdiff -u -r1.125.2.23 -r1.125.2.24 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Wed Oct 18 14:05:28 UTC 2023 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82599.c ixgbe_api.c ixgbe_bypass.h ixgbe_common.c ixgbe_common.h ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_type.h ixgbe_x540.c ixgbe_x550.c ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1753: sys/dev/pci/ixgbe/ix_txrx.c 1.103-1.104 sys/dev/pci/ixgbe/ixgbe.c 1.334-1.338, 1.341-1.344 via patch sys/dev/pci/ixgbe/ixgbe.h 1.90-1.93 sys/dev/pci/ixgbe/ixgbe_82599.c 1.31-1.32 sys/dev/pci/ixgbe/ixgbe_api.c 1.29 sys/dev/pci/ixgbe/ixgbe_bypass.h1.5 sys/dev/pci/ixgbe/ixgbe_common.c1.46-1.47 sys/dev/pci/ixgbe/ixgbe_common.h1.18 sys/dev/pci/ixgbe/ixgbe_dcb.c 1.14-1.15 sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.13 sys/dev/pci/ixgbe/ixgbe_type.h 1.59-1.61 sys/dev/pci/ixgbe/ixgbe_x540.c 1.24 sys/dev/pci/ixgbe/ixgbe_x550.c 1.28 sys/dev/pci/ixgbe/ixv.c 1.187-1.192 - ixg(4): Add 82599 LS support once again. - ixg(4): Filter out spurious link up indication more. - ixg(4): Print DEVICE_CAPS register. - ixg(4): Fix a bug that the number of queues is unintentionally limited to a small number or wrong error message may be printed when two devices' number of MSI-X vectors are different. - Modify error message of wrong TX/RX descriptor size. - Enable interrupt after setting IFF_RUNNING. - Fix a bug that changing hw.ix[gv]X.qY.interrupt_rate would change all devices all queues default interrupt rate. - Cleanup the code. To generate a diff of this commit: cvs rdiff -u -r1.54.2.13 -r1.54.2.14 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.28 -r1.199.2.29 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.11 -r1.56.2.12 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.21.4.5 -r1.21.4.6 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.23.2.4 -r1.23.2.5 src/sys/dev/pci/ixgbe/ixgbe_api.c cvs rdiff -u -r1.1.14.3 -r1.1.14.4 src/sys/dev/pci/ixgbe/ixgbe_bypass.h cvs rdiff -u -r1.25.2.8 -r1.25.2.9 src/sys/dev/pci/ixgbe/ixgbe_common.c cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/pci/ixgbe/ixgbe_common.h cvs rdiff -u -r1.9.4.2 -r1.9.4.3 src/sys/dev/pci/ixgbe/ixgbe_dcb.c cvs rdiff -u -r1.7.8.2 -r1.7.8.3 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c cvs rdiff -u -r1.41.2.10 -r1.41.2.11 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.16.8.4 -r1.16.8.5 src/sys/dev/pci/ixgbe/ixgbe_x540.c cvs rdiff -u -r1.15.2.7 -r1.15.2.8 src/sys/dev/pci/ixgbe/ixgbe_x550.c cvs rdiff -u -r1.125.2.23 -r1.125.2.24 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.13 src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.14 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.13 Fri Oct 13 18:20:30 2023 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Wed Oct 18 14:05:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.54.2.13 2023/10/13 18:20:30 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.54.2.14 2023/10/18 14:05:27 martin Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.13 2023/10/13 18:20:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.14 2023/10/18 14:05:27 martin Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -846,7 +846,6 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, u8 ipproto = 0; char *l3d; - /* First check if TSO is to be used */ if (mp->m_pkthdr.csum_flags & (M_CSUM_TSOv4 | M_CSUM_TSOv6)) { int rv = ixgbe_tso_setup(txr, mp, cmd_type_len, olinfo_status); @@ -1282,9 +1281,9 @@ ixgbe_rsc_count(union ixgbe_adv_rx_desc static void ixgbe_setup_hw_rsc(struct rx_ring *rxr) { - struct ixgbe_softc *sc = rxr->sc; - struct ixgbe_hw *hw = >hw; - u32 rscctrl, rdrxctl; + struct ixgbe_softc *sc = rxr->sc; + struct ixgbe_hw *hw = >hw; + u32 rscctrl, rdrxctl; /* If turning LRO/RSC off we need to disable it */ if ((sc->ifp->if_capenable & IFCAP_LRO) == 0) { @@ -1746,9 +1745,9 @@ ixgbe_rx_input(struct rx_ring *rxr, stru (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) { /* * Send to the stack if: - ** - LRO not enabled, or - ** - no LRO resources, or - ** - lro enqueue fails + * - LRO not enabled, or +
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Wed Oct 18 12:11:53 UTC 2023 Modified Files: src/sys/arch/i386/stand/lib [netbsd-9]: biosdisk.c src/sys/dev/raidframe [netbsd-9]: rf_netbsdkintf.c src/sys/rump/librump/rumpkern [netbsd-9]: emul.c Log Message: Pull up following revision(s) (requested by manu in ticket #1751): sys/dev/raidframe/rf_netbsdkintf.c: revision 1.383 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.385 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.402 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.403 sys/arch/i386/stand/lib/biosdisk.c: revision 1.59 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.377 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.378 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.379 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.392 sys/rump/librump/rumpkern/emul.c: revision 1.200 sys/arch/i386/stand/lib/biosdisk.c: revision 1.60 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.416 (all via patch) Get >sc_dksc only when we know 'rsc' is not NULL. This was actually harmless because we didn't use the pointer then. Gcc -Os on landisk is not smart enough to follow the conditional initialization and warns, unconditionaly initialize dksc at declaration with a XXX gcc comment. Improve wording in comments in raid_dumpblock(). in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen. Nix trailing whitespace. if raidframe sets booted_device, log a debug message about it. merge two debug lines in auto-root selection. convert non-config-handled "DEBUG_ROOT" to aprint_debug(). now it's possible to get boot-time info about raidframe root device selection with simple "boot -x". Align the behavior of different boot methods in RAIDframe We enforce the documented and paritally implemented behavior when looking for the kernel in RAID 1 sets without a partition name given. We search for: - A GPT partition with bootme attribute set - A FFS or LFS patititon - The first partition Fix root search in RAID 1 sets We use the wedge information given by bootstrap, where the kernel was found. This requires src/sys/arch/i386/stand/i386/lib/biosdisk.c 1.59 to work in all cases. Fix build with -DNO_GPT To generate a diff of this commit: cvs rdiff -u -r1.49.6.4 -r1.49.6.5 src/sys/arch/i386/stand/lib/biosdisk.c cvs rdiff -u -r1.376.4.5 -r1.376.4.6 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.191 -r1.191.2.1 src/sys/rump/librump/rumpkern/emul.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/lib/biosdisk.c diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.49.6.4 src/sys/arch/i386/stand/lib/biosdisk.c:1.49.6.5 --- src/sys/arch/i386/stand/lib/biosdisk.c:1.49.6.4 Tue Dec 17 13:01:39 2019 +++ src/sys/arch/i386/stand/lib/biosdisk.c Wed Oct 18 12:11:53 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: biosdisk.c,v 1.49.6.4 2019/12/17 13:01:39 martin Exp $ */ +/* $NetBSD: biosdisk.c,v 1.49.6.5 2023/10/18 12:11:53 martin Exp $ */ /* * Copyright (c) 1996, 1998 @@ -105,6 +105,7 @@ struct biosdisk { struct biosdisk_ll ll; daddr_t boff; + daddr_t size; charbuf[BIOSDISK_BUFSIZE]; #if !defined(NO_DISKLABEL) || !defined(NO_GPT) struct biosdisk_partition part[BIOSDISKNPART]; @@ -326,7 +327,6 @@ guid_is_equal(const struct uuid *a, cons return (memcmp(a, b, sizeof(*a)) == 0 ? true : false); } -#ifndef NO_GPT static void part_name_utf8(const uint16_t *utf16_src, size_t utf16_srclen, char *utf8_dst, size_t utf8_dstlen) @@ -349,7 +349,6 @@ part_name_utf8(const uint16_t *utf16_src return; } -#endif static int check_gpt(struct biosdisk *d, daddr_t rf_offset, daddr_t sector) @@ -665,6 +664,7 @@ read_label(struct biosdisk *d, daddr_t o dflt_lbl.d_npartitions = 8; d->boff = 0; + d->size = 0; if (d->ll.type != BIOSDISK_TYPE_HD) /* No label on floppy and CD */ @@ -1206,7 +1206,7 @@ add_biosdisk_bootinfo(void) #endif #ifndef NO_GPT -static daddr_t +static void raidframe_part_offset(struct biosdisk *d, int part) { struct biosdisk raidframe; @@ -1219,8 +1219,10 @@ raidframe_part_offset(struct biosdisk *d rf_offset = d->part[part].offset + RF_PROTECTED_SECTORS; rf_size = d->part[part].size; - if (read_gpt(, rf_offset, rf_size) != 0) - return RF_PROTECTED_SECTORS; + if (read_gpt(, rf_offset, rf_size) != 0) { + d->boff += RF_PROTECTED_SECTORS; + return; + } candidate = 0; for (i = 0; i < BIOSDISKNPART; i++) { @@ -1229,12 +1231,20 @@ raidframe_part_offset(struct biosdisk *d if (raidframe.part[i].fstype == FS_UNUSED) continue; #ifndef NO_GPT - if (raidframe.part[i].attr & GPT_ENT_ATTR_BOOTME) + if (raidframe.part[i].attr & GPT_ENT_ATTR_BOOTME) { candidate = i; + break; + } #endif
CVS commit: [netbsd-9] src/sys
Module Name:src Committed By: martin Date: Wed Oct 18 12:11:53 UTC 2023 Modified Files: src/sys/arch/i386/stand/lib [netbsd-9]: biosdisk.c src/sys/dev/raidframe [netbsd-9]: rf_netbsdkintf.c src/sys/rump/librump/rumpkern [netbsd-9]: emul.c Log Message: Pull up following revision(s) (requested by manu in ticket #1751): sys/dev/raidframe/rf_netbsdkintf.c: revision 1.383 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.385 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.402 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.403 sys/arch/i386/stand/lib/biosdisk.c: revision 1.59 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.377 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.378 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.379 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.392 sys/rump/librump/rumpkern/emul.c: revision 1.200 sys/arch/i386/stand/lib/biosdisk.c: revision 1.60 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.416 (all via patch) Get >sc_dksc only when we know 'rsc' is not NULL. This was actually harmless because we didn't use the pointer then. Gcc -Os on landisk is not smart enough to follow the conditional initialization and warns, unconditionaly initialize dksc at declaration with a XXX gcc comment. Improve wording in comments in raid_dumpblock(). in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen. Nix trailing whitespace. if raidframe sets booted_device, log a debug message about it. merge two debug lines in auto-root selection. convert non-config-handled "DEBUG_ROOT" to aprint_debug(). now it's possible to get boot-time info about raidframe root device selection with simple "boot -x". Align the behavior of different boot methods in RAIDframe We enforce the documented and paritally implemented behavior when looking for the kernel in RAID 1 sets without a partition name given. We search for: - A GPT partition with bootme attribute set - A FFS or LFS patititon - The first partition Fix root search in RAID 1 sets We use the wedge information given by bootstrap, where the kernel was found. This requires src/sys/arch/i386/stand/i386/lib/biosdisk.c 1.59 to work in all cases. Fix build with -DNO_GPT To generate a diff of this commit: cvs rdiff -u -r1.49.6.4 -r1.49.6.5 src/sys/arch/i386/stand/lib/biosdisk.c cvs rdiff -u -r1.376.4.5 -r1.376.4.6 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.191 -r1.191.2.1 src/sys/rump/librump/rumpkern/emul.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 18:42:51 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h Log Message: Regen for ticket #1750 (Intel 82599 LS and Pericom(Diodes) PCIe switches added) To generate a diff of this commit: cvs rdiff -u -r1.1371.2.19 -r1.1371.2.20 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1370.2.19 -r1.1370.2.20 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 18:41:17 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1750): sys/dev/pci/pcidevs: revision 1.1493 sys/dev/pci/pcidevs: revision 1.1495 Add Intel 82599 LS. Add Pericom(Diodes) PCIe switches. To generate a diff of this commit: cvs rdiff -u -r1.1383.2.19 -r1.1383.2.20 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1383.2.19 src/sys/dev/pci/pcidevs:1.1383.2.20 --- src/sys/dev/pci/pcidevs:1.1383.2.19 Fri Oct 13 17:50:40 2023 +++ src/sys/dev/pci/pcidevs Fri Oct 13 18:41:17 2023 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1383.2.19 2023/10/13 17:50:40 martin Exp $ +$NetBSD: pcidevs,v 1.1383.2.20 2023/10/13 18:41:17 martin Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -4304,6 +4304,7 @@ product INTEL I350_DA4 0x1546 I350 Qua product INTEL 82599_SFP_SF_QP 0x154a 82599 10 GbE Controller product INTEL XL710_VF 0x154c XL710 Ethernet Virtual Function product INTEL 82599_SFP_SF2 0x154d 82599 (SFP+) 10 GbE Controller +product INTEL 82599_LS 0x154f 82599 LS 10G Ethernet product INTEL 82599EN_SFP 0x1557 82599 10 GbE Controller product INTEL 82599_QSFP_SF_QP 0x1558 X520 10 GbE QSFP+ product INTEL I218_V 0x1559 I218-V Ethernet Connection @@ -8807,7 +8808,21 @@ product PERICOM PI7C21P100 0x01a7 PI7C21 product PERICOM PI7C9X20303UL 0x0303 PI7C9X20303UL 3port 3lane PCIe switch product PERICOM PI7C9X20505GP 0x0505 PI7C9X20505GP 5port 5lane PCIe switch product PERICOM PI7C9X20508GP 0x0508 PI7C9X20508GP 5port 8lane PCIe switch +product PERICOM PI7C9X2G303EL 0x2303 PI7C9X2G303EL 3port 3lane PCIe Gen2 switch +product PERICOM PI7C9X2G304EL 0x2304 PI7C9X2G304EL 3port 4lane PCIe Gen2 switch +product PERICOM PI7C9X2G308GP 0x2308 PI7C9X2G308GP 3port 8lane PCIe Gen2 switch +product PERICOM PI7C9X2G312GP 0x2312 PI7C9X2G312GP 3port 12lane PCIe Gen2 switch product PERICOM PI7C9X2G404SL 0x2404 PI7C9X2G404SL 4port 4lane PCIe Gen2 switch +product PERICOM PI7C9X2G608GP 0x2608 PI7C9X2G608GP 6port 8lane PCIe Gen2 switch +product PERICOM PI7C9X2G612GP 0x2612 PI7C9X2G612GP 6port 12lane PCIe Gen2 switch +product PERICOM PI7C9X2G912GP 0x2912 PI7C9X2G912GP 9port 12lane PCIe Gen2 switch +product PERICOM PI7C9X2G808PR 0x8608 PI7C9X2G808PR 8port 8lane PCIe Gen2 switch +product PERICOM PI7C9X2G304EV 0xb304 PI7C9X2G304EV 3port 4lane PCIe Gen2 switch +product PERICOM PI7C9X2G404EV 0xb404 PI7C9X2G404EV 4port 4lane PCIe Gen2 switch +product PERICOM PI7C9X3G808GP 0xc008 PI7C9X3G808GP 8port 8lane PCIe Gen3 switch +product PERICOM PI7C9X3G816GP 0xc016 PI7C9X3G816GP 8port 16lane PCIe Gen3 switch +product PERICOM PI7C9X3G1224GP 0xc124 PI7C9X3G1224GP 12port 24lane PCIe Gen3 switch +product PERICOM PI7C9X3G1632GP 0xc232 PI7C9X3G1632GP 16port 32lane PCIe Gen3 switch product PERICOM PI7C8140A 0x8140 PI7C8140A 2 port PCI-PCI Bridge product PERICOM PI7C8148 0x8148 PI7C8148 Asynchronous 2 port PCI-PCI Bridge product PERICOM PI7C8152 0x8152 PI7C8152 2 port PCI-PCI Bridge
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 18:41:17 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1750): sys/dev/pci/pcidevs: revision 1.1493 sys/dev/pci/pcidevs: revision 1.1495 Add Intel 82599 LS. Add Pericom(Diodes) PCIe switches. To generate a diff of this commit: cvs rdiff -u -r1.1383.2.19 -r1.1383.2.20 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Fri Oct 13 18:20:30 UTC 2023 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: if_bypass.c if_fdir.c if_sriov.c ix_txrx.c ixgbe.c ixgbe.h ixgbe_api.h ixgbe_bypass.h ixgbe_common.c ixgbe_common.h ixgbe_fdir.h ixgbe_netmap.c ixgbe_netmap.h ixgbe_osdep.c ixgbe_sriov.h ixgbe_type.h ixgbe_x550.c ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1749): sys/dev/pci/ixgbe/if_bypass.c 1.10 sys/dev/pci/ixgbe/if_fdir.c 1.6 via patch sys/dev/pci/ixgbe/if_sriov.c1.18 via patch sys/dev/pci/ixgbe/ix_txrx.c 1.102 via patch sys/dev/pci/ixgbe/ixgbe.c 1.333,1.339 via patch sys/dev/pci/ixgbe/ixgbe.h 1.89 sys/dev/pci/ixgbe/ixgbe_api.h 1.17 sys/dev/pci/ixgbe/ixgbe_common.h1.17 sys/dev/pci/ixgbe/ixgbe_bypass.h1.4 sys/dev/pci/ixgbe/ixgbe_common.c1.45 sys/dev/pci/ixgbe/ixgbe_fdir.h 1.5 sys/dev/pci/ixgbe/ixgbe_netmap.h1.3 sys/dev/pci/ixgbe/ixgbe_netmap.c1.6 sys/dev/pci/ixgbe/ixgbe_osdep.c 1.9 sys/dev/pci/ixgbe/ixgbe_sriov.h 1.6 sys/dev/pci/ixgbe/ixgbe_type.h 1.58 sys/dev/pci/ixgbe/ixgbe_x550.c 1.27 sys/dev/pci/ixgbe/ixv.c 1.186 via patch ixgbe: Rename some definitions, modify comment. No functional change. Apply changes from FreeBSD's ix-3.3.31 and ixv-1.5.32. - struct adapter *adapter -> struct ixgbe_softc *sc - master -> primary - black -> block ixg(4): Whitespace. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.4.8.3 -r1.4.8.4 src/sys/dev/pci/ixgbe/if_bypass.c cvs rdiff -u -r1.2.8.1 -r1.2.8.2 src/sys/dev/pci/ixgbe/if_fdir.c cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/dev/pci/ixgbe/if_sriov.c cvs rdiff -u -r1.54.2.12 -r1.54.2.13 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.27 -r1.199.2.28 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.10 -r1.56.2.11 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.15.2.1 -r1.15.2.2 src/sys/dev/pci/ixgbe/ixgbe_api.h cvs rdiff -u -r1.1.14.2 -r1.1.14.3 src/sys/dev/pci/ixgbe/ixgbe_bypass.h cvs rdiff -u -r1.25.2.7 -r1.25.2.8 src/sys/dev/pci/ixgbe/ixgbe_common.c cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/dev/pci/ixgbe/ixgbe_common.h cvs rdiff -u -r1.2.8.2 -r1.2.8.3 src/sys/dev/pci/ixgbe/ixgbe_fdir.h cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/pci/ixgbe/ixgbe_netmap.c cvs rdiff -u -r1.1.14.1 -r1.1.14.2 src/sys/dev/pci/ixgbe/ixgbe_netmap.h cvs rdiff -u -r1.4.8.4 -r1.4.8.5 src/sys/dev/pci/ixgbe/ixgbe_osdep.c cvs rdiff -u -r1.3.8.2 -r1.3.8.3 src/sys/dev/pci/ixgbe/ixgbe_sriov.h cvs rdiff -u -r1.41.2.9 -r1.41.2.10 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.15.2.6 -r1.15.2.7 src/sys/dev/pci/ixgbe/ixgbe_x550.c cvs rdiff -u -r1.125.2.22 -r1.125.2.23 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 18:00:42 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: ahcisata_pci.c Log Message: Pull up following revision(s) (requested by abs in ticket #1748): sys/dev/pci/ahcisata_pci.c: revision 1.71 Add support for ASMEDIA 0x0624 ... an AHCI SATA adaptor which identifies itself as an IDE storage device To generate a diff of this commit: cvs rdiff -u -r1.55.4.2 -r1.55.4.3 src/sys/dev/pci/ahcisata_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.55.4.2 src/sys/dev/pci/ahcisata_pci.c:1.55.4.3 --- src/sys/dev/pci/ahcisata_pci.c:1.55.4.2 Tue Jan 21 15:19:51 2020 +++ src/sys/dev/pci/ahcisata_pci.c Fri Oct 13 18:00:42 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.55.4.2 2020/01/21 15:19:51 martin Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.55.4.3 2023/10/13 18:00:42 martin Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.55.4.2 2020/01/21 15:19:51 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.55.4.3 2023/10/13 18:00:42 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_ahcisata_pci.h" @@ -202,6 +202,8 @@ static const struct ahci_pci_quirk ahci_ AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1061_12, AHCI_PCI_QUIRK_FORCE }, + { PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1062_JMB575, + AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA, AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801JI_SATA_AHCI,
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 18:00:42 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: ahcisata_pci.c Log Message: Pull up following revision(s) (requested by abs in ticket #1748): sys/dev/pci/ahcisata_pci.c: revision 1.71 Add support for ASMEDIA 0x0624 ... an AHCI SATA adaptor which identifies itself as an IDE storage device To generate a diff of this commit: cvs rdiff -u -r1.55.4.2 -r1.55.4.3 src/sys/dev/pci/ahcisata_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 17:52:45 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h Log Message: Regen for ticket #1748 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier) To generate a diff of this commit: cvs rdiff -u -r1.1371.2.18 -r1.1371.2.19 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1370.2.18 -r1.1370.2.19 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 17:52:45 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h Log Message: Regen for ticket #1748 (add ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier) To generate a diff of this commit: cvs rdiff -u -r1.1371.2.18 -r1.1371.2.19 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1370.2.18 -r1.1370.2.19 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 17:50:41 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs Log Message: Pull up following revision(s) (requested by abs in ticket #1748): sys/dev/pci/pcidevs: revision 1.1496 Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier To generate a diff of this commit: cvs rdiff -u -r1.1383.2.18 -r1.1383.2.19 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1383.2.18 src/sys/dev/pci/pcidevs:1.1383.2.19 --- src/sys/dev/pci/pcidevs:1.1383.2.18 Mon Aug 21 12:32:25 2023 +++ src/sys/dev/pci/pcidevs Fri Oct 13 17:50:40 2023 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1383.2.18 2023/08/21 12:32:25 martin Exp $ +$NetBSD: pcidevs,v 1.1383.2.19 2023/10/13 17:50:40 martin Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -1510,6 +1510,7 @@ product ASMEDIA ASM1061_01 0x0601 ASM106 product ASMEDIA ASM1061_02 0x0602 ASM1061 AHCI SATA III Controller product ASMEDIA ASM1061_11 0x0611 ASM1061 AHCI SATA III Controller product ASMEDIA ASM1061_12 0x0612 ASM1061 AHCI SATA III Controller +product ASMEDIA ASM1062_JMB575 0x0624 ASM1062 + JMB575 Port Multiplier product ASMEDIA ASM106X 0x0625 ASM106x AHCI SATA III Controller product ASMEDIA ASM1042 0x1042 ASM1042 USB 3.0 Host Controller product ASMEDIA ASM1083 0x1080 ASM1083/1085 PCIe-PCI Bridge
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Fri Oct 13 17:50:41 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: pcidevs Log Message: Pull up following revision(s) (requested by abs in ticket #1748): sys/dev/pci/pcidevs: revision 1.1496 Add entry for ASMEDIA 0x0624 - ASM1062 + JMB575 Port Multiplier To generate a diff of this commit: cvs rdiff -u -r1.1383.2.18 -r1.1383.2.19 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/evbmips/conf
Module Name:src Committed By: martin Date: Tue Oct 10 18:55:58 UTC 2023 Modified Files: src/sys/arch/evbmips/conf [netbsd-9]: INSTALL_CI20 Log Message: Additionally pull up following revision(s) (requested by he in ticket #1747): sys/arch/evbmips/conf/INSTALL_CI20: revision 1.3 INSTALL_CI20: bump ramdisk image size since contents grew a bit recently. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.26.1 src/sys/arch/evbmips/conf/INSTALL_CI20 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/conf/INSTALL_CI20 diff -u src/sys/arch/evbmips/conf/INSTALL_CI20:1.1 src/sys/arch/evbmips/conf/INSTALL_CI20:1.1.26.1 --- src/sys/arch/evbmips/conf/INSTALL_CI20:1.1 Mon Apr 6 14:18:09 2015 +++ src/sys/arch/evbmips/conf/INSTALL_CI20 Tue Oct 10 18:55:58 2023 @@ -1,8 +1,8 @@ -# $NetBSD: INSTALL_CI20,v 1.1 2015/04/06 14:18:09 joerg Exp $ +# $NetBSD: INSTALL_CI20,v 1.1.26.1 2023/10/10 18:55:58 martin Exp $ include "arch/evbmips/conf/CI20" -#ident "INSTALL_CI20-$Revision: 1.1 $" +#ident "INSTALL_CI20-$Revision: 1.1.26.1 $" # Enable the hooks used for initializing the root memory-disk. # The ramdisk size must be kept in sync manually with the size of @@ -11,4 +11,4 @@ pseudo-device md# memory disk device options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk -options MEMORY_DISK_ROOT_SIZE=12288 # size of memory disk, in blocks +options MEMORY_DISK_ROOT_SIZE=12416 # size of memory disk, in blocks
CVS commit: [netbsd-9] src/sys/arch/evbmips/conf
Module Name:src Committed By: martin Date: Tue Oct 10 18:55:58 UTC 2023 Modified Files: src/sys/arch/evbmips/conf [netbsd-9]: INSTALL_CI20 Log Message: Additionally pull up following revision(s) (requested by he in ticket #1747): sys/arch/evbmips/conf/INSTALL_CI20: revision 1.3 INSTALL_CI20: bump ramdisk image size since contents grew a bit recently. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.26.1 src/sys/arch/evbmips/conf/INSTALL_CI20 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/evbmips/conf
Module Name:src Committed By: martin Date: Tue Oct 10 13:07:51 UTC 2023 Modified Files: src/sys/arch/evbmips/conf [netbsd-9]: INSTALL_OMSAL400 Log Message: Additionally pull up the following revision for ticket #397 to fix the build: sys/arch/evbmips/conf/INSTALL_OMSAL400 1.4 Make more room for ramdisk image (which recently grew a bit) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.70.1 src/sys/arch/evbmips/conf/INSTALL_OMSAL400 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/conf/INSTALL_OMSAL400 diff -u src/sys/arch/evbmips/conf/INSTALL_OMSAL400:1.2 src/sys/arch/evbmips/conf/INSTALL_OMSAL400:1.2.70.1 --- src/sys/arch/evbmips/conf/INSTALL_OMSAL400:1.2 Fri Feb 6 18:50:27 2009 +++ src/sys/arch/evbmips/conf/INSTALL_OMSAL400 Tue Oct 10 13:07:50 2023 @@ -1,8 +1,8 @@ -# $NetBSD: INSTALL_OMSAL400,v 1.2 2009/02/06 18:50:27 jym Exp $ +# $NetBSD: INSTALL_OMSAL400,v 1.2.70.1 2023/10/10 13:07:50 martin Exp $ include "arch/evbmips/conf/OMSAL400" -#ident "INSTALL_OMSAL400-$Revision: 1.2 $" +#ident "INSTALL_OMSAL400-$Revision: 1.2.70.1 $" # Enable the hooks used for initializing the root memory-disk. # The ramdisk size must be kept in sync manually with the size of @@ -11,5 +11,5 @@ pseudo-device md# memory disk device options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk -options MEMORY_DISK_ROOT_SIZE=8192 # size of memory disk, in blocks +options MEMORY_DISK_ROOT_SIZE=8350 # size of memory disk, in blocks options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode
CVS commit: [netbsd-9] src/sys/arch/evbmips/conf
Module Name:src Committed By: martin Date: Tue Oct 10 13:07:51 UTC 2023 Modified Files: src/sys/arch/evbmips/conf [netbsd-9]: INSTALL_OMSAL400 Log Message: Additionally pull up the following revision for ticket #397 to fix the build: sys/arch/evbmips/conf/INSTALL_OMSAL400 1.4 Make more room for ramdisk image (which recently grew a bit) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.70.1 src/sys/arch/evbmips/conf/INSTALL_OMSAL400 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Oct 8 15:28:49 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1746): sys/dev/pci/if_wm.c: revision 1.785 sys/dev/pci/if_wm.c: revision 1.786 sys/dev/pci/if_wm.c: revision 1.787 sys/dev/pci/if_wm.c: revision 1.788 sys/dev/pci/if_wm.c: revision 1.789 wm(4): Use SCVPC and HRMPC for 82575 and newer. The SCVPC(SerDes/SGMII Code Violation Packet Count) register and the HRMPC (Header Redirection Missed Packet Count) register were added in if_wm.c rev. 1.776 but the location in the code were incorrect. Fix them. wm(4): Add some info to some event counters. - The difference between the RUC(Rx Undersize) and RFC(Rx Fragment) is whether the CRC is valid or not. - The difference between the ROC(Rx Oversize) and RJC(Rx Jabber) is whether the CRC is valid or not. - LENERRS(Length Errors) is for the length/type field <= 1500. wm(4): the IAC(Interrupt Assertion Count) register is for 82571 and newer. wm(4): Modify descriptions of flow control related event counters. wm(4): Replace /* nothing */ to __nothing for evcnt macros Prevent empty if bodies for !WM_EVENT_COUNTERS. To generate a diff of this commit: cvs rdiff -u -r1.645.2.17 -r1.645.2.18 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Oct 8 15:28:49 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1746): sys/dev/pci/if_wm.c: revision 1.785 sys/dev/pci/if_wm.c: revision 1.786 sys/dev/pci/if_wm.c: revision 1.787 sys/dev/pci/if_wm.c: revision 1.788 sys/dev/pci/if_wm.c: revision 1.789 wm(4): Use SCVPC and HRMPC for 82575 and newer. The SCVPC(SerDes/SGMII Code Violation Packet Count) register and the HRMPC (Header Redirection Missed Packet Count) register were added in if_wm.c rev. 1.776 but the location in the code were incorrect. Fix them. wm(4): Add some info to some event counters. - The difference between the RUC(Rx Undersize) and RFC(Rx Fragment) is whether the CRC is valid or not. - The difference between the ROC(Rx Oversize) and RJC(Rx Jabber) is whether the CRC is valid or not. - LENERRS(Length Errors) is for the length/type field <= 1500. wm(4): the IAC(Interrupt Assertion Count) register is for 82571 and newer. wm(4): Modify descriptions of flow control related event counters. wm(4): Replace /* nothing */ to __nothing for evcnt macros Prevent empty if bodies for !WM_EVENT_COUNTERS. To generate a diff of this commit: cvs rdiff -u -r1.645.2.17 -r1.645.2.18 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.645.2.17 src/sys/dev/pci/if_wm.c:1.645.2.18 --- src/sys/dev/pci/if_wm.c:1.645.2.17 Mon Sep 4 17:55:24 2023 +++ src/sys/dev/pci/if_wm.c Sun Oct 8 15:28:49 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.645.2.17 2023/09/04 17:55:24 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.645.2.18 2023/10/08 15:28:49 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.17 2023/09/04 17:55:24 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.18 2023/10/08 15:28:49 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -789,13 +789,13 @@ do { \ #define WM_Q_EVCNT_ADD(qname, evname, val) \ WM_EVCNT_ADD(&(qname)->qname##_ev_##evname, (val)) #else /* !WM_EVENT_COUNTERS */ -#define WM_EVCNT_INCR(ev) /* nothing */ -#define WM_EVCNT_STORE(ev, val) /* nothing */ -#define WM_EVCNT_ADD(ev, val) /* nothing */ - -#define WM_Q_EVCNT_INCR(qname, evname) /* nothing */ -#define WM_Q_EVCNT_STORE(qname, evname, val) /* nothing */ -#define WM_Q_EVCNT_ADD(qname, evname, val) /* nothing */ +#define WM_EVCNT_INCR(ev) __nothing +#define WM_EVCNT_STORE(ev, val) __nothing +#define WM_EVCNT_ADD(ev, val) __nothing + +#define WM_Q_EVCNT_INCR(qname, evname) __nothing +#define WM_Q_EVCNT_STORE(qname, evname, val) __nothing +#define WM_Q_EVCNT_ADD(qname, evname, val) __nothing #endif /* !WM_EVENT_COUNTERS */ #define CSR_READ(sc, reg) \ @@ -3317,15 +3317,15 @@ alloc_retry: if (sc->sc_type >= WM_T_82542_2_1) { evcnt_attach_dynamic(>sc_ev_tx_xoff, EVCNT_TYPE_MISC, - NULL, xname, "tx_xoff"); + NULL, xname, "XOFF Transmitted"); evcnt_attach_dynamic(>sc_ev_tx_xon, EVCNT_TYPE_MISC, - NULL, xname, "tx_xon"); + NULL, xname, "XON Transmitted"); evcnt_attach_dynamic(>sc_ev_rx_xoff, EVCNT_TYPE_MISC, - NULL, xname, "rx_xoff"); + NULL, xname, "XOFF Received"); evcnt_attach_dynamic(>sc_ev_rx_xon, EVCNT_TYPE_MISC, - NULL, xname, "rx_xon"); + NULL, xname, "XON Received"); evcnt_attach_dynamic(>sc_ev_rx_macctl, EVCNT_TYPE_MISC, - NULL, xname, "rx_macctl"); + NULL, xname, "FC Received Unsupported"); } evcnt_attach_dynamic(>sc_ev_scc, EVCNT_TYPE_MISC, @@ -3370,13 +3370,13 @@ alloc_retry: evcnt_attach_dynamic(>sc_ev_rnbc, EVCNT_TYPE_MISC, NULL, xname, "Rx No Buffers"); evcnt_attach_dynamic(>sc_ev_ruc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Undersize"); + NULL, xname, "Rx Undersize (valid CRC)"); evcnt_attach_dynamic(>sc_ev_rfc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Fragment"); + NULL, xname, "Rx Fragment (bad CRC)"); evcnt_attach_dynamic(>sc_ev_roc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Oversize"); + NULL, xname, "Rx Oversize (valid CRC)"); evcnt_attach_dynamic(>sc_ev_rjc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Jabber"); + NULL, xname, "Rx Jabber (bad CRC)"); if (sc->sc_type >= WM_T_82540) { evcnt_attach_dynamic(>sc_ev_mgtprc, EVCNT_TYPE_MISC, NULL, xname, "Management Packets RX"); @@ -3409,8 +3409,9 @@ alloc_retry: NULL, xname, "Multicast Packets Tx"); evcnt_attach_dynamic(>sc_ev_bptc, EVCNT_TYPE_MISC, NULL, xname, "Broadcast Packets Tx"); - evcnt_attach_dynamic(>sc_ev_iac, EVCNT_TYPE_MISC, - NULL, xname, "Interrupt Assertion"); + if (sc->sc_type >= WM_T_82571) /* PCIe, 80003 and ICH/PCHs */ +
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sun Oct 8 15:13:10 UTC 2023 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82599.c ixgbe_mbx.h ixgbe_type.h ixgbe_vf.c ixgbe_vf.h ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1745): sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.30 sys/dev/pci/ixgbe/ixv.c: revision 1.184 sys/dev/pci/ixgbe/ixv.c: revision 1.185 sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.32 sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.33 sys/dev/pci/ixgbe/ixgbe.h: revision 1.87 sys/dev/pci/ixgbe/ixgbe.h: revision 1.88 sys/dev/pci/ixgbe/ixgbe.c: revision 1.330 sys/dev/pci/ixgbe/ixgbe.c: revision 1.331 sys/dev/pci/ixgbe/ixgbe.c: revision 1.332 sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.18 sys/dev/pci/ixgbe/ix_txrx.c: revision 1.101 sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.57 sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.20 sys/dev/pci/ixgbe/ixgbe.c: revision 1.327 sys/dev/pci/ixgbe/ixgbe.c: revision 1.328 sys/dev/pci/ixgbe/ixgbe.c: revision 1.329 ixgbe: Reorder some event counters for readability. ixg(4): Rename some descriptions of event counters. - Rename some descriptions from register name to the meaning. - For the same meaning's counters, add "(soft)" or "(reg)". The former is for a software level counter and the latter is for a statistics counter register based. ixg(4): Count Queue Bytes {Transmit, Receive} counter. ixg(4): Reorder some flow control related event counters for readability. ixg(4): Rename some descriptions of flow control related event conters. Remove obsolete comment. ixgbe: Fix typo in comment. No functional change. ixv(4): Improve error check. ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf() function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision problem. The change had a problem that error checks have not done at all if the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27. ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support. PF can control vf's link state by this change. Note that Linux's PF driver can't control the link to force up (i.e. ip link set XXX vf Y state enable). >From FreeBSD ixv-1.5.30. ixg(4): Update FCTRL after writing multicast filter. Same as other OSes. From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5. To generate a diff of this commit: cvs rdiff -u -r1.54.2.11 -r1.54.2.12 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.26 -r1.199.2.27 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.9 -r1.56.2.10 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.21.4.4 -r1.21.4.5 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/pci/ixgbe/ixgbe_mbx.h cvs rdiff -u -r1.41.2.8 -r1.41.2.9 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.18.2.6 -r1.18.2.7 src/sys/dev/pci/ixgbe/ixgbe_vf.c cvs rdiff -u -r1.13.8.3 -r1.13.8.4 src/sys/dev/pci/ixgbe/ixgbe_vf.h cvs rdiff -u -r1.125.2.21 -r1.125.2.22 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.11 src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.12 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.11 Mon Jan 23 14:04:42 2023 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Sun Oct 8 15:13:09 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.54.2.11 2023/01/23 14:04:42 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.54.2.12 2023/10/08 15:13:09 martin Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.11 2023/01/23 14:04:42 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.12 2023/10/08 15:13:09 martin Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -1341,11 +1341,6 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr) * exhaustion are unnecessary, if an mbuf cannot be obtained * it just returns, keeping its placeholder, thus it can simply * be recalled to try again. - * - * XXX NetBSD TODO: - *- The ixgbe_rxeof() function always preallocates mbuf cluster, - * so the ixgbe_refresh_mbufs() function can be simplified. - * / static void ixgbe_refresh_mbufs(struct rx_ring *rxr, int limit) Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.26 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.27 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.26 Wed Jun 21 19:20:50 2023 +++ src/sys/dev/pci/ixgbe/ixgbe.c Sun Oct 8 15:13:09 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.199.2.26 2023/06/21 19:20:50 martin Exp $ */ +/* $NetBSD: ixgbe.c,v 1.199.2.27 2023/10/08 15:13:09 martin Exp
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sun Oct 8 15:13:10 UTC 2023 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_82599.c ixgbe_mbx.h ixgbe_type.h ixgbe_vf.c ixgbe_vf.h ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1745): sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.30 sys/dev/pci/ixgbe/ixv.c: revision 1.184 sys/dev/pci/ixgbe/ixv.c: revision 1.185 sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.32 sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.33 sys/dev/pci/ixgbe/ixgbe.h: revision 1.87 sys/dev/pci/ixgbe/ixgbe.h: revision 1.88 sys/dev/pci/ixgbe/ixgbe.c: revision 1.330 sys/dev/pci/ixgbe/ixgbe.c: revision 1.331 sys/dev/pci/ixgbe/ixgbe.c: revision 1.332 sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.18 sys/dev/pci/ixgbe/ix_txrx.c: revision 1.101 sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.57 sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.20 sys/dev/pci/ixgbe/ixgbe.c: revision 1.327 sys/dev/pci/ixgbe/ixgbe.c: revision 1.328 sys/dev/pci/ixgbe/ixgbe.c: revision 1.329 ixgbe: Reorder some event counters for readability. ixg(4): Rename some descriptions of event counters. - Rename some descriptions from register name to the meaning. - For the same meaning's counters, add "(soft)" or "(reg)". The former is for a software level counter and the latter is for a statistics counter register based. ixg(4): Count Queue Bytes {Transmit, Receive} counter. ixg(4): Reorder some flow control related event counters for readability. ixg(4): Rename some descriptions of flow control related event conters. Remove obsolete comment. ixgbe: Fix typo in comment. No functional change. ixv(4): Improve error check. ixgbe_vf.c rev. 1.31 changed the behavior of the ixgbe_check_mac_link_vf() function. It was from FreeBSD's ixv-1.5.25 to resolve mailbox collision problem. The change had a problem that error checks have not done at all if the API version >= 1.5. Fix it. From FreeBSD ixv-1.5.27. ixv(4): Add new IXGBE_VF_GET_LINK_STATE message support. PF can control vf's link state by this change. Note that Linux's PF driver can't control the link to force up (i.e. ip link set XXX vf Y state enable). >From FreeBSD ixv-1.5.30. ixg(4): Update FCTRL after writing multicast filter. Same as other OSes. From FreeBSD 395cc55d896654b8f75071e71e856b22aed87da5. To generate a diff of this commit: cvs rdiff -u -r1.54.2.11 -r1.54.2.12 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.26 -r1.199.2.27 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.9 -r1.56.2.10 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.21.4.4 -r1.21.4.5 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/pci/ixgbe/ixgbe_mbx.h cvs rdiff -u -r1.41.2.8 -r1.41.2.9 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.18.2.6 -r1.18.2.7 src/sys/dev/pci/ixgbe/ixgbe_vf.c cvs rdiff -u -r1.13.8.3 -r1.13.8.4 src/sys/dev/pci/ixgbe/ixgbe_vf.h cvs rdiff -u -r1.125.2.21 -r1.125.2.22 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.