CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Jan 13 04:51:50 UTC 2022 Modified Files: src/usr.bin/make: make.1 meta.c Log Message: meta.c: add .MAKE.META.CMP_FILTER On rare occasions it is useful to be able to filter command lines before comparison. To generate a diff of this commit: cvs rdiff -u -r1.300 -r1.301 src/usr.bin/make/make.1 cvs rdiff -u -r1.186 -r1.187 src/usr.bin/make/meta.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/make.1 diff -u src/usr.bin/make/make.1:1.300 src/usr.bin/make/make.1:1.301 --- src/usr.bin/make/make.1:1.300 Sun Dec 12 20:45:48 2021 +++ src/usr.bin/make/make.1 Thu Jan 13 04:51:50 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.300 2021/12/12 20:45:48 sjg Exp $ +.\" $NetBSD: make.1,v 1.301 2022/01/13 04:51:50 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd December 12, 2021 +.Dd January 12, 2022 .Dt MAKE 1 .Os .Sh NAME @@ -954,6 +954,12 @@ If a file that was generated outside of .Va .OBJDIR but within said bailiwick is missing, the current target is considered out-of-date. +.It Va .MAKE.META.CMP_FILTER +In "meta" mode, it can (very rarely!) be useful to filter command +lines before comparison. +This variable can be set to a set of modifiers that will be applied to +each line of the old and new command that differ, if the filtered +commands still differ, the target is considered out-of-date. .It Va .MAKE.META.CREATED In "meta" mode, this variable contains a list of all the meta files updated. Index: src/usr.bin/make/meta.c diff -u src/usr.bin/make/meta.c:1.186 src/usr.bin/make/meta.c:1.187 --- src/usr.bin/make/meta.c:1.186 Mon Dec 13 01:51:12 2021 +++ src/usr.bin/make/meta.c Thu Jan 13 04:51:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.186 2021/12/13 01:51:12 rillig Exp $ */ +/* $NetBSD: meta.c,v 1.187 2022/01/13 04:51:50 sjg Exp $ */ /* * Implement 'meta' mode. @@ -65,6 +65,9 @@ static char *metaIgnorePathsStr; /* stri #ifndef MAKE_META_IGNORE_FILTER #define MAKE_META_IGNORE_FILTER ".MAKE.META.IGNORE_FILTER" #endif +#ifndef MAKE_META_CMP_FILTER +#define MAKE_META_CMP_FILTER ".MAKE.META.CMP_FILTER" +#endif bool useMeta = false; static bool useFilemon = false; @@ -76,6 +79,7 @@ static bool metaVerbose = false; static bool metaIgnoreCMDs = false; /* ignore CMDs in .meta files */ static bool metaIgnorePatterns = false; /* do we need to do pattern matches */ static bool metaIgnoreFilter = false; /* do we have more complex filtering? */ +static bool metaCmpFilter = false; /* do we have CMP_FILTER ? */ static bool metaCurdirOk = false; /* write .meta in .CURDIR Ok? */ static bool metaSilent = false; /* if we have a .meta be SILENT */ @@ -661,6 +665,11 @@ meta_mode_init(const char *make_mode) metaIgnoreFilter = true; FStr_Done(); } +value = Var_Value(SCOPE_GLOBAL, MAKE_META_CMP_FILTER); +if (value.str != NULL) { + metaCmpFilter = true; + FStr_Done(); +} } /* @@ -1077,6 +1086,39 @@ append_if_new(StringList *list, const ch Lst_Append(list, bmake_strdup(str)); } +static char * +meta_filter_cmd(Buffer *buf, GNode *gn, char *s) +{ +Buf_Clear(buf); +Buf_AddStr(buf, "${"); +Buf_AddStr(buf, s); +Buf_AddStr(buf, ":L:${" MAKE_META_CMP_FILTER ":ts:}}"); +Var_Subst(buf->data, gn, VARE_WANTRES, ); +return s; +} + +static int +meta_cmd_cmp(GNode *gn, char *a, char *b) +{ +static int once = 0; +static Buffer buf; +int rc; + +rc = strcmp(a, b); +if (rc == 0 || !metaCmpFilter) + return rc; +if (!once) { + once++; + Buf_InitSize(, BUFSIZ); +} +a = meta_filter_cmd(, gn, a); +b = meta_filter_cmd(, gn, b); +rc = strcmp(a, b); +free(a); +free(b); +return rc; +} + bool meta_oodate(GNode *gn, bool oodate) { @@ -1552,7 +1594,7 @@ meta_oodate(GNode *gn, bool oodate) if (p != NULL && !hasOODATE && !(gn->type & OP_NOMETA_CMP) && - (strcmp(p, cmd) != 0)) { + (meta_cmd_cmp(gn, p, cmd) != 0)) { DEBUG4(META, "%s: %d: a build command has changed\n%s\nvs\n%s\n", fname, lineno, p, cmd); if (!metaIgnoreCMDs)
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Jan 13 04:51:50 UTC 2022 Modified Files: src/usr.bin/make: make.1 meta.c Log Message: meta.c: add .MAKE.META.CMP_FILTER On rare occasions it is useful to be able to filter command lines before comparison. To generate a diff of this commit: cvs rdiff -u -r1.300 -r1.301 src/usr.bin/make/make.1 cvs rdiff -u -r1.186 -r1.187 src/usr.bin/make/meta.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Thu Jan 13 00:21:41 UTC 2022 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Use __BIT(). KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/sys/arch/x86/include/specialreg.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/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.178 src/sys/arch/x86/include/specialreg.h:1.179 --- src/sys/arch/x86/include/specialreg.h:1.178 Thu Sep 30 15:54:55 2021 +++ src/sys/arch/x86/include/specialreg.h Thu Jan 13 00:21:41 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.178 2021/09/30 15:54:55 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.179 2022/01/13 00:21:41 msaitoh Exp $ */ /* * Copyright (c) 2014-2020 The NetBSD Foundation, Inc. @@ -139,12 +139,12 @@ #define XCR0_HDC 0x2000 /* Hardware Duty Cycle state */ #define XCR0_HWP 0x0001 /* Hardware P-states */ -#define XCR0_FLAGS1 "\20" \ - "\1" "x87" "\2" "SSE" "\3" "AVX" \ - "\4" "BNDREGS" "\5" "BNDCSR" "\6" "Opmask" \ - "\7" "ZMM_Hi256" "\10" "Hi16_ZMM" "\11" "PT" \ - "\12" "PKRU" "\14" "CET_U" "\15" "CET_S" \ - "\16" "HDC" "\21" "HWP" +#define XCR0_FLAGS1 "\20" \ + "\1" "x87" "\2" "SSE" "\3" "AVX" "\4" "BNDREGS" \ + "\5" "BNDCSR" "\6" "Opmask" "\7" "ZMM_Hi256" "\10" "Hi16_ZMM" \ + "\11" "PT" "\12" "PKRU" "\14" "CET_U" \ + "\15" "CET_S" "\16" "HDC" \ + "\21" "HWP" /* * Known FPU bits, only these get enabled. The save area is sized for all the @@ -205,14 +205,14 @@ #define CPUID_TM 0x2000 /* thermal monitor (TCC) */ #define CPUID_PBE 0x8000 /* Pending Break Enable */ -#define CPUID_FLAGS1 "\20" \ - "\1" "FPU" "\2" "VME" "\3" "DE" "\4" "PSE" \ - "\5" "TSC" "\6" "MSR" "\7" "PAE" "\10" "MCE" \ - "\11" "CX8" "\12" "APIC" "\13" "B10" "\14" "SEP" \ - "\15" "MTRR" "\16" "PGE" "\17" "MCA" "\20" "CMOV" \ +#define CPUID_FLAGS1 "\20" \ + "\1" "FPU" "\2" "VME" "\3" "DE" "\4" "PSE" \ + "\5" "TSC" "\6" "MSR" "\7" "PAE" "\10" "MCE" \ + "\11" "CX8" "\12" "APIC" "\13" "B10" "\14" "SEP" \ + "\15" "MTRR" "\16" "PGE" "\17" "MCA" "\20" "CMOV" \ "\21" "PAT" "\22" "PSE36" "\23" "PN" "\24" "CLFLUSH" \ - "\25" "B20" "\26" "DS" "\27" "ACPI" "\30" "MMX" \ - "\31" "FXSR" "\32" "SSE" "\33" "SSE2" "\34" "SS" \ + "\25" "B20" "\26" "DS" "\27" "ACPI" "\30" "MMX" \ + "\31" "FXSR" "\32" "SSE" "\33" "SSE2" "\34" "SS" \ "\35" "HTT" "\36" "TM" "\37" "IA64" "\40" "PBE" /* Blacklists of CPUID flags - used to mask certain features */ @@ -259,14 +259,14 @@ #define CPUID2_RDRAND 0x4000 /* RDRAND (hardware random number) */ #define CPUID2_RAZ 0x8000 /* RAZ. Indicates guest state. */ -#define CPUID2_FLAGS1 "\20" \ - "\1" "SSE3" "\2" "PCLMULQDQ" "\3" "DTES64" "\4" "MONITOR" \ - "\5" "DS-CPL" "\6" "VMX" "\7" "SMX" "\10" "EST" \ - "\11" "TM2" "\12" "SSSE3" "\13" "CID" "\14" "SDBG" \ - "\15" "FMA" "\16" "CX16" "\17" "xTPR" "\20" "PDCM" \ - "\21" "B16" "\22" "PCID" "\23" "DCA" "\24" "SSE41" \ - "\25" "SSE42" "\26" "X2APIC" "\27" "MOVBE" "\30" "POPCNT" \ - "\31" "DEADLINE" "\32" "AES" "\33" "XSAVE" "\34" "OSXSAVE" \ +#define CPUID2_FLAGS1 "\20" \ + "\1" "SSE3" "\2" "PCLMULQDQ" "\3" "DTES64" "\4" "MONITOR" \ + "\5" "DS-CPL" "\6" "VMX" "\7" "SMX" "\10" "EST" \ + "\11" "TM2" "\12" "SSSE3" "\13" "CID" "\14" "SDBG" \ + "\15" "FMA" "\16" "CX16" "\17" "xTPR" "\20" "PDCM" \ + "\21" "B16" "\22" "PCID" "\23" "DCA" "\24" "SSE41" \ + "\25" "SSE42" "\26" "X2APIC" "\27" "MOVBE" "\30" "POPCNT" \ + "\31" "DEADLINE" "\32" "AES" "\33" "XSAVE" "\34" "OSXSAVE" \ "\35" "AVX" "\36" "F16C" "\37" "RDRAND" "\40" "RAZ" /* CPUID Fn0001 %eax */ @@ -351,19 +351,19 @@ * Intel/AMD Digital Thermal Sensor and * Power Management, Fn_0006 - %eax. */ -#define CPUID_DSPM_DTS __BIT(0) /* Digital Thermal Sensor */ -#define CPUID_DSPM_IDA __BIT(1) /* Intel Dynamic Acceleration */ -#define CPUID_DSPM_ARAT __BIT(2) /* Always Running APIC Timer */ -#define CPUID_DSPM_PLN __BIT(4) /* Power Limit Notification */ -#define CPUID_DSPM_ECMD __BIT(5) /* Clock Modulation Extension */ -#define CPUID_DSPM_PTM __BIT(6) /* Package Level Thermal Management */ -#define CPUID_DSPM_HWP __BIT(7) /* HWP */ +#define CPUID_DSPM_DTS __BIT(0) /* Digital Thermal Sensor */ +#define CPUID_DSPM_IDA __BIT(1) /* Intel Dynamic Acceleration */ +#define CPUID_DSPM_ARAT __BIT(2) /* Always Running APIC Timer */ +#define CPUID_DSPM_PLN __BIT(4) /* Power Limit Notification */ +#define CPUID_DSPM_ECMD __BIT(5) /* Clock Modulation Extension */ +#define CPUID_DSPM_PTM __BIT(6) /* Package Level Thermal Management */ +#define CPUID_DSPM_HWP __BIT(7) /* HWP */ #define CPUID_DSPM_HWP_NOTIFY __BIT(8) /* HWP Notification */ -#define CPUID_DSPM_HWP_ACTWIN __BIT(9) /* HWP Activity Window */ -#define CPUID_DSPM_HWP_EPP __BIT(10) /* HWP Energy Performance
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Thu Jan 13 00:21:41 UTC 2022 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Use __BIT(). KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: martin Date: Wed Jan 12 15:35:51 UTC 2022 Modified Files: src/distrib/sets/lists/base: md.hpcarm md.ia64 Added Files: src/distrib/sets/lists/base: md.amigappc md.cesfic md.dreamcast md.epoc32 md.evbppc Log Message: A few more sysinst message catalog adjustments To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base/md.amigappc \ src/distrib/sets/lists/base/md.epoc32 \ src/distrib/sets/lists/base/md.evbppc cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/base/md.cesfic \ src/distrib/sets/lists/base/md.dreamcast cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/base/md.hpcarm cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/base/md.ia64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/md.hpcarm diff -u src/distrib/sets/lists/base/md.hpcarm:1.12 src/distrib/sets/lists/base/md.hpcarm:1.13 --- src/distrib/sets/lists/base/md.hpcarm:1.12 Thu May 2 03:56:38 2013 +++ src/distrib/sets/lists/base/md.hpcarm Wed Jan 12 15:35:51 2022 @@ -1,5 +1,9 @@ -# $NetBSD: md.hpcarm,v 1.12 2013/05/02 03:56:38 matt Exp $ +# $NetBSD: md.hpcarm,v 1.13 2022/01/12 15:35:51 martin Exp $ ./dev/beep base-obsolete obsolete ./dev/mouse-qms0base-obsolete obsolete ./dev/pms0 base-obsolete obsolete ./dev/qms0 base-obsolete obsolete +./usr/share/sysinst/catalog/sysinstmsgs.de base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.es base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.fr base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.pl base-util-share Index: src/distrib/sets/lists/base/md.ia64 diff -u src/distrib/sets/lists/base/md.ia64:1.1 src/distrib/sets/lists/base/md.ia64:1.2 --- src/distrib/sets/lists/base/md.ia64:1.1 Fri Aug 5 16:21:09 2016 +++ src/distrib/sets/lists/base/md.ia64 Wed Jan 12 15:35:51 2022 @@ -1,4 +1,4 @@ -# $NetBSD: md.ia64,v 1.1 2016/08/05 16:21:09 scole Exp $ +# $NetBSD: md.ia64,v 1.2 2022/01/12 15:35:51 martin Exp $ # # XXX add skiload for now # @@ -7,3 +7,7 @@ ./usr/mdec/loader.efi base-sysutil-bin ./usr/mdec/loader.sym base-sysutil-bin ./usr/mdec/skiload base-sysutil-bin +./usr/share/sysinst/catalog/sysinstmsgs.de base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.es base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.fr base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.pl base-util-share Added files: Index: src/distrib/sets/lists/base/md.amigappc diff -u /dev/null src/distrib/sets/lists/base/md.amigappc:1.1 --- /dev/null Wed Jan 12 15:35:51 2022 +++ src/distrib/sets/lists/base/md.amigappc Wed Jan 12 15:35:51 2022 @@ -0,0 +1,5 @@ +# $NetBSD: md.amigappc,v 1.1 2022/01/12 15:35:51 martin Exp $ +./usr/share/sysinst/catalog/sysinstmsgs.de base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.es base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.fr base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.pl base-util-share Index: src/distrib/sets/lists/base/md.epoc32 diff -u /dev/null src/distrib/sets/lists/base/md.epoc32:1.1 --- /dev/null Wed Jan 12 15:35:51 2022 +++ src/distrib/sets/lists/base/md.epoc32 Wed Jan 12 15:35:51 2022 @@ -0,0 +1,5 @@ +# $NetBSD: md.epoc32,v 1.1 2022/01/12 15:35:51 martin Exp $ +./usr/share/sysinst/catalog/sysinstmsgs.de base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.es base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.fr base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.pl base-util-share Index: src/distrib/sets/lists/base/md.evbppc diff -u /dev/null src/distrib/sets/lists/base/md.evbppc:1.1 --- /dev/null Wed Jan 12 15:35:51 2022 +++ src/distrib/sets/lists/base/md.evbppc Wed Jan 12 15:35:51 2022 @@ -0,0 +1,5 @@ +# $NetBSD: md.evbppc,v 1.1 2022/01/12 15:35:51 martin Exp $ +./usr/share/sysinst/catalog/sysinstmsgs.de base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.es base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.fr base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.pl base-util-share Index: src/distrib/sets/lists/base/md.cesfic diff -u /dev/null src/distrib/sets/lists/base/md.cesfic:1.3 --- /dev/null Wed Jan 12 15:35:51 2022 +++ src/distrib/sets/lists/base/md.cesfic Wed Jan 12 15:35:51 2022 @@ -0,0 +1,5 @@ +# $NetBSD: md.cesfic,v 1.3 2022/01/12 15:35:51 martin Exp $ +./usr/share/sysinst/catalog/sysinstmsgs.de base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.es base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.fr base-util-share +./usr/share/sysinst/catalog/sysinstmsgs.pl base-util-share Index: src/distrib/sets/lists/base/md.dreamcast diff -u /dev/null src/distrib/sets/lists/base/md.dreamcast:1.3 --- /dev/null Wed Jan 12 15:35:51 2022 +++ src/distrib/sets/lists/base/md.dreamcast Wed Jan 12 15:35:51 2022 @@ -0,0 +1,5 @@ +# $NetBSD: md.dreamcast,v 1.3 2022/01/12 15:35:51 martin Exp $ +./usr/share/sysinst/catalog/sysinstmsgs.de
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: martin Date: Wed Jan 12 15:35:51 UTC 2022 Modified Files: src/distrib/sets/lists/base: md.hpcarm md.ia64 Added Files: src/distrib/sets/lists/base: md.amigappc md.cesfic md.dreamcast md.epoc32 md.evbppc Log Message: A few more sysinst message catalog adjustments To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base/md.amigappc \ src/distrib/sets/lists/base/md.epoc32 \ src/distrib/sets/lists/base/md.evbppc cvs rdiff -u -r0 -r1.3 src/distrib/sets/lists/base/md.cesfic \ src/distrib/sets/lists/base/md.dreamcast cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/base/md.hpcarm cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/base/md.ia64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jan 12 12:55:46 UTC 2022 Modified Files: src/sys/dev/usb: usb_quirks.c Log Message: Ignore new APC UPS devices when matching uhid devices. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/dev/usb/usb_quirks.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/usb_quirks.c diff -u src/sys/dev/usb/usb_quirks.c:1.101 src/sys/dev/usb/usb_quirks.c:1.102 --- src/sys/dev/usb/usb_quirks.c:1.101 Fri Dec 17 08:17:40 2021 +++ src/sys/dev/usb/usb_quirks.c Wed Jan 12 12:55:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_quirks.c,v 1.101 2021/12/17 08:17:40 mrg Exp $ */ +/* $NetBSD: usb_quirks.c,v 1.102 2022/01/12 12:55:46 martin Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.101 2021/12/17 08:17:40 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.102 2022/01/12 12:55:46 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -184,6 +184,8 @@ Static const struct usbd_quirk_entry { /* Devices which should be ignored by uhid */ { USB_VENDOR_APC, USB_PRODUCT_APC_UPS, ANY, { UQ_HID_IGNORE, NULL }}, + { USB_VENDOR_APC, USB_PRODUCT_APC_UPS3, ANY, + { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_UPS0, ANY, { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_UPS, ANY,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jan 12 12:55:46 UTC 2022 Modified Files: src/sys/dev/usb: usb_quirks.c Log Message: Ignore new APC UPS devices when matching uhid devices. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/dev/usb/usb_quirks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jan 12 12:54:45 UTC 2022 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen (new APC UPS device id) To generate a diff of this commit: cvs rdiff -u -r1.790 -r1.791 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. Modified files: Index: src/sys/dev/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.790 src/sys/dev/usb/usbdevs.h:1.791 --- src/sys/dev/usb/usbdevs.h:1.790 Fri Dec 17 08:17:04 2021 +++ src/sys/dev/usb/usbdevs.h Wed Jan 12 12:54:45 2022 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.790 2021/12/17 08:17:04 mrg Exp $ */ +/* $NetBSD: usbdevs.h,v 1.791 2022/01/12 12:54:45 martin Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.799 2021/12/17 08:16:14 mrg Exp + * NetBSD: usbdevs,v 1.800 2022/01/12 12:54:02 martin Exp */ /*- @@ -831,6 +831,7 @@ /* American Power Conversion products */ #define USB_PRODUCT_APC_UPS 0x0002 /* Uninterruptible Power Supply */ +#define USB_PRODUCT_APC_UPS3 0x0003 /* Uninterruptible Power Supply */ /* Ambit Microsystems products */ #define USB_PRODUCT_AMBIT_NTL_250 0x6098 /* NTL 250 cable modem */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.790 src/sys/dev/usb/usbdevs_data.h:1.791 --- src/sys/dev/usb/usbdevs_data.h:1.790 Fri Dec 17 08:17:04 2021 +++ src/sys/dev/usb/usbdevs_data.h Wed Jan 12 12:54:45 2022 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.790 2021/12/17 08:17:04 mrg Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.791 2022/01/12 12:54:45 martin Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.799 2021/12/17 08:16:14 mrg Exp + * NetBSD: usbdevs,v 1.800 2022/01/12 12:54:02 martin Exp */ /*- @@ -880,6 +880,8 @@ static const uint32_t usb_products[] = { 6011, 6002, 0, USB_VENDOR_APC, USB_PRODUCT_APC_UPS, 6018, 1229, 1982, 0, + USB_VENDOR_APC, USB_PRODUCT_APC_UPS3, + 6018, 1229, 1982, 0, USB_VENDOR_AMBIT, USB_PRODUCT_AMBIT_NTL_250, 6034, 6038, 6042, 6048, 0, USB_VENDOR_AMD, USB_PRODUCT_AMD_TV_WONDER_600_USB, @@ -5199,7 +5201,7 @@ static const char usb_words[] = { "." "Components\0" /* 3 refs @ 1200 */ "Kawatsu\0" /* 1 refs @ 1211 */ "Composite\0" /* 1 refs @ 1219 */ - "Power\0" /* 6 refs @ 1229 */ + "Power\0" /* 7 refs @ 1229 */ "Conversion\0" /* 1 refs @ 1235 */ "Connectek\0" /* 1 refs @ 1246 */ "USA\0" /* 1 refs @ 1256 */ @@ -5299,7 +5301,7 @@ static const char usb_words[] = { "." "TEAC\0" /* 1 refs @ 1962 */ "Graphics\0" /* 2 refs @ 1967 */ "Sanwa\0" /* 1 refs @ 1976 */ - "Supply\0" /* 5 refs @ 1982 */ + "Supply\0" /* 6 refs @ 1982 */ "WayTech\0" /* 1 refs @ 1989 */ "Development,\0" /* 1 refs @ 1997 */ "Linksys\0" /* 4 refs @ 2010 */ @@ -5839,7 +5841,7 @@ static const char usb_words[] = { "." "ADA70\0" /* 1 refs @ 5996 */ "Speakers\0" /* 3 refs @ 6002 */ "ASC495\0" /* 1 refs @ 6011 */ - "Uninterruptible\0" /* 4 refs @ 6018 */ + "Uninterruptible\0" /* 5 refs @ 6018 */ "NTL\0" /* 1 refs @ 6034 */ "250\0" /* 3 refs @ 6038 */ "cable\0" /* 2 refs @ 6042 */
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jan 12 12:54:45 UTC 2022 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen (new APC UPS device id) To generate a diff of this commit: cvs rdiff -u -r1.790 -r1.791 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: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jan 12 12:54:02 UTC 2022 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add a new APC UPS device id. To generate a diff of this commit: cvs rdiff -u -r1.799 -r1.800 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/usbdevs diff -u src/sys/dev/usb/usbdevs:1.799 src/sys/dev/usb/usbdevs:1.800 --- src/sys/dev/usb/usbdevs:1.799 Fri Dec 17 08:16:14 2021 +++ src/sys/dev/usb/usbdevs Wed Jan 12 12:54:02 2022 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.799 2021/12/17 08:16:14 mrg Exp $ +$NetBSD: usbdevs,v 1.800 2022/01/12 12:54:02 martin Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -824,6 +824,7 @@ product ALTEC ASC495 0xff05 ASC495 Spea /* American Power Conversion products */ product APC UPS 0x0002 Uninterruptible Power Supply +product APC UPS3 0x0003 Uninterruptible Power Supply /* Ambit Microsystems products */ product AMBIT NTL_250 0x6098 NTL 250 cable modem
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Jan 12 12:54:02 UTC 2022 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add a new APC UPS device id. To generate a diff of this commit: cvs rdiff -u -r1.799 -r1.800 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: src/sys/net/lagg
Module Name:src Committed By: yamaguchi Date: Wed Jan 12 08:23:53 UTC 2022 Modified Files: src/sys/net/lagg: if_lagg.c if_lagg_lacp.c if_laggproto.h Log Message: Fix to call lacp_linkstate with IFNET_LOCK held Network stack calls lacp_linkstate through lagg_port_ioctl when doing "ifconfig up" or "ifconfig down" to an interface that is a member of lagg(4). And IFNET_LOCK in the member interface is held while the ioctl. Therefore, lacp_linkstate is renamed to lacp_linkstate_ifnet_locked, and always called with IFNET_LOCK held. It avoids locking agains myself. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/lagg/if_lagg.c cvs rdiff -u -r1.11 -r1.12 src/sys/net/lagg/if_lagg_lacp.c cvs rdiff -u -r1.9 -r1.10 src/sys/net/lagg/if_laggproto.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/net/lagg/if_lagg.c diff -u src/sys/net/lagg/if_lagg.c:1.29 src/sys/net/lagg/if_lagg.c:1.30 --- src/sys/net/lagg/if_lagg.c:1.29 Wed Jan 12 01:21:36 2022 +++ src/sys/net/lagg/if_lagg.c Wed Jan 12 08:23:53 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_lagg.c,v 1.29 2022/01/12 01:21:36 riastradh Exp $ */ +/* $NetBSD: if_lagg.c,v 1.30 2022/01/12 08:23:53 yamaguchi Exp $ */ /* * Copyright (c) 2005, 2006 Reyk Floeter @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.29 2022/01/12 01:21:36 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.30 2022/01/12 08:23:53 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -102,7 +102,7 @@ static const struct lagg_proto lagg_prot .pr_stopport = lacp_stopport, .pr_protostat = lacp_protostat, .pr_portstat = lacp_portstat, - .pr_linkstate = lacp_linkstate, + .pr_linkstate = lacp_linkstate_ifnet_locked, .pr_ioctl = lacp_ioctl, }, [LAGG_PROTO_FAILOVER] = { @@ -1490,6 +1490,8 @@ lagg_proto_linkstate(struct lagg_softc * lagg_proto pr; int bound; + KASSERT(IFNET_LOCKED(lp->lp_ifp)); + bound = curlwp_bind(); var = lagg_variant_getref(sc, ); @@ -2692,6 +2694,8 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon goto fallback; } + KASSERT(IFNET_LOCKED(lp->lp_ifp)); + switch (cmd) { case SIOCSIFCAP: case SIOCSIFMTU: @@ -2817,7 +2821,10 @@ lagg_linkstate_changed(void *xifp) } pserialize_read_exit(s); + IFNET_LOCK(lp->lp_ifp); lagg_proto_linkstate(lp->lp_softc, lp); + IFNET_UNLOCK(lp->lp_ifp); + lagg_port_putref(lp, ); curlwp_bindx(bound); } Index: src/sys/net/lagg/if_lagg_lacp.c diff -u src/sys/net/lagg/if_lagg_lacp.c:1.11 src/sys/net/lagg/if_lagg_lacp.c:1.12 --- src/sys/net/lagg/if_lagg_lacp.c:1.11 Thu Jan 6 12:09:42 2022 +++ src/sys/net/lagg/if_lagg_lacp.c Wed Jan 12 08:23:53 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_lagg_lacp.c,v 1.11 2022/01/06 12:09:42 riastradh Exp $ */ +/* $NetBSD: if_lagg_lacp.c,v 1.12 2022/01/12 08:23:53 yamaguchi Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.11 2022/01/06 12:09:42 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.12 2022/01/12 08:23:53 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_lagg.h" @@ -212,8 +212,6 @@ static void lacp_dprintf(const struct la #define LACP_LOCK(_sc) mutex_enter(&(_sc)->lsc_lock) #define LACP_UNLOCK(_sc) mutex_exit(&(_sc)->lsc_lock) #define LACP_LOCKED(_sc) mutex_owned(&(_sc)->lsc_lock) -#define LACP_LINKSTATE(_sc, _lp) \ - lacp_linkstate((struct lagg_proto_softc *)(_sc), (_lp)) #define LACP_TIMER_ARM(_lacpp, _timer, _val) \ (_lacpp)->lp_timer[(_timer)] = (_val) #define LACP_TIMER_DISARM(_lacpp, _timer) \ @@ -242,6 +240,7 @@ static void lacp_dprintf(const struct la static void lacp_tick(void *); static void lacp_tick_work(struct lagg_work *, void *); +static void lacp_linkstate(struct lagg_proto_softc *, struct lagg_port *); static uint32_t lacp_ifmedia2lacpmedia(u_int); static void lacp_port_disable(struct lacp_softc *, struct lacp_port *); static void lacp_port_enable(struct lacp_softc *, struct lacp_port *); @@ -673,7 +672,7 @@ lacp_allocport(struct lagg_proto_softc * lp->lp_proto_ctx = (void *)lacpp; lp->lp_prio = ntohs(lacpp->lp_actor.lpi_portprio); - LACP_LINKSTATE(lsc, lp); + lacp_linkstate(xlsc, lp); return 0; } @@ -689,7 +688,7 @@ lacp_startport(struct lagg_proto_softc * prio = (uint16_t)MIN(lp->lp_prio, UINT16_MAX); lacpp->lp_actor.lpi_portprio = htons(prio); - LACP_LINKSTATE((struct lacp_softc *)xlsc, lp); + lacp_linkstate(xlsc, lp); } void @@ -821,7 +820,7 @@ lacp_portstat(struct lagg_proto_softc *x } void -lacp_linkstate(struct lagg_proto_softc *xlsc, struct lagg_port *lp) +lacp_linkstate_ifnet_locked(struct lagg_proto_softc *xlsc, struct lagg_port *lp) { struct lacp_softc *lsc; struct lacp_port *lacpp; @@ -831,6 +830,8 @@ lacp_linkstate(struct lagg_proto_softc * uint32_t media, old_media; int error; +
CVS commit: src/sys/net/lagg
Module Name:src Committed By: yamaguchi Date: Wed Jan 12 08:23:53 UTC 2022 Modified Files: src/sys/net/lagg: if_lagg.c if_lagg_lacp.c if_laggproto.h Log Message: Fix to call lacp_linkstate with IFNET_LOCK held Network stack calls lacp_linkstate through lagg_port_ioctl when doing "ifconfig up" or "ifconfig down" to an interface that is a member of lagg(4). And IFNET_LOCK in the member interface is held while the ioctl. Therefore, lacp_linkstate is renamed to lacp_linkstate_ifnet_locked, and always called with IFNET_LOCK held. It avoids locking agains myself. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/net/lagg/if_lagg.c cvs rdiff -u -r1.11 -r1.12 src/sys/net/lagg/if_lagg_lacp.c cvs rdiff -u -r1.9 -r1.10 src/sys/net/lagg/if_laggproto.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.