CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Thu May 13 05:56:39 UTC 2021 Modified Files: src/sys/dev/ic: dwc_gmac.c Log Message: Cast to uint32_t to avoid undefined behavior in dwc_gmac_write_hwaddr(). Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/dev/ic/dwc_gmac.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/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.72 src/sys/dev/ic/dwc_gmac.c:1.73 --- src/sys/dev/ic/dwc_gmac.c:1.72 Thu Dec 31 15:09:12 2020 +++ src/sys/dev/ic/dwc_gmac.c Thu May 13 05:56:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.72 2020/12/31 15:09:12 ryo Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.73 2021/05/13 05:56:39 msaitoh Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.72 2020/12/31 15:09:12 ryo Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.73 2021/05/13 05:56:39 msaitoh Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -398,7 +398,7 @@ dwc_gmac_write_hwaddr(struct dwc_gmac_so hi = enaddr[4] | (enaddr[5] << 8); lo = enaddr[0] | (enaddr[1] << 8) | (enaddr[2] << 16) - | (enaddr[3] << 24); + | ((uint32_t)enaddr[3] << 24); bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_MAC_ADDR0HI, hi); bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_MAC_ADDR0LO, lo); }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Thu May 13 05:56:39 UTC 2021 Modified Files: src/sys/dev/ic: dwc_gmac.c Log Message: Cast to uint32_t to avoid undefined behavior in dwc_gmac_write_hwaddr(). Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/dev/ic/dwc_gmac.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/sdmmc
Module Name:src Committed By: msaitoh Date: Thu May 13 05:54:15 UTC 2021 Modified Files: src/sys/dev/sdmmc: sdhc.c Log Message: Use unsigned to avoid undefined behavior in hwrite[12](). Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/sdmmc/sdhc.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/sdhc.c diff -u src/sys/dev/sdmmc/sdhc.c:1.109 src/sys/dev/sdmmc/sdhc.c:1.110 --- src/sys/dev/sdmmc/sdhc.c:1.109 Sat Apr 24 23:36:59 2021 +++ src/sys/dev/sdmmc/sdhc.c Thu May 13 05:54:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.109 2021/04/24 23:36:59 thorpej Exp $ */ +/* $NetBSD: sdhc.c,v 1.110 2021/05/13 05:54:14 msaitoh Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.109 2021/04/24 23:36:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.110 2021/05/13 05:54:14 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -138,7 +138,7 @@ hwrite1(struct sdhc_host *hp, bus_size_t const size_t shift = 8 * (o & 3); o &= -4; uint32_t tmp = bus_space_read_4(hp->iot, hp->ioh, o); - tmp = (val << shift) | (tmp & ~(0xff << shift)); + tmp = (val << shift) | (tmp & ~(0xffU << shift)); bus_space_write_4(hp->iot, hp->ioh, o, tmp); } } @@ -153,7 +153,7 @@ hwrite2(struct sdhc_host *hp, bus_size_t const size_t shift = 8 * (o & 2); o &= -4; uint32_t tmp = bus_space_read_4(hp->iot, hp->ioh, o); - tmp = (val << shift) | (tmp & ~(0x << shift)); + tmp = (val << shift) | (tmp & ~(0xU << shift)); bus_space_write_4(hp->iot, hp->ioh, o, tmp); } }
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: msaitoh Date: Thu May 13 05:54:15 UTC 2021 Modified Files: src/sys/dev/sdmmc: sdhc.c Log Message: Use unsigned to avoid undefined behavior in hwrite[12](). Found by kUBSan. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/sdmmc/sdhc.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/mips/mips
Module Name:src Committed By: simonb Date: Thu May 13 04:55:12 UTC 2021 Modified Files: src/sys/arch/mips/mips: fp.S Log Message: Note which ISA the unimplemented instructions belong to. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mips/mips/fp.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/fp.S diff -u src/sys/arch/mips/mips/fp.S:1.54 src/sys/arch/mips/mips/fp.S:1.55 --- src/sys/arch/mips/mips/fp.S:1.54 Thu Apr 29 08:45:29 2021 +++ src/sys/arch/mips/mips/fp.S Thu May 13 04:55:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fp.S,v 1.54 2021/04/29 08:45:29 simonb Exp $ */ +/* $NetBSD: fp.S,v 1.55 2021/05/13 04:55:12 simonb Exp $ */ /* * Copyright (c) 1992, 1993 @@ -282,14 +282,14 @@ fmt_tbl: PTR_WORD mfromc1 # sub 0 mfc1 PTR_WORD dmfromc1 # sub 1 dmfc1 PTR_WORD cfromc1 # sub 2 cfc1 - PTR_WORD ill # sub 3 mfhc1 + PTR_WORD ill # sub 3 mfhc1 MIPS32r2 PTR_WORD mtoc1 # sub 4 mtc1 PTR_WORD dmtoc1 # sub 5 dmtc1 PTR_WORD ctoc1 # sub 6 ctc1 - PTR_WORD ill # sub 7 mthc1 + PTR_WORD ill # sub 7 mthc1 MIPS32r2 PTR_WORD branchc1 # sub 8 bc1 - PTR_WORD branchc1any2 # sub 9 bc1any2 - PTR_WORD branchc1any4 # sub 10 bc1any4 + PTR_WORD branchc1any2 # sub 9 bc1any2 MIPS-3D ASE + PTR_WORD branchc1any4 # sub 10 bc1any4 MIPS-3D ASE PTR_WORD ill # sub 11 PTR_WORD ill # sub 12 PTR_WORD ill # sub 13 @@ -321,37 +321,37 @@ func_single_tbl: PTR_WORD abs_s # func 5 05 ABS.S PTR_WORD mov_s # func 6 06 MOV.S PTR_WORD neg_s # func 7 07 NEG.S - PTR_WORD round_l_s # func 8 10 ROUND.L.S - PTR_WORD trunc_l_s # func 9 11 TRUNC.L.S - PTR_WORD ceil_l_s # func 10 12 CEIL.L.S - PTR_WORD floor_l_s # func 11 13 FLOOR.L.S + PTR_WORD round_l_s # func 8 10 ROUND.L.S MIPS3/MIPS64 + PTR_WORD trunc_l_s # func 9 11 TRUNC.L.S MIPS3/MIPS64 + PTR_WORD ceil_l_s # func 10 12 CEIL.L.S MIPS3/MIPS64 + PTR_WORD floor_l_s # func 11 13 FLOOR.L.S MIPS3/MIPS64 PTR_WORD round_w_s # func 12 14 ROUND.W.S PTR_WORD trunc_w_s # func 13 15 TRUNC.W.S PTR_WORD ceil_w_s # func 14 16 CEIL.W.S PTR_WORD floor_w_s # func 15 17 FLOOR.W.S PTR_WORD ill # func 16 20 - PTR_WORD movcf_s # func 17 21 MOVCF.S - PTR_WORD movz_s # func 18 22 MOVZ.S - PTR_WORD movn_s # func 19 23 MOVN.S + PTR_WORD movcf_s # func 17 21 MOVCF.S MIPS32 + PTR_WORD movz_s # func 18 22 MOVZ.S MIPS32 + PTR_WORD movn_s # func 19 23 MOVN.S MIPS32 PTR_WORD ill # func 20 24 - PTR_WORD recip_s # func 21 25 RECIP.S - PTR_WORD rsqrt_s # func 22 26 RSQRT.S + PTR_WORD recip_s # func 21 25 RECIP.S MIPS32r2 + PTR_WORD rsqrt_s # func 22 26 RSQRT.S MIPS32r2 PTR_WORD ill # func 23 27 PTR_WORD ill # func 24 30 PTR_WORD ill # func 25 31 PTR_WORD ill # func 26 32 PTR_WORD ill # func 27 33 - PTR_WORD recip2_s # func 28 34 RECIP2.S - PTR_WORD recip1_s # func 29 35 RECIP1.S - PTR_WORD rsqrt1_s # func 30 36 RSQRT1.S - PTR_WORD rsqrt2_s # func 31 37 RSQRT2.S + PTR_WORD recip2_s # func 28 34 RECIP2.S MIPS-3D ASE + PTR_WORD recip1_s # func 29 35 RECIP1.S MIPS-3D ASE + PTR_WORD rsqrt1_s # func 30 36 RSQRT1.S MIPS-3D ASE + PTR_WORD rsqrt2_s # func 31 37 RSQRT2.S MIPS-3D ASE PTR_WORD ill # func 32 40 PTR_WORD cvt_d_s # func 33 41 CVT.D.S PTR_WORD ill # func 34 42 PTR_WORD ill # func 35 43 PTR_WORD cvt_w_s # func 36 44 CVT.W.S - PTR_WORD cvt_l_s # func 37 45 CVT.L.S - PTR_WORD cvt_ps_s # func 38 46 CVT.PS.S + PTR_WORD cvt_l_s # func 37 45 CVT.L.S MIPS64r2 + PTR_WORD cvt_ps_s # func 38 46 CVT.PS.S MIPS32r2 PTR_WORD ill # func 39 47 PTR_WORD ill # func 40 50 PTR_WORD ill # func 41 51 @@ -387,36 +387,36 @@ func_double_tbl: PTR_WORD abs_d # func 5 05 ABS.D PTR_WORD mov_d # func 6 06 MOV.D PTR_WORD neg_d # func 7 07 NEG.D - PTR_WORD round_l_d # func 8 10 ROUND.L.D - PTR_WORD trunc_l_d # func 9 11 TRUNC.L.D - PTR_WORD ceil_l_d # func 10 12 CEIL.L.D - PTR_WORD floor_l_d # func 11 13 FLOOR.L.D + PTR_WORD round_l_d # func 8 10 ROUND.L.D MIPS64r2 + PTR_WORD trunc_l_d # func 9 11 TRUNC.L.D MIPS64r2 + PTR_WORD ceil_l_d # func 10 12 CEIL.L.D MIPS64r2 + PTR_WORD floor_l_d # func 11 13 FLOOR.L.D MIPS64r2 PTR_WORD round_w_d # func 12 14 ROUND.W.D PTR_WORD trunc_w_d # func 13 15 TRUNC.W.D PTR_WORD ceil_w_d # func 14 16 CEIL.W.D PTR_WORD floor_w_d # func 15 17 FLOOR.W.D PTR_WORD ill # func 16 20 - PTR_WORD movcf_d # func 17 21 MOVCF.D - PTR_WORD movz_d # func 18 22 MOVZ.D - PTR_WORD movn_d # func 19 23 MOVN.D + PTR_WORD movcf_d # func 17 21 MOVCF.D MIPS32 + PTR_WORD movz_d # func 18 22 MOVZ.D MIPS32 + PTR_WORD movn_d # func 19 23 MOVN.D MIPS32 PTR_WORD ill # func 20 24 - PTR_WORD recip_d # func 21 25 RECIP.D - PTR_WORD rsqrt_d # func 22 26 RSQRT.D + PTR_WORD recip_d # func 21 25 RECIP.D MIPS32r2 + PTR_WORD rsqrt_d # func 22 26 RSQRT.D MIPS32r2 PTR_WORD ill # func 23 27 PTR_WORD ill # func 24 30 PTR_WORD ill # func 25 31
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Thu May 13 04:55:12 UTC 2021 Modified Files: src/sys/arch/mips/mips: fp.S Log Message: Note which ISA the unimplemented instructions belong to. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mips/mips/fp.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Thu May 13 03:48:55 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Drop PADS and PADT from unknown host for safety To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/net/if_pppoe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Thu May 13 03:48:55 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Drop PADS and PADT from unknown host for safety To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/net/if_pppoe.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_pppoe.c diff -u src/sys/net/if_pppoe.c:1.172 src/sys/net/if_pppoe.c:1.173 --- src/sys/net/if_pppoe.c:1.172 Thu May 13 03:28:36 2021 +++ src/sys/net/if_pppoe.c Thu May 13 03:48:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.172 2021/05/13 03:28:36 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.173 2021/05/13 03:48:55 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.172 2021/05/13 03:28:36 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.173 2021/05/13 03:48:55 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -1007,6 +1007,11 @@ breakbreak:; if (sc == NULL) goto done; + if (memcmp(>sc_dest, eh->ether_shost, + sizeof sc->sc_dest) != 0) { + goto done; + } + sc->sc_session = session; callout_stop(>sc_timeout); pppoe_printf(sc, "session 0x%x connected\n", session); @@ -1029,6 +1034,11 @@ breakbreak:; if (sc == NULL) goto done; + if (memcmp(>sc_dest, eh->ether_shost, + sizeof sc->sc_dest) != 0) { + goto done; + } + pppoe_clear_softc(sc, "received PADT"); if (sc->sc_sppp.pp_if.if_flags & IFF_RUNNING) { pppoe_printf(sc, "wait for reconnect\n");
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Thu May 13 03:41:46 UTC 2021 Modified Files: src/sys/arch/mips/mips: mips_fputrap.c Log Message: If we're going to print a number in hex, at least put a 0x in front of it. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/mips/mips_fputrap.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/mips/mips/mips_fputrap.c diff -u src/sys/arch/mips/mips/mips_fputrap.c:1.10 src/sys/arch/mips/mips/mips_fputrap.c:1.11 --- src/sys/arch/mips/mips/mips_fputrap.c:1.10 Sat Feb 26 15:41:32 2011 +++ src/sys/arch/mips/mips/mips_fputrap.c Thu May 13 03:41:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_fputrap.c,v 1.10 2011/02/26 15:41:32 tsutsui Exp $ */ +/* $NetBSD: mips_fputrap.c,v 1.11 2021/05/13 03:41:46 simonb Exp $ */ /* * Copyright (c) 2004 @@ -47,7 +47,7 @@ mips_fpuexcept(struct lwp *l, uint32_t f ksiginfo_t ksi; #ifdef FPEMUL_DEBUG - printf("%s(%x,%#"PRIxREGISTER")\n", + printf("%s(%#x,%#"PRIxREGISTER")\n", __func__, fpustat, l->l_md.md_utf->tf_regs[_R_PC]); #endif @@ -64,7 +64,7 @@ mips_fpuillinst(struct lwp *l, uint32_t ksiginfo_t ksi; #ifdef FPEMUL_DEBUG - printf("%s(%x,%#"PRIxREGISTER")\n", + printf("%s(%#x,%#"PRIxREGISTER")\n", __func__, opcode, l->l_md.md_utf->tf_regs[_R_PC]); #endif
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Thu May 13 03:41:46 UTC 2021 Modified Files: src/sys/arch/mips/mips: mips_fputrap.c Log Message: If we're going to print a number in hex, at least put a 0x in front of it. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/mips/mips_fputrap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if_pppoe
Module Name:src Committed By: yamaguchi Date: Thu May 13 03:37:58 UTC 2021 Modified Files: src/tests/net/if_pppoe: t_pppoe.sh Log Message: Fix the wrong state check After disconnection from PPPoE server, the client waits for reconnection in initial state or reconnects in PADI state. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/tests/net/if_pppoe/t_pppoe.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if_pppoe/t_pppoe.sh diff -u src/tests/net/if_pppoe/t_pppoe.sh:1.31 src/tests/net/if_pppoe/t_pppoe.sh:1.32 --- src/tests/net/if_pppoe/t_pppoe.sh:1.31 Tue May 11 05:57:02 2021 +++ src/tests/net/if_pppoe/t_pppoe.sh Thu May 13 03:37:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_pppoe.sh,v 1.31 2021/05/11 05:57:02 yamaguchi Exp $ +# $NetBSD: t_pppoe.sh,v 1.32 2021/05/13 03:37:58 yamaguchi Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -204,7 +204,8 @@ run_test() wait_for_disconnected atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -c 1 -w $TIMEOUT $SERVER_IP - atf_check -s exit:0 -o match:'PADI sent' -x "$HIJACKING pppoectl -d pppoe0" + atf_check -s exit:0 -o match:'(PADI sent)|(initial)' \ + -x "$HIJACKING pppoectl -d pppoe0" unset RUMP_SERVER # test for reconnecting
CVS commit: src/tests/net/if_pppoe
Module Name:src Committed By: yamaguchi Date: Thu May 13 03:37:58 UTC 2021 Modified Files: src/tests/net/if_pppoe: t_pppoe.sh Log Message: Fix the wrong state check After disconnection from PPPoE server, the client waits for reconnection in initial state or reconnects in PADI state. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/tests/net/if_pppoe/t_pppoe.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Thu May 13 03:28:36 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Change reconnect delay after PADT received (15 sec -> 5 sec) 5 sec is the same as minimum PADI resending interval To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/net/if_pppoe.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_pppoe.c diff -u src/sys/net/if_pppoe.c:1.171 src/sys/net/if_pppoe.c:1.172 --- src/sys/net/if_pppoe.c:1.171 Thu May 13 01:01:10 2021 +++ src/sys/net/if_pppoe.c Thu May 13 03:28:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.171 2021/05/13 01:01:10 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.172 2021/05/13 03:28:36 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.171 2021/05/13 01:01:10 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.172 2021/05/13 03:28:36 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -129,6 +129,7 @@ struct pppoetag { #define PPPOE_SLOW_RETRY (hz*60) /* persistent retry interval */ #define PPPOE_RECON_FAST (hz*15) /* first retry after auth failure */ #define PPPOE_RECON_IMMEDIATE (hz/10) /* "no delay" reconnect */ +#define PPPOE_RECON_PADTRCVD (hz*5) /* reconnect delay after PADT received */ #define PPPOE_DISC_MAXPADI 4 /* retry PADI four times (quickly) */ #define PPPOE_DISC_MAXPADR 2 /* retry PADR twice */ @@ -1029,8 +1030,11 @@ breakbreak:; goto done; pppoe_clear_softc(sc, "received PADT"); - if (sc->sc_sppp.pp_if.if_flags & IFF_RUNNING) - callout_schedule(>sc_timeout, PPPOE_RECON_FAST); + if (sc->sc_sppp.pp_if.if_flags & IFF_RUNNING) { + pppoe_printf(sc, "wait for reconnect\n"); + callout_schedule(>sc_timeout, + PPPOE_RECON_PADTRCVD); + } PPPOE_UNLOCK(sc); break;
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Thu May 13 03:28:36 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Change reconnect delay after PADT received (15 sec -> 5 sec) 5 sec is the same as minimum PADI resending interval To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/sys/net/if_pppoe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Thu May 13 01:01:10 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Accept a frame like a PADT just containing PPPoE header To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/sys/net/if_pppoe.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_pppoe.c diff -u src/sys/net/if_pppoe.c:1.170 src/sys/net/if_pppoe.c:1.171 --- src/sys/net/if_pppoe.c:1.170 Thu Apr 22 10:26:24 2021 +++ src/sys/net/if_pppoe.c Thu May 13 01:01:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.170 2021/04/22 10:26:24 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.171 2021/05/13 01:01:10 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.170 2021/04/22 10:26:24 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.171 2021/05/13 01:01:10 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -659,7 +659,7 @@ pppoe_dispatch_disc_pkt(struct mbuf *m, eh = mtod(m, struct ether_header *); off += sizeof(*eh); - if (m->m_pkthdr.len - off <= PPPOE_HEADERLEN) { + if (m->m_pkthdr.len - off < PPPOE_HEADERLEN) { goto done; }
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Thu May 13 01:01:10 UTC 2021 Modified Files: src/sys/net: if_pppoe.c Log Message: Accept a frame like a PADT just containing PPPoE header To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/sys/net/if_pppoe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-i2c-spi-conf] src/sys/arch/macppc/dev
Module Name:src Committed By: thorpej Date: Thu May 13 00:59:27 UTC 2021 Modified Files: src/sys/arch/macppc/dev [thorpej-i2c-spi-conf]: lmu.c Log Message: Don't use the OF phandle here. To generate a diff of this commit: cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/sys/arch/macppc/dev/lmu.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/macppc/dev/lmu.c diff -u src/sys/arch/macppc/dev/lmu.c:1.8.4.1 src/sys/arch/macppc/dev/lmu.c:1.8.4.2 --- src/sys/arch/macppc/dev/lmu.c:1.8.4.1 Sun May 9 22:36:35 2021 +++ src/sys/arch/macppc/dev/lmu.c Thu May 13 00:59:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lmu.c,v 1.8.4.1 2021/05/09 22:36:35 thorpej Exp $ */ +/* $NetBSD: lmu.c,v 1.8.4.2 2021/05/13 00:59:26 thorpej Exp $ */ /*- * Copyright (c) 2020 Michael Lorenz @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lmu.c,v 1.8.4.1 2021/05/09 22:36:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lmu.c,v 1.8.4.2 2021/05/13 00:59:26 thorpej Exp $"); #include #include @@ -56,7 +56,6 @@ struct lmu_softc { device_t sc_dev; i2c_tag_t sc_i2c; i2c_addr_t sc_addr; - int sc_node; struct sysmon_envsys *sc_sme; envsys_data_t sc_sensors[2]; @@ -166,7 +165,6 @@ lmu_attach(device_t parent, device_t sel sc->sc_dev = self; sc->sc_i2c = ia->ia_tag; sc->sc_addr = ia->ia_addr; - sc->sc_node = devhandle_to_of(device_handle(self)); sc->sc_last = 0; aprint_naive("\n");
CVS commit: [thorpej-i2c-spi-conf] src/sys/arch/macppc/dev
Module Name:src Committed By: thorpej Date: Thu May 13 00:59:27 UTC 2021 Modified Files: src/sys/arch/macppc/dev [thorpej-i2c-spi-conf]: lmu.c Log Message: Don't use the OF phandle here. To generate a diff of this commit: cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/sys/arch/macppc/dev/lmu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-i2c-spi-conf] src/sys
Module Name:src Committed By: thorpej Date: Thu May 13 00:47:33 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64 [thorpej-i2c-spi-conf]: db_interface.c db_machdep.c pmap.c pmapboot.c src/sys/arch/aarch64/include [thorpej-i2c-spi-conf]: asan.h db_machdep.h pmap.h src/sys/arch/alpha/alpha [thorpej-i2c-spi-conf]: cpu.c interrupt.c machdep.c src/sys/arch/alpha/common [thorpej-i2c-spi-conf]: bus_dma.c shared_intr.c src/sys/arch/alpha/conf [thorpej-i2c-spi-conf]: Makefile.alpha src/sys/arch/alpha/include [thorpej-i2c-spi-conf]: alpha.h userret.h src/sys/arch/alpha/isa [thorpej-i2c-spi-conf]: isa_machdep.c isadma_bounce.c mcclock_isa.c src/sys/arch/alpha/jensenio [thorpej-i2c-spi-conf]: com_jensenio.c jensenio.c jensenio_dma.c jensenio_intr.c lpt_jensenio.c mcclock_jensenio.c pckbc_jensenio.c src/sys/arch/alpha/pci [thorpej-i2c-spi-conf]: apecs_dma.c apecs_pci.c cia_dma.c cia_pci.c dwlpx_dma.c dwlpx_pci.c irongate_dma.c irongate_pci.c lca_dma.c lca_pci.c mcpcia_dma.c mcpcia_pci.c pci_bwx_bus_io_chipdep.c pci_bwx_bus_mem_chipdep.c pci_swiz_bus_io_chipdep.c pci_swiz_bus_mem_chipdep.c sio.c sio_pic.c tsp_dma.c tsp_pci.c ttwoga.c ttwoga_dma.c ttwoga_pci.c ttwogavar.h src/sys/arch/alpha/sableio [thorpej-i2c-spi-conf]: com_sableio.c fdc_sableio.c lpt_sableio.c pckbc_sableio.c sableio.c src/sys/arch/alpha/tc [thorpej-i2c-spi-conf]: ioasic.c mcclock_ioasic.c tc_3000_300.c tc_3000_500.c tc_bus_mem.c tc_conf.h tcasic.c src/sys/arch/alpha/tlsb [thorpej-i2c-spi-conf]: gbus.c mcclock_tlsb.c src/sys/arch/amd64/include [thorpej-i2c-spi-conf]: gdt.h src/sys/arch/amd64/stand/prekern [thorpej-i2c-spi-conf]: console.c elf.c mm.c prekern.c prekern.h prng.c src/sys/arch/amiga/amiga [thorpej-i2c-spi-conf]: autoconf.c device.h src/sys/arch/amiga/clockport [thorpej-i2c-spi-conf]: files.clockport src/sys/arch/amiga/dev [thorpej-i2c-spi-conf]: grf.c grf_cc.c grf_cl.c grf_cv.c grf_cv3d.c grf_et.c grf_rh.c grf_rt.c grf_ul.c zbus.c src/sys/arch/amiga/stand/bootblock [thorpej-i2c-spi-conf]: Makefile src/sys/arch/amigappc/amigappc [thorpej-i2c-spi-conf]: autoconf.c src/sys/arch/arm/acpi [thorpej-i2c-spi-conf]: acpi_platform.c acpipchb.c src/sys/arch/arm/broadcom [thorpej-i2c-spi-conf]: bcm2838_pcie.c src/sys/arch/arm/fdt [thorpej-i2c-spi-conf]: files.fdt pcihost_fdt.c src/sys/arch/arm/include [thorpej-i2c-spi-conf]: lock.h src/sys/arch/arm/include/arm32 [thorpej-i2c-spi-conf]: pmap.h src/sys/arch/arm/nvidia [thorpej-i2c-spi-conf]: tegra_pcie.c src/sys/arch/arm/nxp [thorpej-i2c-spi-conf]: imxpcie.c src/sys/arch/arm/rockchip [thorpej-i2c-spi-conf]: rk_drm.c src/sys/arch/arm/sunxi [thorpej-i2c-spi-conf]: files.sunxi sun6i_dma.c sun8i_crypto.c sunxi_codec.c sunxi_codec.h src/sys/arch/atari/atari [thorpej-i2c-spi-conf]: autoconf.c device.h src/sys/arch/atari/dev [thorpej-i2c-spi-conf]: grf.c ite_cc.c ite_et.c src/sys/arch/evbarm/conf [thorpej-i2c-spi-conf]: GENERIC files.fdt src/sys/arch/evbmips/cavium [thorpej-i2c-spi-conf]: machdep.c src/sys/arch/evbmips/conf [thorpej-i2c-spi-conf]: std.malta src/sys/arch/hpcmips/dev [thorpej-i2c-spi-conf]: it8368.c src/sys/arch/hppa/include [thorpej-i2c-spi-conf]: param.h src/sys/arch/i386/i386 [thorpej-i2c-spi-conf]: gdt.c src/sys/arch/i386/include [thorpej-i2c-spi-conf]: gdt.h src/sys/arch/mac68k/mac68k [thorpej-i2c-spi-conf]: machdep.c src/sys/arch/macppc/conf [thorpej-i2c-spi-conf]: files.macppc src/sys/arch/macppc/dev [thorpej-i2c-spi-conf]: snapper.c src/sys/arch/mips/cavium [thorpej-i2c-spi-conf]: mainbus.c src/sys/arch/mips/cavium/dev [thorpej-i2c-spi-conf]: octeon_cib.c octeon_gmx.c octeon_intc.c src/sys/arch/mips/conf [thorpej-i2c-spi-conf]: Makefile.mips std.octeon src/sys/arch/mips/include [thorpej-i2c-spi-conf]: locore.h mips_param.h src/sys/arch/mips/mips [thorpej-i2c-spi-conf]: fp.S mips_fpu.c src/sys/arch/mvme68k/stand [thorpej-i2c-spi-conf]: Makefile Makefile.booters src/sys/arch/mvme68k/stand/wrtvid [thorpej-i2c-spi-conf]: Makefile wrtvid.c src/sys/arch/ofppc/conf [thorpej-i2c-spi-conf]: files.ofppc src/sys/arch/ofppc/pci [thorpej-i2c-spi-conf]: ofwpci.c src/sys/arch/pmax/stand [thorpej-i2c-spi-conf]: Makefile.booters src/sys/arch/riscv/conf [thorpej-i2c-spi-conf]: Makefile.riscv kern.ldscript src/sys/arch/riscv/include [thorpej-i2c-spi-conf]: asm.h locore.h param.h pmap.h pte.h
CVS commit: src/sys/arch/shark/conf
Module Name:src Committed By: thorpej Date: Wed May 12 23:48:41 UTC 2021 Modified Files: src/sys/arch/shark/conf: files.shark Log Message: Add OFW PCI subroutines if PCI support is included in the kernel. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/shark/conf/files.shark Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/shark/conf
Module Name:src Committed By: thorpej Date: Wed May 12 23:48:41 UTC 2021 Modified Files: src/sys/arch/shark/conf: files.shark Log Message: Add OFW PCI subroutines if PCI support is included in the kernel. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/shark/conf/files.shark 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/shark/conf/files.shark diff -u src/sys/arch/shark/conf/files.shark:1.24 src/sys/arch/shark/conf/files.shark:1.25 --- src/sys/arch/shark/conf/files.shark:1.24 Fri Apr 30 02:24:05 2021 +++ src/sys/arch/shark/conf/files.shark Wed May 12 23:48:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.shark,v 1.24 2021/04/30 02:24:05 thorpej Exp $ +# $NetBSD: files.shark,v 1.25 2021/05/12 23:48:41 thorpej Exp $ # # First try for arm-specific configuration info # @@ -136,6 +136,7 @@ file arch/shark/ofw/chipsfb_ofbus.c chi device vlpci: pcibus file arch/shark/ofw/vlpci.c vlpci needs-flag attach vlpci at ofbus +file dev/ofw/ofw_pci_subr.c pci # Smart Card Reader device scr: tty
CVS commit: src/sys
Module Name:src Committed By: thorpej Date: Wed May 12 23:22:33 UTC 2021 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c src/sys/arch/evbarm/conf: files.fdt src/sys/arch/macppc/conf: files.macppc src/sys/arch/ofppc/conf: files.ofppc src/sys/arch/sparc64/conf: files.sparc64 src/sys/arch/sparc64/sparc64: autoconf.c src/sys/arch/x86/acpi: acpi_machdep.c src/sys/dev/acpi: acpi.c acpi_pci.c acpivar.h src/sys/dev/ofw: files.ofw src/sys/dev/pci: pci.c pcivar.h Added Files: src/sys/dev/ofw: ofw_pci_subr.c Log Message: - Define a device call for PCI bus instances to fetch a direct child's device handle given the device's device/function #s (extracted from a pcitag_t). Use it to associate the handle with the child device at config_found() time. - Implement this device call for ACPI and OpenFirmware. - Enable the OpenFirmware variant for evbarm FDT, macppc, ofppc, sparc64. - Obsolete acpi_device_register(); it is no longer needed. - Obsolete setting the OpenFirmware handle in PCI devices in the sparc64 device_register(); it is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/acpi/acpi_platform.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/files.fdt cvs rdiff -u -r1.117 -r1.118 src/sys/arch/macppc/conf/files.macppc cvs rdiff -u -r1.47 -r1.48 src/sys/arch/ofppc/conf/files.ofppc cvs rdiff -u -r1.165 -r1.166 src/sys/arch/sparc64/conf/files.sparc64 cvs rdiff -u -r1.230 -r1.231 src/sys/arch/sparc64/sparc64/autoconf.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/acpi/acpi_machdep.c cvs rdiff -u -r1.291 -r1.292 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.85 -r1.86 src/sys/dev/acpi/acpivar.h cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ofw/files.ofw cvs rdiff -u -r0 -r1.1 src/sys/dev/ofw/ofw_pci_subr.c cvs rdiff -u -r1.159 -r1.160 src/sys/dev/pci/pci.c cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/pcivar.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/arm/acpi/acpi_platform.c diff -u src/sys/arch/arm/acpi/acpi_platform.c:1.25 src/sys/arch/arm/acpi/acpi_platform.c:1.26 --- src/sys/arch/arm/acpi/acpi_platform.c:1.25 Sat Apr 24 23:36:25 2021 +++ src/sys/arch/arm/acpi/acpi_platform.c Wed May 12 23:22:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_platform.c,v 1.25 2021/04/24 23:36:25 thorpej Exp $ */ +/* $NetBSD: acpi_platform.c,v 1.26 2021/05/12 23:22:32 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.25 2021/04/24 23:36:25 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.26 2021/05/12 23:22:32 thorpej Exp $"); #include #include @@ -287,8 +287,6 @@ acpi_platform_init_attach_args(struct fd static void acpi_platform_device_register(device_t self, void *aux) { - acpi_device_register(self, aux); - #if NCOM > 0 prop_dictionary_t prop = device_properties(self); ACPI_STATUS rv; Index: src/sys/arch/evbarm/conf/files.fdt diff -u src/sys/arch/evbarm/conf/files.fdt:1.7 src/sys/arch/evbarm/conf/files.fdt:1.8 --- src/sys/arch/evbarm/conf/files.fdt:1.7 Sat Dec 12 09:27:31 2020 +++ src/sys/arch/evbarm/conf/files.fdt Wed May 12 23:22:32 2021 @@ -1,9 +1,10 @@ -# $NetBSD: files.fdt,v 1.7 2020/12/12 09:27:31 skrll Exp $ +# $NetBSD: files.fdt,v 1.8 2021/05/12 23:22:32 thorpej Exp $ # # FDT-based kernel configuration info # file arch/evbarm/fdt/fdt_dma_machdep.c fdt file arch/evbarm/fdt/fdt_machdep.c fdt +file dev/ofw/ofw_pci_subr.c fdt & pci include "arch/arm/fdt/files.fdt" Index: src/sys/arch/macppc/conf/files.macppc diff -u src/sys/arch/macppc/conf/files.macppc:1.117 src/sys/arch/macppc/conf/files.macppc:1.118 --- src/sys/arch/macppc/conf/files.macppc:1.117 Sat May 1 15:12:25 2021 +++ src/sys/arch/macppc/conf/files.macppc Wed May 12 23:22:33 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.macppc,v 1.117 2021/05/01 15:12:25 thorpej Exp $ +# $NetBSD: files.macppc,v 1.118 2021/05/12 23:22:33 thorpej Exp $ # # macppc-specific configuration info @@ -93,6 +93,7 @@ include "dev/isa/files.isa" include "dev/pci/files.pci" include "dev/pci/files.agp" file arch/macppc/pci/pci_machdep.c pci +file dev/ofw/ofw_pci_subr.c pci file arch/macppc/pci/agp_machdep.c agp file arch/powerpc/pci/pciconf_indirect.c pci file arch/powerpc/pci/pci_machdep_common.c pci Index: src/sys/arch/ofppc/conf/files.ofppc diff -u src/sys/arch/ofppc/conf/files.ofppc:1.47 src/sys/arch/ofppc/conf/files.ofppc:1.48 --- src/sys/arch/ofppc/conf/files.ofppc:1.47 Mon Dec 18 15:53:39 2017 +++ src/sys/arch/ofppc/conf/files.ofppc Wed May 12 23:22:33 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.ofppc,v 1.47 2017/12/18 15:53:39 skrll Exp $ +# $NetBSD: files.ofppc,v 1.48 2021/05/12 23:22:33 thorpej Exp
CVS commit: src/sys
Module Name:src Committed By: thorpej Date: Wed May 12 23:22:33 UTC 2021 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c src/sys/arch/evbarm/conf: files.fdt src/sys/arch/macppc/conf: files.macppc src/sys/arch/ofppc/conf: files.ofppc src/sys/arch/sparc64/conf: files.sparc64 src/sys/arch/sparc64/sparc64: autoconf.c src/sys/arch/x86/acpi: acpi_machdep.c src/sys/dev/acpi: acpi.c acpi_pci.c acpivar.h src/sys/dev/ofw: files.ofw src/sys/dev/pci: pci.c pcivar.h Added Files: src/sys/dev/ofw: ofw_pci_subr.c Log Message: - Define a device call for PCI bus instances to fetch a direct child's device handle given the device's device/function #s (extracted from a pcitag_t). Use it to associate the handle with the child device at config_found() time. - Implement this device call for ACPI and OpenFirmware. - Enable the OpenFirmware variant for evbarm FDT, macppc, ofppc, sparc64. - Obsolete acpi_device_register(); it is no longer needed. - Obsolete setting the OpenFirmware handle in PCI devices in the sparc64 device_register(); it is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/acpi/acpi_platform.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/files.fdt cvs rdiff -u -r1.117 -r1.118 src/sys/arch/macppc/conf/files.macppc cvs rdiff -u -r1.47 -r1.48 src/sys/arch/ofppc/conf/files.ofppc cvs rdiff -u -r1.165 -r1.166 src/sys/arch/sparc64/conf/files.sparc64 cvs rdiff -u -r1.230 -r1.231 src/sys/arch/sparc64/sparc64/autoconf.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/acpi/acpi_machdep.c cvs rdiff -u -r1.291 -r1.292 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.85 -r1.86 src/sys/dev/acpi/acpivar.h cvs rdiff -u -r1.16 -r1.17 src/sys/dev/ofw/files.ofw cvs rdiff -u -r0 -r1.1 src/sys/dev/ofw/ofw_pci_subr.c cvs rdiff -u -r1.159 -r1.160 src/sys/dev/pci/pci.c cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/pcivar.h 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/x86
Module Name:src Committed By: thorpej Date: Wed May 12 22:17:40 UTC 2021 Modified Files: src/sys/arch/x86/x86: mpacpi.c Log Message: In mpacpi_pci_attach_hook(), set the device handle of the PCI bus instance to the associated ACPI handle if a device handle is not already set. XXX This is a mess. Sure would be nice if it looked / worked more like XXX the ARM code. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/x86/x86/mpacpi.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/mpacpi.c diff -u src/sys/arch/x86/x86/mpacpi.c:1.105 src/sys/arch/x86/x86/mpacpi.c:1.106 --- src/sys/arch/x86/x86/mpacpi.c:1.105 Sat Apr 24 23:36:51 2021 +++ src/sys/arch/x86/x86/mpacpi.c Wed May 12 22:17:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mpacpi.c,v 1.105 2021/04/24 23:36:51 thorpej Exp $ */ +/* $NetBSD: mpacpi.c,v 1.106 2021/05/12 22:17:40 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.105 2021/04/24 23:36:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.106 2021/05/12 22:17:40 thorpej Exp $"); #include "acpica.h" #include "opt_acpi.h" @@ -90,7 +90,7 @@ ACPI_MODULE_NAME ("mpacpi") #if NPCI > 0 struct mpacpi_pcibus { TAILQ_ENTRY(mpacpi_pcibus) mpr_list; - ACPI_HANDLE mpr_handle; /* Same thing really, but.. */ + devhandle_t mpr_devhandle; ACPI_BUFFER mpr_buf; /* preserve _PRT */ int mpr_seg; /* PCI segment number */ int mpr_bus; /* PCI bus number */ @@ -509,7 +509,7 @@ mpacpi_pci_foundbus(struct acpi_devnode } mpr = kmem_zalloc(sizeof(struct mpacpi_pcibus), KM_SLEEP); - mpr->mpr_handle = ad->ad_handle; + mpr->mpr_devhandle = devhandle_from_acpi(ad->ad_handle); mpr->mpr_buf = buf; mpr->mpr_seg = ad->ad_pciinfo->ap_segment; mpr->mpr_bus = ad->ad_pciinfo->ap_downbus; @@ -953,6 +953,29 @@ mpacpi_find_interrupts(void *self) #if NPCI > 0 +static void +mpacpi_set_devhandle(device_t self, struct pcibus_attach_args *pba) +{ + devhandle_t devhandle = device_handle(self); + struct mpacpi_pcibus *mpr; + + /* If we already have a valid handle, eject now. */ + if (devhandle_type(devhandle) != DEVHANDLE_TYPE_INVALID) { + return; + } + + TAILQ_FOREACH(mpr, _pcibusses, mpr_list) { + /* XXX Assuming always segment 0 on x86. */ + if (mpr->mpr_seg != 0) { + continue; + } + if (mpr->mpr_bus == pba->pba_bus) { + device_set_handle(self, mpr->mpr_devhandle); + return; + } + } +} + int mpacpi_pci_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba) @@ -984,13 +1007,16 @@ mpacpi_pci_attach_hook(device_t parent, if (mpb->mb_name != NULL) { if (strcmp(mpb->mb_name, "pci")) return EINVAL; - } else + } else { /* * As we cannot find all PCI-to-PCI bridge in * mpacpi_find_pcibusses, some of the MP_busses may remain * uninitialized. */ mpb->mb_name = "pci"; + } + + mpacpi_set_devhandle(self, pba); mpb->mb_dev = self; mpb->mb_pci_bridge_tag = pba->pba_bridgetag;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: thorpej Date: Wed May 12 22:17:40 UTC 2021 Modified Files: src/sys/arch/x86/x86: mpacpi.c Log Message: In mpacpi_pci_attach_hook(), set the device handle of the PCI bus instance to the associated ACPI handle if a device handle is not already set. XXX This is a mess. Sure would be nice if it looked / worked more like XXX the ARM code. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/x86/x86/mpacpi.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/arm/acpi
Module Name:src Committed By: thorpej Date: Wed May 12 21:56:13 UTC 2021 Modified Files: src/sys/arch/arm/acpi: acpipchb.c Log Message: Pass along our devhandle to the PCI bus instance we attach. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/acpi/acpipchb.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/arm/acpi/acpipchb.c diff -u src/sys/arch/arm/acpi/acpipchb.c:1.24 src/sys/arch/arm/acpi/acpipchb.c:1.25 --- src/sys/arch/arm/acpi/acpipchb.c:1.24 Sat Apr 24 23:36:25 2021 +++ src/sys/arch/arm/acpi/acpipchb.c Wed May 12 21:56:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpipchb.c,v 1.24 2021/04/24 23:36:25 thorpej Exp $ */ +/* $NetBSD: acpipchb.c,v 1.25 2021/05/12 21:56:13 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.24 2021/04/24 23:36:25 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.25 2021/05/12 21:56:13 thorpej Exp $"); #include #include @@ -174,7 +174,9 @@ acpipchb_attach(device_t parent, device_ acpipchb_setup_ranges(sc, ); acpipchb_setup_quirks(sc, ); - config_found(self, , pcibusprint, CFARG_EOL); + config_found(self, , pcibusprint, + CFARG_DEVHANDLE, device_handle(self), + CFARG_EOL); } struct acpipchb_setup_ranges_args {
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: thorpej Date: Wed May 12 21:56:13 UTC 2021 Modified Files: src/sys/arch/arm/acpi: acpipchb.c Log Message: Pass along our devhandle to the PCI bus instance we attach. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/acpi/acpipchb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/snake/snscore
Module Name:src Committed By: kre Date: Wed May 12 15:26:44 UTC 2021 Modified Files: src/games/snake/snscore: snscore.c Log Message: Adapt to recent change to ../snake/pathnames.h To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/games/snake/snscore/snscore.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/snake/snscore/snscore.c diff -u src/games/snake/snscore/snscore.c:1.19 src/games/snake/snscore/snscore.c:1.20 --- src/games/snake/snscore/snscore.c:1.19 Tue Jun 19 05:46:09 2012 +++ src/games/snake/snscore/snscore.c Wed May 12 15:26:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: snscore.c,v 1.19 2012/06/19 05:46:09 dholland Exp $ */ +/* $NetBSD: snscore.c,v 1.20 2021/05/12 15:26:44 kre Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)snscore.c 8.1 (Berkeley) 7/19/93"; #else -__RCSID("$NetBSD: snscore.c,v 1.19 2012/06/19 05:46:09 dholland Exp $"); +__RCSID("$NetBSD: snscore.c,v 1.20 2021/05/12 15:26:44 kre Exp $"); #endif #endif /* not lint */ @@ -52,7 +52,7 @@ __RCSID("$NetBSD: snscore.c,v 1.19 2012/ #include #include "pathnames.h" -static const char *recfile = _PATH_RAWSCORES; +static const char *recfile = SNAKE_PATH_RAWSCORES; #define MAXPLAYERS 256 struct player {
CVS commit: src/games/snake/snscore
Module Name:src Committed By: kre Date: Wed May 12 15:26:44 UTC 2021 Modified Files: src/games/snake/snscore: snscore.c Log Message: Adapt to recent change to ../snake/pathnames.h To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/games/snake/snscore/snscore.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
Module Name:src Committed By: martin Date: Wed May 12 13:15:55 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 LAST_MINUTE src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local src/sys/sys [netbsd-9]: param.h Log Message: Welcome to NetBSD 9.2! To generate a diff of this commit: cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-9.2 cvs rdiff -u -r1.2.66.1 -r1.2.66.2 src/doc/LAST_MINUTE cvs rdiff -u -r1.5.6.7 -r1.5.6.8 src/external/gpl2/groff/tmac/mdoc.local cvs rdiff -u -r1.599.2.9 -r1.599.2.10 src/sys/sys/param.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
Module Name:src Committed By: martin Date: Wed May 12 13:15:55 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 LAST_MINUTE src/external/gpl2/groff/tmac [netbsd-9]: mdoc.local src/sys/sys [netbsd-9]: param.h Log Message: Welcome to NetBSD 9.2! To generate a diff of this commit: cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-9.2 cvs rdiff -u -r1.2.66.1 -r1.2.66.2 src/doc/LAST_MINUTE cvs rdiff -u -r1.5.6.7 -r1.5.6.8 src/external/gpl2/groff/tmac/mdoc.local cvs rdiff -u -r1.599.2.9 -r1.599.2.10 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.2 diff -u src/doc/CHANGES-9.2:1.1.2.82 src/doc/CHANGES-9.2:1.1.2.83 --- src/doc/CHANGES-9.2:1.1.2.82 Wed May 12 06:55:12 2021 +++ src/doc/CHANGES-9.2 Wed May 12 13:15:55 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.2,v 1.1.2.82 2021/05/12 06:55:12 msaitoh Exp $ +# $NetBSD: CHANGES-9.2,v 1.1.2.83 2021/05/12 13:15:55 martin Exp $ A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2 release: @@ -3106,3 +3106,16 @@ usr.sbin/sysinst/mbr.c1.39 when the partition can not be changed (e.g. because it needs to match the same partition defined in the MBR) [martin, ticket #1271] + +distrib/notes/amd64/contents (manually edited) +distrib/notes/sparc64/contents (manually edited) + + Note that distribution sets are not gzip compressed. + [martin] + +doc/LAST_MINUTE (manually edited) +external/gpl2/groff/tmac/mdoc.local (manually edited) +sys/sys/param.h (manually edited) + + Update version numbers - welcome to NetBSD 9.2! + [martin] Index: src/doc/LAST_MINUTE diff -u src/doc/LAST_MINUTE:1.2.66.1 src/doc/LAST_MINUTE:1.2.66.2 --- src/doc/LAST_MINUTE:1.2.66.1 Tue Jul 30 16:52:10 2019 +++ src/doc/LAST_MINUTE Wed May 12 13:15:55 2021 @@ -1,6 +1,6 @@ -# $NetBSD: LAST_MINUTE,v 1.2.66.1 2019/07/30 16:52:10 martin Exp $ +# $NetBSD: LAST_MINUTE,v 1.2.66.2 2021/05/12 13:15:55 martin Exp $ -This file contains important information on the NetBSD 9.0 release that +This file contains important information on the NetBSD 9.2 release that did not make it into the main documentation. [all] Index: src/external/gpl2/groff/tmac/mdoc.local diff -u src/external/gpl2/groff/tmac/mdoc.local:1.5.6.7 src/external/gpl2/groff/tmac/mdoc.local:1.5.6.8 --- src/external/gpl2/groff/tmac/mdoc.local:1.5.6.7 Thu Oct 22 11:21:41 2020 +++ src/external/gpl2/groff/tmac/mdoc.local Wed May 12 13:15:54 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: mdoc.local,v 1.5.6.7 2020/10/22 11:21:41 martin Exp $ +.\" $NetBSD: mdoc.local,v 1.5.6.8 2021/05/12 13:15:54 martin Exp $ .\" .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\" Default .Os value -.ds doc-operating-system NetBSD\~9.1_STABLE +.ds doc-operating-system NetBSD\~9.2 .\" Default footer operating system value -.ds doc-default-operating-system NetBSD\~9.1_STABLE +.ds doc-default-operating-system NetBSD\~9.2 .\" Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 @@ -65,6 +65,7 @@ .ds doc-operating-system-NetBSD-8.08.0 .ds doc-operating-system-NetBSD-9.09.0 .ds doc-operating-system-NetBSD-9.19.1 +.ds doc-operating-system-NetBSD-9.29.2 .ds doc-operating-system-FreeBSD-4.11 4.11 .ds doc-operating-system-FreeBSD-5.4 5.4 .ds doc-operating-system-FreeBSD-5.5 5.5 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.599.2.9 src/sys/sys/param.h:1.599.2.10 --- src/sys/sys/param.h:1.599.2.9 Sat Nov 14 15:36:11 2020 +++ src/sys/sys/param.h Wed May 12 13:15:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.599.2.9 2020/11/14 15:36:11 martin Exp $ */ +/* $NetBSD: param.h,v 1.599.2.10 2021/05/12 13:15:54 martin Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 90100 /* NetBSD 9.1_STABLE */ +#define __NetBSD_Version__ 90200 /* NetBSD 9.2 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: [netbsd-9] src/distrib/notes
Module Name:src Committed By: martin Date: Wed May 12 13:06:23 UTC 2021 Modified Files: src/distrib/notes/amd64 [netbsd-9]: contents src/distrib/notes/sparc64 [netbsd-9]: contents Log Message: Sets are not actually gzip'd To generate a diff of this commit: cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/distrib/notes/amd64/contents cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/distrib/notes/sparc64/contents Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/amd64/contents diff -u src/distrib/notes/amd64/contents:1.7.4.2 src/distrib/notes/amd64/contents:1.7.4.3 --- src/distrib/notes/amd64/contents:1.7.4.2 Mon Nov 25 05:50:18 2019 +++ src/distrib/notes/amd64/contents Wed May 12 13:06:23 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: contents,v 1.7.4.2 2019/11/25 05:50:18 msaitoh Exp $ +.\" $NetBSD: contents,v 1.7.4.3 2021/05/12 13:06:23 martin Exp $ .\" .\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -245,7 +245,7 @@ This includes the modular X.Org server. .\" . .Pp -The \*M binary distribution sets are distributed as gzipped tar files +The \*M binary distribution sets are distributed as compressed tar files named with the extension .Sy .\*[setsuffix] .Pq e.g., Pa base.\*[setsuffix] . Index: src/distrib/notes/sparc64/contents diff -u src/distrib/notes/sparc64/contents:1.7.4.2 src/distrib/notes/sparc64/contents:1.7.4.3 --- src/distrib/notes/sparc64/contents:1.7.4.2 Mon Nov 25 05:50:16 2019 +++ src/distrib/notes/sparc64/contents Wed May 12 13:06:23 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: contents,v 1.7.4.2 2019/11/25 05:50:16 msaitoh Exp $ +.\" $NetBSD: contents,v 1.7.4.3 2021/05/12 13:06:23 martin Exp $ .\" .\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -295,7 +295,7 @@ This includes the modular Xorg and Xvfb .\" XXX: should be in notes/common . .Pp -The \*M binary distribution sets are distributed as gzipped tar files +The \*M binary distribution sets are distributed as compressed tar files named with the extension .Sy .\*[setsuffix] , e.g.,
CVS commit: [netbsd-9] src/distrib/notes
Module Name:src Committed By: martin Date: Wed May 12 13:06:23 UTC 2021 Modified Files: src/distrib/notes/amd64 [netbsd-9]: contents src/distrib/notes/sparc64 [netbsd-9]: contents Log Message: Sets are not actually gzip'd To generate a diff of this commit: cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/distrib/notes/amd64/contents cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/distrib/notes/sparc64/contents Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/snake/snake
Module Name:src Committed By: nia Date: Wed May 12 11:08:31 UTC 2021 Modified Files: src/games/snake/snake: pathnames.h snake.c Log Message: snake: Avoid creating definitions prefixed with _ inside a program To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/snake/snake/pathnames.h cvs rdiff -u -r1.30 -r1.31 src/games/snake/snake/snake.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/snake/snake/pathnames.h diff -u src/games/snake/snake/pathnames.h:1.4 src/games/snake/snake/pathnames.h:1.5 --- src/games/snake/snake/pathnames.h:1.4 Thu Aug 7 09:37:45 2003 +++ src/games/snake/snake/pathnames.h Wed May 12 11:08:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pathnames.h,v 1.4 2003/08/07 09:37:45 agc Exp $ */ +/* $NetBSD: pathnames.h,v 1.5 2021/05/12 11:08:31 nia Exp $ */ /* * Copyright (c) 1989, 1993 @@ -31,5 +31,5 @@ * @(#)pathnames.h 8.1 (Berkeley) 5/31/93 */ -#define _PATH_RAWSCORES "/var/games/snakerawscores" -#define _PATH_LOGFILE "/var/games/snake.log" +#define SNAKE_PATH_RAWSCORES "/var/games/snakerawscores" +#define SNAKE_PATH_LOGFILE "/var/games/snake.log" Index: src/games/snake/snake/snake.c diff -u src/games/snake/snake/snake.c:1.30 src/games/snake/snake/snake.c:1.31 --- src/games/snake/snake/snake.c:1.30 Thu May 14 08:34:18 2020 +++ src/games/snake/snake/snake.c Wed May 12 11:08:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: snake.c,v 1.30 2020/05/14 08:34:18 msaitoh Exp $ */ +/* $NetBSD: snake.c,v 1.31 2021/05/12 11:08:31 nia Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)snake.c 8.2 (Berkeley) 1/7/94"; #else -__RCSID("$NetBSD: snake.c,v 1.30 2020/05/14 08:34:18 msaitoh Exp $"); +__RCSID("$NetBSD: snake.c,v 1.31 2021/05/12 11:08:31 nia Exp $"); #endif #endif/* not lint */ @@ -143,15 +143,15 @@ main(int argc, char **argv) time_t tv; /* Open score files then revoke setgid privileges */ - rawscores = open(_PATH_RAWSCORES, O_RDWR|O_CREAT, 0664); + rawscores = open(SNAKE_PATH_RAWSCORES, O_RDWR|O_CREAT, 0664); if (rawscores < 0) { - warn("open %s", _PATH_RAWSCORES); + warn("open %s", SNAKE_PATH_RAWSCORES); sleep(2); } else if (rawscores < 3) exit(1); - logfile = fopen(_PATH_LOGFILE, "a"); + logfile = fopen(SNAKE_PATH_LOGFILE, "a"); if (logfile == NULL) { - warn("fopen %s", _PATH_LOGFILE); + warn("fopen %s", SNAKE_PATH_LOGFILE); sleep(2); } setgid(getgid());
CVS commit: src/games/snake/snake
Module Name:src Committed By: nia Date: Wed May 12 11:08:31 UTC 2021 Modified Files: src/games/snake/snake: pathnames.h snake.c Log Message: snake: Avoid creating definitions prefixed with _ inside a program To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/games/snake/snake/pathnames.h cvs rdiff -u -r1.30 -r1.31 src/games/snake/snake/snake.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/pci
Module Name:src Committed By: knakahara Date: Wed May 12 10:16:12 UTC 2021 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix i386 build failure with options WM_EVENT_COUNTERS. pointed out by msaitoh@n.o. To generate a diff of this commit: cvs rdiff -u -r1.703 -r1.704 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.703 src/sys/dev/pci/if_wm.c:1.704 --- src/sys/dev/pci/if_wm.c:1.703 Mon May 3 07:43:31 2021 +++ src/sys/dev/pci/if_wm.c Wed May 12 10:16:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.703 2021/05/03 07:43:31 rillig Exp $ */ +/* $NetBSD: if_wm.c,v 1.704 2021/05/12 10:16:12 knakahara Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.703 2021/05/03 07:43:31 rillig Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.704 2021/05/12 10:16:12 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -107,6 +107,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #include #include #include +#include #include @@ -667,12 +668,19 @@ do { \ } while (/*CONSTCOND*/0) #ifdef WM_EVENT_COUNTERS +#ifdef __HAVE_ATOMIC64_LOADSTORE #define WM_EVCNT_INCR(ev) \ atomic_store_relaxed(&((ev)->ev_count),\ atomic_load_relaxed(&(ev)->ev_count) + 1) #define WM_EVCNT_ADD(ev, val) \ atomic_store_relaxed(&((ev)->ev_count),\ atomic_load_relaxed(&(ev)->ev_count) + (val)) +#else +#define WM_EVCNT_INCR(ev) \ + ((ev)->ev_count)++ +#define WM_EVCNT_ADD(ev, val) \ + (ev)->ev_count += (val) +#endif #define WM_Q_EVCNT_INCR(qname, evname) \ WM_EVCNT_INCR(&(qname)->qname##_ev_##evname)
CVS commit: src/sys/dev/pci
Module Name:src Committed By: knakahara Date: Wed May 12 10:16:12 UTC 2021 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix i386 build failure with options WM_EVENT_COUNTERS. pointed out by msaitoh@n.o. To generate a diff of this commit: cvs rdiff -u -r1.703 -r1.704 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: src/sys/lib/libsa
Module Name:src Committed By: mrg Date: Wed May 12 08:45:28 UTC 2021 Modified Files: src/sys/lib/libsa: ufs.c Log Message: push the FFSv1 superblock code into ffs_find_superblock() and hide all the ugliness in this function, out of ufs_open(). NFC, objects same size if not identical. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/lib/libsa/ufs.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/lib/libsa/ufs.c diff -u src/sys/lib/libsa/ufs.c:1.78 src/sys/lib/libsa/ufs.c:1.79 --- src/sys/lib/libsa/ufs.c:1.78 Sat Dec 19 08:51:03 2020 +++ src/sys/lib/libsa/ufs.c Wed May 12 08:45:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs.c,v 1.78 2020/12/19 08:51:03 rin Exp $ */ +/* $NetBSD: ufs.c,v 1.79 2021/05/12 08:45:28 mrg Exp $ */ /*- * Copyright (c) 1993 @@ -201,9 +201,6 @@ static int search_directory(const char * #ifdef LIBSA_FFSv1 static void ffs_oldfscompat(FS *); #endif -#ifdef LIBSA_FFSv2 -static int ffs_find_superblock(struct open_file *, FS *); -#endif #ifdef LIBSA_LFS @@ -513,15 +510,14 @@ search_directory(const char *name, int l return ENOENT; } -#ifdef LIBSA_FFSv2 - -daddr_t sblock_try[] = SBLOCKSEARCH; - -static int +static __inline__ int ffs_find_superblock(struct open_file *f, FS *fs) { - int i, rc; + int rc; size_t buf_size; +#ifdef LIBSA_FFSv2 + static daddr_t sblock_try[] = SBLOCKSEARCH; + int i; for (i = 0; sblock_try[i] != -1; i++) { rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, @@ -536,9 +532,20 @@ ffs_find_superblock(struct open_file *f, } } return EINVAL; -} - +#else /* LIBSA_FFSv2 */ + rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, + SBLOCKOFFSET / DEV_BSIZE, SBLOCKSIZE, fs, _size); + if (rc) + return rc; + if (buf_size != SBLOCKSIZE || +#ifdef LIBSA_LFS + fs->lfs_version != REQUIRED_LFS_VERSION || #endif + fs->fs_magic != FS_MAGIC) + return EINVAL; + return 0; +#endif /* !LIBSA_FFSv2 */ +} /* * Open a file. @@ -571,26 +578,10 @@ ufs_open(const char *path, struct open_f fp->f_fs = fs; twiddle(); -#ifdef LIBSA_FFSv2 rc = ffs_find_superblock(f, fs); if (rc) goto out; -#else - { - size_t buf_size; - rc = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, - SBLOCKOFFSET / DEV_BSIZE, SBLOCKSIZE, fs, _size); - if (rc) - goto out; - if (buf_size != SBLOCKSIZE || -#ifdef LIBSA_LFS - fs->lfs_version != REQUIRED_LFS_VERSION || -#endif - fs->fs_magic != FS_MAGIC) { - rc = EINVAL; - goto out; - } - } + #if defined(LIBSA_LFS) && REQUIRED_LFS_VERSION == 2 /* * XXX We should check the second superblock and use the eldest @@ -604,8 +595,6 @@ ufs_open(const char *path, struct open_f fs->lfs_dobyteswap = 0; fs->lfs_hasolddirfmt = (fs->fs_maxsymlinklen <= 0); #endif -#endif - #ifdef LIBSA_FFSv1 ffs_oldfscompat(fs); #endif
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: mrg Date: Wed May 12 08:45:28 UTC 2021 Modified Files: src/sys/lib/libsa: ufs.c Log Message: push the FFSv1 superblock code into ffs_find_superblock() and hide all the ugliness in this function, out of ufs_open(). NFC, objects same size if not identical. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/lib/libsa/ufs.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/doc
Module Name:src Committed By: msaitoh Date: Wed May 12 06:55:12 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Ticket #1271. To generate a diff of this commit: cvs rdiff -u -r1.1.2.81 -r1.1.2.82 src/doc/CHANGES-9.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.2 diff -u src/doc/CHANGES-9.2:1.1.2.81 src/doc/CHANGES-9.2:1.1.2.82 --- src/doc/CHANGES-9.2:1.1.2.81 Sun May 9 07:10:08 2021 +++ src/doc/CHANGES-9.2 Wed May 12 06:55:12 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.2,v 1.1.2.81 2021/05/09 07:10:08 martin Exp $ +# $NetBSD: CHANGES-9.2,v 1.1.2.82 2021/05/12 06:55:12 msaitoh Exp $ A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2 release: @@ -3095,3 +3095,14 @@ sys/dev/pci/siisata_pci.c 1.21 siisata(4): PR 55115 - disable MSI for SiI3124. [dolecek, ticket #1270] +usr.sbin/sysinst/arch/evbarm/md.c 1.21 +usr.sbin/sysinst/label.c 1.33 +usr.sbin/sysinst/mbr.c1.39 + + sysinst: + - fix a few inconsistencies around MSDOS file system handling, + especially visible on evbarm installations. + - do not allow editing some properties of partitions + when the partition can not be changed (e.g. because it needs to + match the same partition defined in the MBR) + [martin, ticket #1271]
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: msaitoh Date: Wed May 12 06:55:12 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Ticket #1271. To generate a diff of this commit: cvs rdiff -u -r1.1.2.81 -r1.1.2.82 src/doc/CHANGES-9.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed May 12 06:53:56 UTC 2021 Modified Files: src/usr.sbin/sysinst [netbsd-9]: label.c mbr.c src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c Log Message: Pull up following revision(s) (requested by martin in ticket #1271): usr.sbin/sysinst/mbr.c: revision 1.39 usr.sbin/sysinst/label.c: revision 1.33 usr.sbin/sysinst/arch/evbarm/md.c: revision 1.21 For FS_MSDOS report the MBR type as fs_sub_type. Keep MSDOS partition size and subtype consistent - some u-boot are picky. Do not allow editing of start/size/fs-type for partitions that are already carved in stone (e.g. defined in an outer MBR while we are editing the inner disklabel). To generate a diff of this commit: cvs rdiff -u -r1.10.2.6 -r1.10.2.7 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.19.2.8 -r1.19.2.9 src/usr.sbin/sysinst/mbr.c cvs rdiff -u -r1.8.2.6 -r1.8.2.7 src/usr.sbin/sysinst/arch/evbarm/md.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/usr.sbin/sysinst
Module Name:src Committed By: msaitoh Date: Wed May 12 06:53:56 UTC 2021 Modified Files: src/usr.sbin/sysinst [netbsd-9]: label.c mbr.c src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c Log Message: Pull up following revision(s) (requested by martin in ticket #1271): usr.sbin/sysinst/mbr.c: revision 1.39 usr.sbin/sysinst/label.c: revision 1.33 usr.sbin/sysinst/arch/evbarm/md.c: revision 1.21 For FS_MSDOS report the MBR type as fs_sub_type. Keep MSDOS partition size and subtype consistent - some u-boot are picky. Do not allow editing of start/size/fs-type for partitions that are already carved in stone (e.g. defined in an outer MBR while we are editing the inner disklabel). To generate a diff of this commit: cvs rdiff -u -r1.10.2.6 -r1.10.2.7 src/usr.sbin/sysinst/label.c cvs rdiff -u -r1.19.2.8 -r1.19.2.9 src/usr.sbin/sysinst/mbr.c cvs rdiff -u -r1.8.2.6 -r1.8.2.7 src/usr.sbin/sysinst/arch/evbarm/md.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.sbin/sysinst/label.c diff -u src/usr.sbin/sysinst/label.c:1.10.2.6 src/usr.sbin/sysinst/label.c:1.10.2.7 --- src/usr.sbin/sysinst/label.c:1.10.2.6 Thu Oct 15 19:36:51 2020 +++ src/usr.sbin/sysinst/label.c Wed May 12 06:53:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.10.2.6 2020/10/15 19:36:51 bouyer Exp $ */ +/* $NetBSD: label.c,v 1.10.2.7 2021/05/12 06:53:55 msaitoh Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.10.2.6 2020/10/15 19:36:51 bouyer Exp $"); +__RCSID("$NetBSD: label.c,v 1.10.2.7 2021/05/12 06:53:55 msaitoh Exp $"); #endif #include @@ -1070,9 +1070,23 @@ update_edit_ptn_menu(menudesc *m, void * edit->pset->parts, edit->id, attr_no)) continue; } + /* + * Do not allow editing of size/start/type when partition + * is defined in some outer partition table already + */ + if ((edit->pset->infos[edit->index].flags & PUIFLG_IS_OUTER) + && (m->opts[i].opt_action == edit_fs_type + || m->opts[i].opt_action == edit_fs_start + || m->opts[i].opt_action == edit_fs_size)) +continue; /* Ok: we want this one */ m->opts[i].opt_flags &= ~OPT_IGNORE; } + + /* Avoid starting at a (now) disabled menu item */ + while (m->cursel >= 0 && m->cursel < m->numopts + && (m->opts[m->cursel].opt_flags & OPT_IGNORE)) + m->cursel++; } static void @@ -1123,7 +1137,10 @@ draw_edit_ptn_line(menudesc *m, int opt, if (m->opts[opt].opt_flags & OPT_IGNORE && (opt != 3 || edit->info.fs_type == FS_UNUSED) - && m->opts[opt].opt_action != edit_ptn_custom_type) { + && m->opts[opt].opt_action != edit_ptn_custom_type + && m->opts[opt].opt_action != edit_fs_type + && m->opts[opt].opt_action != edit_fs_start + && m->opts[opt].opt_action != edit_fs_size) { wprintw(m->mw, "%*s -", col_width, ""); return; } Index: src/usr.sbin/sysinst/mbr.c diff -u src/usr.sbin/sysinst/mbr.c:1.19.2.8 src/usr.sbin/sysinst/mbr.c:1.19.2.9 --- src/usr.sbin/sysinst/mbr.c:1.19.2.8 Wed Nov 4 13:27:08 2020 +++ src/usr.sbin/sysinst/mbr.c Wed May 12 06:53:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mbr.c,v 1.19.2.8 2020/11/04 13:27:08 sborrill Exp $ */ +/* $NetBSD: mbr.c,v 1.19.2.9 2021/05/12 06:53:55 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -1401,6 +1401,7 @@ mbr_do_get_part_info(const struct disk_p case MBR_PTYPE_SPEEDSTOR_16S: case MBR_PTYPE_EFI: info->fs_type = FS_MSDOS; + info->fs_sub_type = mp->mbrp_type; break; case MBR_PTYPE_LNXEXT2: info->fs_type = FS_EX2FS; Index: src/usr.sbin/sysinst/arch/evbarm/md.c diff -u src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.6 src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.7 --- src/usr.sbin/sysinst/arch/evbarm/md.c:1.8.2.6 Sun Nov 29 11:36:46 2020 +++ src/usr.sbin/sysinst/arch/evbarm/md.c Wed May 12 06:53:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.8.2.6 2020/11/29 11:36:46 martin Exp $ */ +/* $NetBSD: md.c,v 1.8.2.7 2021/05/12 06:53:55 msaitoh Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -337,10 +337,12 @@ bool md_parts_use_wholedisk(struct disk_partitions *parts) { struct disk_part_info boot_part = { - .size = boardtype == BOARD_TYPE_NORMAL ? + .size = boardtype == BOARD_TYPE_NORMAL ? PART_BOOT_LARGE/parts->bytes_per_sector : PART_BOOT/parts->bytes_per_sector, - .fs_type = PART_BOOT_TYPE, .fs_sub_type = MBR_PTYPE_FAT16L, + .fs_type = PART_BOOT_TYPE, + .fs_sub_type = boardtype == BOARD_TYPE_NORMAL ? + MBR_PTYPE_FAT32L : MBR_PTYPE_FAT16L, }; return parts_use_wholedisk(parts, 1, _part); @@ -372,15 +374,15 @@ evbarm_part_defaults(struct pm_devs *my_ { size_t i; - if (boardtype != BOARD_TYPE_NORMAL) - return; - for (i = 0; i < num_usage_infos; i++) { if (infos[i].fs_type == PART_BOOT_TYPE &&
CVS commit: src/tools/compat
Module Name:src Committed By: cjep Date: Wed May 12 06:39:28 UTC 2021 Modified Files: src/tools/compat: README Log Message: Add macOS High Sierra to the list of verified build platforms To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tools/compat/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools/compat
Module Name:src Committed By: cjep Date: Wed May 12 06:39:28 UTC 2021 Modified Files: src/tools/compat: README Log Message: Add macOS High Sierra to the list of verified build platforms To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tools/compat/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/compat/README diff -u src/tools/compat/README:1.15 src/tools/compat/README:1.16 --- src/tools/compat/README:1.15 Fri May 7 14:52:59 2021 +++ src/tools/compat/README Wed May 12 06:39:28 2021 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.15 2021/05/07 14:52:59 cjep Exp $ +$NetBSD: README,v 1.16 2021/05/12 06:39:28 cjep Exp $ Special notes for cross-hosting a NetBSD build on certain platforms. Only those platforms which have been tested to complete a "build.sh" run @@ -50,6 +50,7 @@ macOS/Darwin build.sh was recently tested on: * macOS Big Sur * macOS Catalina +* macOS High Sierra with up to date Xcode command line tools and APFS filesystems. (Previously, there have been issues building on case-insensitive