CVS commit: src/sys/dev/pci
Module Name:src Committed By: yamaguchi Date: Fri Mar 13 05:49:52 UTC 2020 Modified Files: src/sys/dev/pci: if_ixl.c Log Message: Use I40E_PFINT_ITRN registers to enable ITR for MSI-X interrupts To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/if_ixl.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_ixl.c diff -u src/sys/dev/pci/if_ixl.c:1.63 src/sys/dev/pci/if_ixl.c:1.64 --- src/sys/dev/pci/if_ixl.c:1.63 Fri Mar 13 05:40:20 2020 +++ src/sys/dev/pci/if_ixl.c Fri Mar 13 05:49:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ixl.c,v 1.63 2020/03/13 05:40:20 yamaguchi Exp $ */ +/* $NetBSD: if_ixl.c,v 1.64 2020/03/13 05:49:52 yamaguchi Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.63 2020/03/13 05:40:20 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.64 2020/03/13 05:49:52 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -137,6 +137,8 @@ struct ixl_softc; /* defined */ #define I40E_ITR_INDEX_TX 0x1 #define I40E_ITR_INDEX_OTHER 0x2 #define I40E_ITR_INDEX_NONE 0x3 +#define IXL_ITR_RX 0x7a /* 4K intrs/sec */ +#define IXL_ITR_TX 0x7a /* 4K intrs/sec */ #define I40E_INTR_NOTX_QUEUE 0 #define I40E_INTR_NOTX_INTR 0 @@ -704,6 +706,8 @@ struct ixl_softc { unsigned int sc_nqueue_pairs_max; unsigned int sc_nqueue_pairs_device; struct ixl_queue_pair *sc_qps; + uint32_t sc_itr_rx; + uint32_t sc_itr_tx; struct evcnt sc_event_atq; struct evcnt sc_event_link; @@ -1453,6 +1457,8 @@ ixl_attach(device_t parent, device_t sel if (pmf_device_register(self, NULL, NULL) != true) aprint_debug_dev(self, "couldn't establish power handler\n"); + sc->sc_itr_rx = IXL_ITR_RX; + sc->sc_itr_tx = IXL_ITR_TX; sc->sc_attached = true; return; @@ -5914,13 +5920,18 @@ ixl_config_queue_intr(struct ixl_softc * I40E_QINT_TQCTL_NEXTQ_TYPE_SHIFT) | I40E_QINT_TQCTL_CAUSE_ENA_MASK); - if (sc->sc_intrtype == PCI_INTR_TYPE_MSIX) + if (sc->sc_intrtype == PCI_INTR_TYPE_MSIX) { + ixl_wr(sc, I40E_PFINT_ITRN(I40E_ITR_INDEX_RX, i), + sc->sc_itr_rx); + ixl_wr(sc, I40E_PFINT_ITRN(I40E_ITR_INDEX_TX, i), + sc->sc_itr_tx); vector++; + } } ixl_flush(sc); - ixl_wr(sc, I40E_PFINT_ITR0(I40E_ITR_INDEX_RX), 0x7a); - ixl_wr(sc, I40E_PFINT_ITR0(I40E_ITR_INDEX_TX), 0x7a); + ixl_wr(sc, I40E_PFINT_ITR0(I40E_ITR_INDEX_RX), sc->sc_itr_rx); + ixl_wr(sc, I40E_PFINT_ITR0(I40E_ITR_INDEX_TX), sc->sc_itr_tx); ixl_flush(sc); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: yamaguchi Date: Fri Mar 13 05:40:20 UTC 2020 Modified Files: src/sys/dev/pci: if_ixl.c Log Message: Fix locking against myself at ixl_link_state_update() called by ixl_get_link_status() Though the timing to call the function is change, there is no order to get link status at initialization. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/if_ixl.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_ixl.c diff -u src/sys/dev/pci/if_ixl.c:1.62 src/sys/dev/pci/if_ixl.c:1.63 --- src/sys/dev/pci/if_ixl.c:1.62 Thu Mar 12 09:38:10 2020 +++ src/sys/dev/pci/if_ixl.c Fri Mar 13 05:40:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ixl.c,v 1.62 2020/03/12 09:38:10 yamaguchi Exp $ */ +/* $NetBSD: if_ixl.c,v 1.63 2020/03/13 05:40:20 yamaguchi Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.62 2020/03/12 09:38:10 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.63 2020/03/13 05:40:20 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -2116,8 +2116,6 @@ ixl_init_locked(struct ixl_softc *sc) SET(ifp->if_flags, IFF_RUNNING); CLR(ifp->if_flags, IFF_OACTIVE); - (void)ixl_get_link_status(sc); - ixl_config_rss(sc); ixl_config_queue_intr(sc); @@ -2146,6 +2144,9 @@ ixl_init(struct ifnet *ifp) error = ixl_init_locked(sc); mutex_exit(>sc_cfg_lock); + if (error == 0) + (void)ixl_get_link_status(sc); + return error; } @@ -3683,7 +3684,6 @@ ixl_get_link_status(void *xsc) ixl_get_link_status_done(sc, iaq); } - mutex_exit(>sc_atq_lock); }
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Fri Mar 13 05:36:47 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Ticket #779 To generate a diff of this commit: cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-9.1 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.1 diff -u src/doc/CHANGES-9.1:1.1.2.16 src/doc/CHANGES-9.1:1.1.2.17 --- src/doc/CHANGES-9.1:1.1.2.16 Tue Mar 10 06:49:58 2020 +++ src/doc/CHANGES-9.1 Fri Mar 13 05:36:47 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.16 2020/03/10 06:49:58 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.17 2020/03/13 05:36:47 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -513,3 +513,9 @@ sys/compat/netbsd32/netbsd32_mod.c 1.20 Fix unloading of compat modules (fallout from ticket #762). [pgoyette, ticket #778] +sys/arch/mips/mips/bus_dma.c 1.39 + + Allow len == 0 in bus_dmamap_sync(). + [thorpej, ticket #779] + +
CVS commit: [netbsd-9] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Fri Mar 13 05:35:43 UTC 2020 Modified Files: src/sys/arch/mips/mips [netbsd-9]: bus_dma.c Log Message: Pull up following revision(s) (requested by thorpej in ticket #779): sys/arch/mips/mips/bus_dma.c: revision 1.39 Allow len == 0 in bus_dmamap_sync(). XXX pullup-9 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.20.1 src/sys/arch/mips/mips/bus_dma.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/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.38 src/sys/arch/mips/mips/bus_dma.c:1.38.20.1 --- src/sys/arch/mips/mips/bus_dma.c:1.38 Wed Aug 17 22:02:19 2016 +++ src/sys/arch/mips/mips/bus_dma.c Fri Mar 13 05:35:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.38 2016/08/17 22:02:19 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.38.20.1 2020/03/13 05:35:42 martin Exp $ */ /*- * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.38 2016/08/17 22:02:19 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.38.20.1 2020/03/13 05:35:42 martin Exp $"); #define _MIPS_BUS_DMA_PRIVATE @@ -750,11 +750,12 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm panic("_bus_dmamap_sync: mix PRE and POST"); if (offset >= map->dm_mapsize) - panic("_bus_dmamap_sync: bad offset %"PRIxPADDR - " (map size is %"PRIxPSIZE")", -offset, map->dm_mapsize); - if (len == 0 || (offset + len) > map->dm_mapsize) - panic("_bus_dmamap_sync: bad length"); + panic("%s: bad offset 0x%jx >= 0x%jx", __func__, + (intmax_t)offset, (intmax_t)map->dm_mapsize); + if ((offset + len) > map->dm_mapsize) + panic("%s: bad length 0x%jx + 0x%jx > 0x%jx", __func__, + (intmax_t)offset, (intmax_t)len, + (intmax_t)map->dm_mapsize); #endif /* @@ -777,7 +778,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm #ifdef _MIPS_NEED_BUS_DMA_BOUNCE struct mips_bus_dma_cookie * const cookie = map->_dm_cookie; if (cookie != NULL && (cookie->id_flags & _BUS_DMA_IS_BOUNCING) - && (ops & BUS_DMASYNC_PREWRITE)) { + && (ops & BUS_DMASYNC_PREWRITE) && len != 0) { STAT_INCR(write_bounces); /* * Copy the caller's buffer to the bounce buffer. @@ -920,7 +921,8 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm #ifdef _MIPS_NEED_BUS_DMA_BOUNCE if ((ops & BUS_DMASYNC_POSTREAD) == 0 || cookie == NULL - || (cookie->id_flags & _BUS_DMA_IS_BOUNCING) == 0) + || (cookie->id_flags & _BUS_DMA_IS_BOUNCING) == 0 + || len == 0) return; STAT_INCR(read_bounces);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Fri Mar 13 05:10:39 UTC 2020 Modified Files: src/sys/dev/pci: if_nfe.c Log Message: Improve error check: - We check PHY register read error correctly (timeout and NFE_PHY_ERROR), so don't check NFE_PHY_DATA register's value with 0x or 0. At least, some registers may have 0. - Check NFE_PHY_ERROR bit in nfe_miibus_writereg(). - Improve debug printf To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/if_nfe.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_nfe.c diff -u src/sys/dev/pci/if_nfe.c:1.77 src/sys/dev/pci/if_nfe.c:1.78 --- src/sys/dev/pci/if_nfe.c:1.77 Sun Mar 8 14:10:24 2020 +++ src/sys/dev/pci/if_nfe.c Fri Mar 13 05:10:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_nfe.c,v 1.77 2020/03/08 14:10:24 msaitoh Exp $ */ +/* $NetBSD: if_nfe.c,v 1.78 2020/03/13 05:10:39 msaitoh Exp $ */ /* $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $ */ /*- @@ -21,7 +21,7 @@ /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */ #include -__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.77 2020/03/08 14:10:24 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.78 2020/03/13 05:10:39 msaitoh Exp $"); #include "opt_inet.h" #include "vlan.h" @@ -555,20 +555,19 @@ nfe_miibus_readreg(device_t dev, int phy break; } if (ntries == 1000) { - DPRINTFN(2, ("%s: timeout waiting for PHY\n", - device_xname(sc->sc_dev))); + DPRINTFN(2, ("%s: timeout waiting for PHY read (%d, %d)\n", + device_xname(sc->sc_dev), phy, reg)); return ETIMEDOUT; } if (NFE_READ(sc, NFE_PHY_STATUS) & NFE_PHY_ERROR) { - DPRINTFN(2, ("%s: could not read PHY\n", - device_xname(sc->sc_dev))); + DPRINTFN(2, ("%s: could not read PHY (%d, %d)\n", + device_xname(sc->sc_dev), phy, reg)); return -1; } data = NFE_READ(sc, NFE_PHY_DATA); - if (data != 0x && data != 0) - sc->mii_phyaddr = phy; + sc->mii_phyaddr = phy; DPRINTFN(2, ("%s: mii read phy %d reg 0x%x data 0x%x\n", device_xname(sc->sc_dev), phy, reg, data)); @@ -603,10 +602,16 @@ nfe_miibus_writereg(device_t dev, int ph if (ntries == 1000) { #ifdef NFE_DEBUG if (nfedebug >= 2) - printf("could not write to PHY\n"); + printf("timeout waiting for PHY write (%d, %d)\n", + phy, reg); #endif return ETIMEDOUT; } + if (NFE_READ(sc, NFE_PHY_STATUS) & NFE_PHY_ERROR) { + DPRINTFN(2, ("%s: could not write PHY (%d, %d)\n", + device_xname(sc->sc_dev), phy, reg)); + return -1; + } return 0; }
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Fri Mar 13 04:44:58 UTC 2020 Modified Files: src/sys/dev/mii: miidevs.h miidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.150 -r1.151 src/sys/dev/mii/miidevs_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/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.162 src/sys/dev/mii/miidevs.h:1.163 --- src/sys/dev/mii/miidevs.h:1.162 Thu Feb 27 06:17:50 2020 +++ src/sys/dev/mii/miidevs.h Fri Mar 13 04:44:58 2020 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs.h,v 1.162 2020/02/27 06:17:50 msaitoh Exp $ */ +/* $NetBSD: miidevs.h,v 1.163 2020/03/13 04:44:58 msaitoh Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.164 2020/02/27 06:17:28 msaitoh Exp + * NetBSD: miidevs,v 1.166 2020/03/13 04:44:34 msaitoh Exp */ /*- @@ -60,10 +60,12 @@ #define MII_OUI_TRIDIUM 0x0001f0 /* Tridium */ #define MII_OUI_DATATRACK 0x0002c6 /* Data Track Technology */ #define MII_OUI_AGERE 0x00053d /* Agere */ +#define MII_OUI_QUAKE 0x000897 /* Quake Technologies */ #define MII_OUI_BANKSPEED 0x0006b8 /* Bankspeed Pty */ #define MII_OUI_NETEXCELL 0x0008bb /* NetExcell */ #define MII_OUI_NETAS 0x0009c3 /* Netas */ #define MII_OUI_BROADCOM2 0x000af7 /* Broadcom Corporation */ +#define MII_OUI_AELUROS 0x000b25 /* Aeluros */ #define MII_OUI_RALINK 0x000c43 /* Ralink Technology */ #define MII_OUI_ASIX 0x000ec6 /* ASIX */ #define MII_OUI_BROADCOM 0x001018 /* Broadcom Corporation */ @@ -71,7 +73,6 @@ #define MII_OUI_ALTIMA 0x0010a9 /* Altima Communications */ #define MII_OUI_ENABLESEMI 0x0010dd /* Enable Semiconductor */ #define MII_OUI_SUNPLUS 0x001105 /* Sunplus Technology */ -#define MII_OUI_ATHEROS 0x001374 /* Atheros */ #define MII_OUI_TERANETICS 0x0014a6 /* Teranetics */ #define MII_OUI_RALINK2 0x0017a5 /* Ralink Technology */ #define MII_OUI_AQUANTIA 0x0017b6 /* Aquantia Corporation */ @@ -168,13 +169,7 @@ #define MII_MODEL_xxAMLOGIC_GXL 0x #define MII_STR_xxAMLOGIC_GXL "Meson GXL internal PHY" -/* Atheros PHYs */ -#define MII_MODEL_ATHEROS_F1 0x0001 -#define MII_STR_ATHEROS_F1 "F1 10/100/1000 PHY" -#define MII_MODEL_ATHEROS_F2 0x0002 -#define MII_STR_ATHEROS_F2 "F2 10/100 PHY" - -/* Attansic PHYs */ +/* Attansic/Atheros PHYs */ #define MII_MODEL_ATTANSIC_L1 0x0001 #define MII_STR_ATTANSIC_L1 "L1 10/100/1000 PHY" #define MII_MODEL_ATTANSIC_L2 0x0002 @@ -602,6 +597,10 @@ #define MII_MODEL_SMSC_LAN8742 0x0013 #define MII_STR_SMSC_LAN8742 "SMSC LAN8742 10/100 media interface" +/* Teranetics PHY */ +#define MII_MODEL_TERANETICS_TN1010 0x0001 +#define MII_STR_TERANETICS_TN1010 "Teranetics TN1010 10GBase-T PHY" + /* Texas Instruments PHYs */ #define MII_MODEL_TI_TLAN10T 0x0001 #define MII_STR_TI_TLAN10T "ThunderLAN 10BASE-T media interface" Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.150 src/sys/dev/mii/miidevs_data.h:1.151 --- src/sys/dev/mii/miidevs_data.h:1.150 Thu Feb 27 06:17:50 2020 +++ src/sys/dev/mii/miidevs_data.h Fri Mar 13 04:44:58 2020 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs_data.h,v 1.150 2020/02/27 06:17:50 msaitoh Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.151 2020/03/13 04:44:58 msaitoh Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.164 2020/02/27 06:17:28 msaitoh Exp + * NetBSD: miidevs,v 1.166 2020/03/13 04:44:34 msaitoh Exp */ /*- @@ -55,8 +55,6 @@ struct mii_knowndev mii_knowndevs[] = { { MII_OUI_ALTIMA, MII_MODEL_ALTIMA_Am79C874, MII_STR_ALTIMA_Am79C874 }, { MII_OUI_AMLOGIC, MII_MODEL_AMLOGIC_GXL, MII_STR_AMLOGIC_GXL }, { MII_OUI_xxAMLOGIC, MII_MODEL_xxAMLOGIC_GXL, MII_STR_xxAMLOGIC_GXL }, - { MII_OUI_ATHEROS, MII_MODEL_ATHEROS_F1, MII_STR_ATHEROS_F1 }, - { MII_OUI_ATHEROS, MII_MODEL_ATHEROS_F2, MII_STR_ATHEROS_F2 }, { MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_L1, MII_STR_ATTANSIC_L1 }, { MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_L2, MII_STR_ATTANSIC_L2 }, { MII_OUI_ATTANSIC, MII_MODEL_ATTANSIC_AR8021, MII_STR_ATTANSIC_AR8021 }, @@ -248,6 +246,7 @@ struct mii_knowndev mii_knowndevs[] = { { MII_OUI_SMSC, MII_MODEL_SMSC_LAN8740, MII_STR_SMSC_LAN8740 }, { MII_OUI_SMSC, MII_MODEL_SMSC_LAN8741A, MII_STR_SMSC_LAN8741A }, { MII_OUI_SMSC, MII_MODEL_SMSC_LAN8742, MII_STR_SMSC_LAN8742 }, + { MII_OUI_TERANETICS, MII_MODEL_TERANETICS_TN1010, MII_STR_TERANETICS_TN1010 }, { MII_OUI_TI, MII_MODEL_TI_TLAN10T, MII_STR_TI_TLAN10T }, { MII_OUI_TI, MII_MODEL_TI_100VGPMI, MII_STR_TI_100VGPMI }, { MII_OUI_TI, MII_MODEL_TI_TNETE2101, MII_STR_TI_TNETE2101 },
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Fri Mar 13 04:44:34 UTC 2020 Modified Files: src/sys/dev/mii: atphy.c miidevs Log Message: 0x001374 is non-bitreversed value of Attansic OUI(0x00c82e). Attansic/Atheros correctly uses ID1 and ID2 register, so delete all 0x001374 related entries. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/mii/atphy.c cvs rdiff -u -r1.165 -r1.166 src/sys/dev/mii/miidevs 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/mii/atphy.c diff -u src/sys/dev/mii/atphy.c:1.27 src/sys/dev/mii/atphy.c:1.28 --- src/sys/dev/mii/atphy.c:1.27 Fri Dec 13 08:30:26 2019 +++ src/sys/dev/mii/atphy.c Fri Mar 13 04:44:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: atphy.c,v 1.27 2019/12/13 08:30:26 msaitoh Exp $ */ +/* $NetBSD: atphy.c,v 1.28 2020/03/13 04:44:34 msaitoh Exp $ */ /* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */ /*- @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.27 2019/12/13 08:30:26 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.28 2020/03/13 04:44:34 msaitoh Exp $"); #include #include @@ -103,7 +103,6 @@ const struct mii_phy_funcs atphy_funcs = }; static const struct mii_phydesc atphys[] = { - MII_PHY_DESC(ATHEROS, F1), MII_PHY_DESC(ATTANSIC, L1), MII_PHY_DESC(ATTANSIC, L2), MII_PHY_DESC(ATTANSIC, AR8021), Index: src/sys/dev/mii/miidevs diff -u src/sys/dev/mii/miidevs:1.165 src/sys/dev/mii/miidevs:1.166 --- src/sys/dev/mii/miidevs:1.165 Fri Mar 13 04:43:03 2020 +++ src/sys/dev/mii/miidevs Fri Mar 13 04:44:34 2020 @@ -1,4 +1,4 @@ -$NetBSD: miidevs,v 1.165 2020/03/13 04:43:03 msaitoh Exp $ +$NetBSD: miidevs,v 1.166 2020/03/13 04:44:34 msaitoh Exp $ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -66,7 +66,6 @@ oui MICREL 0x0010a1 Micrel oui ALTIMA 0x0010a9 Altima Communications oui ENABLESEMI 0x0010dd Enable Semiconductor oui SUNPLUS 0x001105 Sunplus Technology -oui ATHEROS 0x001374 Atheros oui TERANETICS 0x0014a6 Teranetics oui RALINK2 0x0017a5 Ralink Technology oui AQUANTIA 0x0017b6 Aquantia Corporation @@ -150,11 +149,7 @@ model ALTIMA Am79C874 0x0021 Am79C874 1 model AMLOGIC GXL 0x Meson GXL internal PHY model xxAMLOGIC GXL 0x Meson GXL internal PHY -/* Atheros PHYs */ -model ATHEROS F1 0x0001 F1 10/100/1000 PHY -model ATHEROS F2 0x0002 F2 10/100 PHY - -/* Attansic PHYs */ +/* Attansic/Atheros PHYs */ model ATTANSIC L1 0x0001 L1 10/100/1000 PHY model ATTANSIC L2 0x0002 L2 10/100 PHY model ATTANSIC AR8021 0x0004 Atheros AR8021 10/100/1000 PHY
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Fri Mar 13 04:43:04 UTC 2020 Modified Files: src/sys/dev/mii: miidevs Log Message: - Add Quake Technologies and Aeluros' OUI - Add Teranetics TN1010 10GBase-T PHY To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/dev/mii/miidevs 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/mii/miidevs diff -u src/sys/dev/mii/miidevs:1.164 src/sys/dev/mii/miidevs:1.165 --- src/sys/dev/mii/miidevs:1.164 Thu Feb 27 06:17:28 2020 +++ src/sys/dev/mii/miidevs Fri Mar 13 04:43:03 2020 @@ -1,4 +1,4 @@ -$NetBSD: miidevs,v 1.164 2020/02/27 06:17:28 msaitoh Exp $ +$NetBSD: miidevs,v 1.165 2020/03/13 04:43:03 msaitoh Exp $ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -53,10 +53,12 @@ oui AMD0x1a Advanced Micro Devic oui TRIDIUM 0x0001f0 Tridium oui DATATRACK 0x0002c6 Data Track Technology oui AGERE 0x00053d Agere +oui QUAKE 0x000897 Quake Technologies oui BANKSPEED 0x0006b8 Bankspeed Pty oui NETEXCELL 0x0008bb NetExcell oui NETAS 0x0009c3 Netas oui BROADCOM2 0x000af7 Broadcom Corporation +oui AELUROS 0x000b25 Aeluros oui RALINK 0x000c43 Ralink Technology oui ASIX 0x000ec6 ASIX oui BROADCOM 0x001018 Broadcom Corporation @@ -389,6 +391,9 @@ model SMSC LAN8740 0x0011 SMSC LAN8740 model SMSC LAN8741A 0x0012 SMSC LAN8741A 10/100 media interface model SMSC LAN8742 0x0013 SMSC LAN8742 10/100 media interface +/* Teranetics PHY */ +model TERANETICS TN1010 0x0001 Teranetics TN1010 10GBase-T PHY + /* Texas Instruments PHYs */ model TI TLAN10T 0x0001 ThunderLAN 10BASE-T media interface model TI 100VGPMI 0x0002 ThunderLAN 100VG-AnyLan media interface
CVS commit: src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Fri Mar 13 04:08:07 UTC 2020 Modified Files: src/sys/dev/ic: rtl8169.c rtl81x9reg.h Log Message: Use BUS_ADDR_{LO,HI}32(). To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/dev/ic/rtl8169.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/ic/rtl81x9reg.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/ic/rtl8169.c diff -u src/sys/dev/ic/rtl8169.c:1.165 src/sys/dev/ic/rtl8169.c:1.166 --- src/sys/dev/ic/rtl8169.c:1.165 Thu Mar 12 03:01:46 2020 +++ src/sys/dev/ic/rtl8169.c Fri Mar 13 04:08:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.165 2020/03/12 03:01:46 thorpej Exp $ */ +/* $NetBSD: rtl8169.c,v 1.166 2020/03/13 04:08:07 thorpej Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.165 2020/03/12 03:01:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.166 2020/03/13 04:08:07 thorpej Exp $"); /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */ /* @@ -176,11 +176,8 @@ static inline void re_set_bufaddr(struct re_desc *d, bus_addr_t addr) { - d->re_bufaddr_lo = htole32((uint32_t)addr); - if (sizeof(bus_addr_t) == sizeof(uint64_t)) - d->re_bufaddr_hi = htole32((uint64_t)addr >> 32); - else - d->re_bufaddr_hi = 0; + d->re_bufaddr_lo = htole32(RE_ADDR_LO(addr)); + d->re_bufaddr_hi = htole32(RE_ADDR_HI(addr)); } static int Index: src/sys/dev/ic/rtl81x9reg.h diff -u src/sys/dev/ic/rtl81x9reg.h:1.52 src/sys/dev/ic/rtl81x9reg.h:1.53 --- src/sys/dev/ic/rtl81x9reg.h:1.52 Tue Dec 17 10:42:06 2019 +++ src/sys/dev/ic/rtl81x9reg.h Fri Mar 13 04:08:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9reg.h,v 1.52 2019/12/17 10:42:06 msaitoh Exp $ */ +/* $NetBSD: rtl81x9reg.h,v 1.53 2020/03/13 04:08:07 thorpej Exp $ */ /* * Copyright (c) 1997, 1998 @@ -588,8 +588,8 @@ struct re_desc { #define RE_UDPPKT(x) (((x) & RE_RDESC_STAT_PROTOID) == \ RE_PROTOID_UDPIP) -#define RE_ADDR_LO(y) ((uint64_t)(y) & 0x) -#define RE_ADDR_HI(y) ((uint64_t)(y) >> 32) +#define RE_ADDR_LO(y) BUS_ADDR_LO32(y) +#define RE_ADDR_HI(y) BUS_ADDR_HI32(y) /* * Statistics counter structure (8139C+ and 8169 only)
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: thorpej Date: Fri Mar 13 03:49:39 UTC 2020 Modified Files: src/sys/arch/mips/mips: bus_dma.c Log Message: Allow len == 0 in bus_dmamap_sync(). XXX pullup-9 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mips/mips/bus_dma.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/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.38 src/sys/arch/mips/mips/bus_dma.c:1.39 --- src/sys/arch/mips/mips/bus_dma.c:1.38 Wed Aug 17 22:02:19 2016 +++ src/sys/arch/mips/mips/bus_dma.c Fri Mar 13 03:49:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.38 2016/08/17 22:02:19 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.39 2020/03/13 03:49:39 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.38 2016/08/17 22:02:19 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.39 2020/03/13 03:49:39 thorpej Exp $"); #define _MIPS_BUS_DMA_PRIVATE @@ -750,11 +750,12 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm panic("_bus_dmamap_sync: mix PRE and POST"); if (offset >= map->dm_mapsize) - panic("_bus_dmamap_sync: bad offset %"PRIxPADDR - " (map size is %"PRIxPSIZE")", -offset, map->dm_mapsize); - if (len == 0 || (offset + len) > map->dm_mapsize) - panic("_bus_dmamap_sync: bad length"); + panic("%s: bad offset 0x%jx >= 0x%jx", __func__, + (intmax_t)offset, (intmax_t)map->dm_mapsize); + if ((offset + len) > map->dm_mapsize) + panic("%s: bad length 0x%jx + 0x%jx > 0x%jx", __func__, + (intmax_t)offset, (intmax_t)len, + (intmax_t)map->dm_mapsize); #endif /* @@ -777,7 +778,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm #ifdef _MIPS_NEED_BUS_DMA_BOUNCE struct mips_bus_dma_cookie * const cookie = map->_dm_cookie; if (cookie != NULL && (cookie->id_flags & _BUS_DMA_IS_BOUNCING) - && (ops & BUS_DMASYNC_PREWRITE)) { + && (ops & BUS_DMASYNC_PREWRITE) && len != 0) { STAT_INCR(write_bounces); /* * Copy the caller's buffer to the bounce buffer. @@ -920,7 +921,8 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm #ifdef _MIPS_NEED_BUS_DMA_BOUNCE if ((ops & BUS_DMASYNC_POSTREAD) == 0 || cookie == NULL - || (cookie->id_flags & _BUS_DMA_IS_BOUNCING) == 0) + || (cookie->id_flags & _BUS_DMA_IS_BOUNCING) == 0 + || len == 0) return; STAT_INCR(read_bounces);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Fri Mar 13 03:45:58 UTC 2020 Modified Files: src/sys/dev/pci: if_stge.c Log Message: Support MBUFTRACE. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pci/if_stge.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_stge.c diff -u src/sys/dev/pci/if_stge.c:1.84 src/sys/dev/pci/if_stge.c:1.85 --- src/sys/dev/pci/if_stge.c:1.84 Sat Mar 7 07:33:39 2020 +++ src/sys/dev/pci/if_stge.c Fri Mar 13 03:45:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_stge.c,v 1.84 2020/03/07 07:33:39 thorpej Exp $ */ +/* $NetBSD: if_stge.c,v 1.85 2020/03/13 03:45:58 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.84 2020/03/07 07:33:39 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.85 2020/03/13 03:45:58 thorpej Exp $"); #include @@ -1354,6 +1354,7 @@ stge_rxintr(struct stge_softc *sc) m_freem(m); continue; } + MCLAIM(m, >sc_ethercom.ec_rx_mowner); nm->m_data += 2; nm->m_pkthdr.len = nm->m_len = len; m_copydata(m, 0, len, mtod(nm, void *)); @@ -1853,6 +1854,7 @@ stge_add_rxbuf(struct stge_softc *sc, in if (m == NULL) return (ENOBUFS); + MCLAIM(m, >sc_ethercom.ec_rx_mowner); MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { m_freem(m);
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Fri Mar 13 02:57:26 UTC 2020 Modified Files: src/lib/libcurses: clrtobot.c clrtoeol.c curses.h curses_private.h erase.c Log Message: curses: wrap the erase logic in a macro Easier to use, it's in one place and now hopefully everyone is happy. X To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/clrtobot.c cvs rdiff -u -r1.29 -r1.30 src/lib/libcurses/clrtoeol.c cvs rdiff -u -r1.127 -r1.128 src/lib/libcurses/curses.h cvs rdiff -u -r1.71 -r1.72 src/lib/libcurses/curses_private.h cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/erase.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/clrtobot.c diff -u src/lib/libcurses/clrtobot.c:1.25 src/lib/libcurses/clrtobot.c:1.26 --- src/lib/libcurses/clrtobot.c:1.25 Thu Mar 12 12:17:15 2020 +++ src/lib/libcurses/clrtobot.c Fri Mar 13 02:57:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: clrtobot.c,v 1.25 2020/03/12 12:17:15 roy Exp $ */ +/* $NetBSD: clrtobot.c,v 1.26 2020/03/13 02:57:26 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)clrtobot.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: clrtobot.c,v 1.25 2020/03/12 12:17:15 roy Exp $"); +__RCSID("$NetBSD: clrtobot.c,v 1.26 2020/03/13 02:57:26 roy Exp $"); #endif #endif/* not lint */ @@ -87,15 +87,12 @@ wclrtobot(WINDOW *win) attr = win->battr & __ATTRIBUTES; else attr = 0; + for (y = starty; y < win->maxy; y++) { minx = -1; end = >alines[y]->line[win->maxx]; for (sp = >alines[y]->line[startx]; sp < end; sp++) { - if (sp->ch == bch && -#ifdef HAVE_WCHAR - sp->nsp == NULL && WCOL(*sp) >= 0 && -#endif - (sp->attr & WA_ATTRIBUTES) == attr) + if (!(__NEED_ERASE(sp, bch, attr))) continue; maxx = sp; @@ -115,6 +112,7 @@ wclrtobot(WINDOW *win) (int)(maxx - win->alines[y]->line)); startx = 0; } + __sync(win); return OK; } Index: src/lib/libcurses/clrtoeol.c diff -u src/lib/libcurses/clrtoeol.c:1.29 src/lib/libcurses/clrtoeol.c:1.30 --- src/lib/libcurses/clrtoeol.c:1.29 Thu Mar 12 12:17:15 2020 +++ src/lib/libcurses/clrtoeol.c Fri Mar 13 02:57:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: clrtoeol.c,v 1.29 2020/03/12 12:17:15 roy Exp $ */ +/* $NetBSD: clrtoeol.c,v 1.30 2020/03/13 02:57:26 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: clrtoeol.c,v 1.29 2020/03/12 12:17:15 roy Exp $"); +__RCSID("$NetBSD: clrtoeol.c,v 1.30 2020/03/13 02:57:26 roy Exp $"); #endif #endif/* not lint */ @@ -92,14 +92,10 @@ wclrtoeol(WINDOW *win) attr = win->battr & __ATTRIBUTES; else attr = 0; + for (sp = maxx; sp < end; sp++) { - if (sp->ch == bch && -#ifdef HAVE_WCHAR - sp->nsp == NULL && WCOL(*sp) >= 0 && -#endif - (sp->attr & WA_ATTRIBUTES) == attr) + if (!(__NEED_ERASE(sp, bch, attr))) continue; - maxx = sp; if (minx == -1) minx = (int)(sp - win->alines[y]->line); @@ -111,6 +107,7 @@ wclrtoeol(WINDOW *win) SET_WCOL(*sp, 1); #endif } + #ifdef DEBUG __CTRACE(__CTRACE_ERASE, "CLRTOEOL: y = %d, minx = %d, maxx = %d, " "firstch = %d, lastch = %d\n", Index: src/lib/libcurses/curses.h diff -u src/lib/libcurses/curses.h:1.127 src/lib/libcurses/curses.h:1.128 --- src/lib/libcurses/curses.h:1.127 Thu Mar 12 12:17:15 2020 +++ src/lib/libcurses/curses.h Fri Mar 13 02:57:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: curses.h,v 1.127 2020/03/12 12:17:15 roy Exp $ */ +/* $NetBSD: curses.h,v 1.128 2020/03/13 02:57:26 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -275,9 +275,7 @@ typedef struct __screen SCREEN; #define WA_VERTICAL 0x0010 /* Vertical highlight */ #define WA_LEFT 0x0020 /* Left highlight */ #define WA_RIGHT 0x0040 /* Right highlight */ -#else /* HAVE_WCHAR */ -#define WA_ATTRIBUTES 0 /* Just to make our code easier */ -#endif /* !HAVE_WCHAR */ +#endif /* HAVE_WCHAR */ /* * Alternate character set definitions Index: src/lib/libcurses/curses_private.h diff -u src/lib/libcurses/curses_private.h:1.71 src/lib/libcurses/curses_private.h:1.72 --- src/lib/libcurses/curses_private.h:1.71 Sun Jun 9 07:40:14 2019 +++ src/lib/libcurses/curses_private.h Fri Mar 13 02:57:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_private.h,v 1.71 2019/06/09 07:40:14 blymn Exp $ */ +/* $NetBSD: curses_private.h,v 1.72 2020/03/13 02:57:26 roy Exp $ */ /*- * Copyright (c) 1998-2000 Brett Lymn @@ -337,6 +337,18 @@ extern SCREEN *_cursesi_screen; void __CTRACE(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); #endif +/* Common erase logic */ +#ifdef HAVE_WCHAR +#define __NEED_ERASE(sp, bch, attr)\ + ((sp)->ch != (bch) || \ + ((sp)->attr & WA_ATTRIBUTES) != (attr) || \ + (sp)->nsp != NULL ||\
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Mar 13 02:43:31 UTC 2020 Modified Files: src/sys/net: if_ipsec.c Log Message: reduce unnecessary reqid of NAT-T ipsecif(4), suggested by ohishi@IIJ. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/net/if_ipsec.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_ipsec.c diff -u src/sys/net/if_ipsec.c:1.28 src/sys/net/if_ipsec.c:1.29 --- src/sys/net/if_ipsec.c:1.28 Tue Mar 10 10:35:14 2020 +++ src/sys/net/if_ipsec.c Fri Mar 13 02:43:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ipsec.c,v 1.28 2020/03/10 10:35:14 knakahara Exp $ */ +/* $NetBSD: if_ipsec.c,v 1.29 2020/03/13 02:43:31 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.28 2020/03/10 10:35:14 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.29 2020/03/13 02:43:31 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1584,7 +1584,10 @@ if_ipsec_set_sadb_x_policy(struct sadb_x xisr->sadb_x_ipsecrequest_proto = IPPROTO_ESP; xisr->sadb_x_ipsecrequest_mode = IPSEC_MODE_TRANSPORT; xisr->sadb_x_ipsecrequest_level = level; - xisr->sadb_x_ipsecrequest_reqid = key_newreqid(); + if (level == IPSEC_LEVEL_UNIQUE) + xisr->sadb_x_ipsecrequest_reqid = key_newreqid(); + else + xisr->sadb_x_ipsecrequest_reqid = 0; } return size;
CVS commit: src/sys/arch/sun2/dev
Module Name:src Committed By: rin Date: Fri Mar 13 01:48:16 UTC 2020 Modified Files: src/sys/arch/sun2/dev: zsvar.h Log Message: Fix build without kbd at zstty, simplify. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sun2/dev/zsvar.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/sun2/dev/zsvar.h diff -u src/sys/arch/sun2/dev/zsvar.h:1.8 src/sys/arch/sun2/dev/zsvar.h:1.9 --- src/sys/arch/sun2/dev/zsvar.h:1.8 Thu Jul 7 06:55:38 2016 +++ src/sys/arch/sun2/dev/zsvar.h Fri Mar 13 01:48:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: zsvar.h,v 1.8 2016/07/07 06:55:38 msaitoh Exp $ */ +/* $NetBSD: zsvar.h,v 1.9 2020/03/13 01:48:16 rin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -44,15 +44,18 @@ #include #include +#ifdef _KERNEL_OPT +#include "kbd.h" +#endif + +#if NKBD > 0 /* * Need to override cn_console_dev() for zstty and zskbd. */ -#ifdef cn_isconsole -#undef cn_isconsole -#endif extern struct consdev *cn_hw; -extern struct consdev *cn_tab; +#undef cn_isconsole #define cn_isconsole(d) ((d) == cn_tab->cn_dev || (d) == cn_hw->cn_dev) +#endif struct zsc_softc { device_t zsc_dev; /* base device */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Fri Mar 13 00:45:59 UTC 2020 Modified Files: src/sys/dev/pci: if_sip.c Log Message: Adjust the logic for enabling the 64-bit data path when a 64-bit slot is detected: - If DATA64_EN isn't set in CFG after a reset, don't use 64-bit data path at all (it's been disabled by an EEPROM setting). - Provide a hook for force-disabling the 64-bit data path. - Otherwise, perform the "known 64-bit cards" check as done previously (because dodgy-vendor-EEPROM-settings still applies). To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/sys/dev/pci/if_sip.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_sip.c diff -u src/sys/dev/pci/if_sip.c:1.179 src/sys/dev/pci/if_sip.c:1.180 --- src/sys/dev/pci/if_sip.c:1.179 Sun Mar 8 02:44:12 2020 +++ src/sys/dev/pci/if_sip.c Fri Mar 13 00:45:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_sip.c,v 1.179 2020/03/08 02:44:12 thorpej Exp $ */ +/* $NetBSD: if_sip.c,v 1.180 2020/03/13 00:45:59 thorpej Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.179 2020/03/08 02:44:12 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.180 2020/03/13 00:45:59 thorpej Exp $"); #include #include @@ -138,6 +138,12 @@ __KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1 #define MAX_SIP_NRXDESC MAX(GSIP_NRXDESC, SIP_NRXDESC) /* + * Set this to 1 to force-disable using the 64-bit data path + * on DP83820. + */ +static int gsip_disable_data64 = 0; + +/* * Control structures are DMA'd to the SiS900 chip. We allocate them in * a single clump that maps to a single DMA segment to make several things * easier. @@ -860,21 +866,31 @@ sipcom_dp83820_attach(struct sip_softc * reg = bus_space_read_4(sc->sc_st, sc->sc_sh, SIP_CFG); if (reg & CFG_PCI64_DET) { - printf("%s: 64-bit PCI slot detected", device_xname(sc->sc_dev)); - /* - * Check to see if this card is 64-bit. If so, enable 64-bit - * data transfers. - * - * We can't use the DATA64_EN bit in the EEPROM, because - * vendors of 32-bit cards fail to clear that bit in many - * cases (yet the card still detects that it's in a 64-bit - * slot; go figure). - */ - if (sipcom_check_64bit(pa)) { - sc->sc_cfg |= CFG_DATA64_EN; - printf(", using 64-bit data transfers"); + const char *using64 = NULL; + + if (reg & CFG_DATA64_EN) { + /* + * Check to see if this card is 64-bit. If so, + * enable 64-bit data transfers. + * + * We can't trust the DATA64_EN bit in the EEPROM, + * because vendors of 32-bit cards fail to clear + * that bit in many cases (yet the card still detects + * that it's in a 64-bit slot because I guess they + * wired up ACK64# and REQ64#). + */ + if (gsip_disable_data64) +using64 = "force-disabled"; + else if (sipcom_check_64bit(pa)) { +sc->sc_cfg |= CFG_DATA64_EN; +using64 = "enabled"; + } else +using64 = "disabled (32-bit card)"; + } else { + using64 = "disabled in EEPROM"; } - printf("\n"); + printf("%s: 64-bit slot detected, 64-bit tranfers %s\n", + device_xname(sc->sc_dev), using64); } /*
CVS commit: src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Fri Mar 13 00:41:24 UTC 2020 Modified Files: src/sys/dev/pci: if_ste.c Log Message: - Add the D-Link products, identified by subsystem ID. - On some variations, the internal PHY is ghosted at #0 and #1. Work around this by ignoring PHY #0 accesses unless we don't find one, and then look for one there as a fall-back if we don't detect anything else. - Fix access width when setting the TxDMAUrgentThresh register. - Support MBUFTRACE. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/if_ste.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_ste.c diff -u src/sys/dev/pci/if_ste.c:1.60 src/sys/dev/pci/if_ste.c:1.61 --- src/sys/dev/pci/if_ste.c:1.60 Fri Feb 7 00:04:28 2020 +++ src/sys/dev/pci/if_ste.c Fri Mar 13 00:41:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ste.c,v 1.60 2020/02/07 00:04:28 thorpej Exp $ */ +/* $NetBSD: if_ste.c,v 1.61 2020/03/13 00:41:24 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.60 2020/02/07 00:04:28 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.61 2020/03/13 00:41:24 thorpej Exp $"); #include @@ -156,6 +156,8 @@ struct ste_softc { uint16_t sc_IntEnable; /* prototype IntEnable register */ uint16_t sc_MacCtrl0; /* prototype MacCtrl0 register */ uint8_t sc_ReceiveMode; /* prototype ReceiveMode register */ + + bool sc_enable_phy0; /* access to phy #0 allowed */ }; #define STE_CDTXADDR(sc, x) ((sc)->sc_cddma + STE_CDTXOFF((x))) @@ -245,37 +247,83 @@ static const struct mii_bitbang_ops ste_ /* * Devices supported by this driver. */ -static const struct ste_product { +struct ste_product { pci_vendor_id_t ste_vendor; pci_product_id_t ste_product; const char *ste_name; -} ste_products[] = { + const struct ste_product *ste_subs; +}; + +static const struct ste_product ste_dlink_products[] = { + { PCI_VENDOR_DLINK, 0x1002, + "D-Link DFE-550TX 10/100 Ethernet", + NULL }, + + { PCI_VENDOR_DLINK, 0x1003, + "D-Link DFE-550FX Ethernet", + NULL }, + + { PCI_VENDOR_DLINK, 0x1012, + "D-Link DFE-580TX 4-port 10/100 Ethernet", + NULL }, + + { PCI_VENDOR_DLINK, 0x1040, + "D-Link DFE-530TXS 10/100 Ethernet", + NULL }, + + { 0,0, + NULL, + NULL }, +}; + +static const struct ste_product ste_products[] = { { PCI_VENDOR_SUNDANCETI, PCI_PRODUCT_SUNDANCETI_IP100A, - "IC Plus Corp. IP00A 10/100 Fast Ethernet Adapter" }, + "IC Plus Corp. IP00A 10/100 Fast Ethernet Adapter", + NULL }, { PCI_VENDOR_SUNDANCETI, PCI_PRODUCT_SUNDANCETI_ST201, - "Sundance ST-201 10/100 Ethernet" }, + "Sundance ST-201 10/100 Ethernet", + NULL }, { PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DL1002, - "D-Link DL-1002 10/100 Ethernet" }, + "D-Link DL-1002 10/100 Ethernet", + ste_dlink_products }, { 0,0, + NULL, NULL }, }; static const struct ste_product * -ste_lookup(const struct pci_attach_args *pa) +ste_lookup_table(pcireg_t pci_id, const struct ste_product * const products) { const struct ste_product *sp; - for (sp = ste_products; sp->ste_name != NULL; sp++) { - if (PCI_VENDOR(pa->pa_id) == sp->ste_vendor && - PCI_PRODUCT(pa->pa_id) == sp->ste_product) + for (sp = products; sp->ste_name != NULL; sp++) { + if (PCI_VENDOR(pci_id) == sp->ste_vendor && + PCI_PRODUCT(pci_id) == sp->ste_product) return (sp); } return (NULL); } +static const struct ste_product * +ste_lookup(const struct pci_attach_args *pa) +{ + const struct ste_product *sp; + + sp = ste_lookup_table(pa->pa_id, ste_products); + if (sp && sp->ste_subs) { + const pcireg_t subsys = + pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG); + const struct ste_product *ssp = + ste_lookup_table(subsys, sp->ste_subs); + if (ssp) + sp = ssp; + } + return (sp); +} + static int ste_match(device_t parent, cfdata_t cf, void *aux) { @@ -471,6 +519,18 @@ ste_attach(device_t parent, device_t sel mii_attach(sc->sc_dev, mii, 0x, MII_PHY_ANY, MII_OFFSET_ANY, 0); if (LIST_FIRST(>mii_phys) == NULL) { + /* + * It seems that some variants of this chip "ghost" the + * single PHY at #0 and #1. We will try probing the MII + * first while ignoring #0 access. If we find the PHY, + * great! If not, un-ignore #0 and try probing *just* + * #0 to see if we can find it. + */ + sc->sc_enable_phy0 = true; + mii_attach(sc->sc_dev, mii, 0x, 0, + MII_OFFSET_ANY, 0); + } + if (LIST_FIRST(>mii_phys) == NULL) { ifmedia_add(>mii_media, IFM_ETHER | IFM_NONE, 0, NULL); ifmedia_set(>mii_media, IFM_ETHER | IFM_NONE); } else @@ -643,6 +703,7 @@ ste_start(struct ifnet *ifp) device_xname(sc->sc_dev)); break; } + MCLAIM(m, >sc_ethercom.ec_tx_mowner); if (m0->m_pkthdr.len > MHLEN) {
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: jdolecek Date: Fri Mar 13 00:32:05 UTC 2020 Modified Files: src/sys/arch/xen/xen: xbd_xenbus.c Log Message: xbd backend not supporting cache flush is not an autoconfiguration error To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.95 src/sys/arch/xen/xen/xbd_xenbus.c:1.96 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.95 Sun Mar 1 03:21:54 2020 +++ src/sys/arch/xen/xen/xbd_xenbus.c Fri Mar 13 00:32:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.95 2020/03/01 03:21:54 riastradh Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.96 2020/03/13 00:32:05 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.95 2020/03/01 03:21:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.96 2020/03/13 00:32:05 jdolecek Exp $"); #include "opt_xen.h" @@ -859,7 +859,7 @@ xbdioctl(dev_t dev, u_long cmd, void *da case DIOCCACHESYNC: if (sc->sc_cache_flush <= 0) { if (sc->sc_cache_flush == 0) { -aprint_error_dev(sc->sc_dksc.sc_dev, +aprint_verbose_dev(sc->sc_dksc.sc_dev, "WARNING: cache flush not supported " "by backend\n"); sc->sc_cache_flush = -1;
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: thorpej Date: Thu Mar 12 23:10:27 UTC 2020 Modified Files: src/sys/uvm/pmap: pmap.c Log Message: pmap_tlb_miss_lock needs to be globally visible. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/uvm/pmap/pmap.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/uvm/pmap/pmap.c diff -u src/sys/uvm/pmap/pmap.c:1.46 src/sys/uvm/pmap/pmap.c:1.47 --- src/sys/uvm/pmap/pmap.c:1.46 Wed Mar 11 13:30:31 2020 +++ src/sys/uvm/pmap/pmap.c Thu Mar 12 23:10:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.46 2020/03/11 13:30:31 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.47 2020/03/12 23:10:27 thorpej Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.46 2020/03/11 13:30:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.47 2020/03/12 23:10:27 thorpej Exp $"); /* * Manages physical address maps. @@ -277,7 +277,7 @@ struct pool_allocator pmap_pv_page_alloc #define pmap_tlb_miss_lock_enter() pmap_md_tlb_miss_lock_enter() #define pmap_tlb_miss_lock_exit() pmap_md_tlb_miss_lock_exit() #else -static kmutex_t pmap_tlb_miss_lock __cacheline_aligned; +kmutex_t pmap_tlb_miss_lock __cacheline_aligned; static void pmap_tlb_miss_lock_init(void)
CVS commit: src/sys/arch/powerpc/include/booke
Module Name:src Committed By: thorpej Date: Thu Mar 12 23:09:59 UTC 2020 Modified Files: src/sys/arch/powerpc/include/booke: pmap.h Log Message: If we're going to consult the MULTIPROCESSOR option, we should pull in "opt_multiprocessor.h". To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/booke/pmap.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/powerpc/include/booke/pmap.h diff -u src/sys/arch/powerpc/include/booke/pmap.h:1.19 src/sys/arch/powerpc/include/booke/pmap.h:1.20 --- src/sys/arch/powerpc/include/booke/pmap.h:1.19 Wed Mar 11 13:30:31 2020 +++ src/sys/arch/powerpc/include/booke/pmap.h Thu Mar 12 23:09:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.19 2020/03/11 13:30:31 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.20 2020/03/12 23:09:59 thorpej Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -45,6 +45,7 @@ #endif #ifdef _KERNEL_OPT +#include "opt_multiprocessor.h" #include "opt_pmap.h" #endif
CVS commit: src/external/mit/xorg/lib/xkeyboard-config
Module Name:src Committed By: snj Date: Thu Mar 12 21:55:31 UTC 2020 Modified Files: src/external/mit/xorg/lib/xkeyboard-config: xkeyboard-config.man Log Message: regen for xkeyboard-config 2.29 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man diff -u src/external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man:1.6 src/external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man:1.7 --- src/external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man:1.6 Wed Mar 6 11:05:18 2019 +++ src/external/mit/xorg/lib/xkeyboard-config/xkeyboard-config.man Thu Mar 12 21:55:31 2020 @@ -77,7 +77,6 @@ geniuscomfy2 Genius Comfy KB-21e-Scroll geniuskb19e Genius KB-19e NB geniuskkb2050hs Genius KKB-2050HS gyration Gyration -htcdream HTC Dream kinesis Kinesis logitech_base Logitech logitech_g15 Logitech G15 extra keys via G15daemon @@ -136,6 +135,7 @@ vsonku306 ViewSonic KU-306 Internet microsoftprose Microsoft Internet Pro (Swedish) microsoftoffice Microsoft Office Keyboard microsoftmult Microsoft Wireless Multimedia 1.0A +microsoftsurface Microsoft Surface microsoftelite Microsoft Natural Elite microsoftccurve2k Microsoft Comfort Curve 2000 oretec Ortek Multimedia/Internet MCK-800 @@ -197,7 +197,6 @@ targa_v811 Targa Visionary 811 unitekkb1925 Unitek KB-1925 compalfl90 FL90 creativedw7000 Creative Desktop Wireless 7000 -htcdream Htc Dream phone teck227 Truly Ergonomic 227 teck229 Truly Ergonomic 229 apex300 SteelSeries Apex 300 (Apex RAW) @@ -231,6 +230,7 @@ us(mac) English (Macintosh) us(altgr-intl) English (intl., with AltGr dead keys) us(olpc2) English (the divide/multiply keys toggle the layout) us(hbs) Serbo-Croatian (US) +us(norman) English (Norman) us(workman) English (Workman) us(workman-intl) English (Workman, intl., with dead keys) @@ -256,6 +256,7 @@ ara(mac) Arabic (Macintosh) _ al Albanian al(plisi) Albanian (Plisi) +al(veqilharxhi) Albanian (Veqilharxhi) _ am Armenian @@ -311,7 +312,6 @@ in(guru) Punjabi (Gurmukhi) in(jhelum) Punjabi (Gurmukhi Jhelum) in(kan) Kannada in(kan-kagapa) Kannada (KaGaPa phonetic) -in(kan-kagapa) Kannada (KaGaPa phonetic) in(mal) Malayalam in(mal_lalitha) Malayalam (Lalitha) in(mal_enhanced) Malayalam (enhanced Inscript, with rupee) @@ -399,6 +399,13 @@ cd French (Democratic Republic of the Co _ cn Chinese +cn(mon_trad) Mongolian (Bichig) +cn(mon_trad_todo) Mongolian Todo +cn(mon_trad_xibe) Mongolian Xibe +cn(mon_trad_manchu) Mongolian Manchu +cn(mon_trad_galik) Mongolian Galik +cn(mon_todo_galik) Mongolian Todo Galik +cn(mon_manchu_galik) Mongolian Manchu Galik cn(tib) Tibetan cn(tib_asciinum) Tibetan (with ASCII numerals) cn(ug) Uyghur @@ -416,6 +423,7 @@ cz Czech cz(bksl) Czech (with <\|> key) cz(qwerty) Czech (QWERTY) cz(qwerty_bksl) Czech (QWERTY, extended backslash) +cz(qwerty-mac) Czech (QWERTY, Macintosh) cz(ucw) Czech (UCW, only accented letters) cz(dvorak-ucw) Czech (US, Dvorak, UCW support) cz(rus) Russian (Czech, phonetic) @@ -464,9 +472,9 @@ fo(nodeadkeys) Faroese (no dead keys) _ fi Finnish +fi(winkeys) Finnish (Winkeys) fi(classic) Finnish (classic) fi(nodeadkeys) Finnish (classic, no dead keys) -fi(winkeys) Finnish (Winkeys) fi(smi) Northern Saami (Finland) fi(mac) Finnish (Macintosh) @@ -483,9 +491,11 @@ fr(latin9_nodeadkeys) French (legacy, al fr(latin9_sundeadkeys) French (legacy, alt., with Sun dead keys) fr(bepo) French (Bepo, ergonomic, Dvorak way) fr(bepo_latin9) French (Bepo, ergonomic, Dvorak way, Latin-9 only) +fr(bepo_afnor) French (Bepo, ergonomic, Dvorak way, AFNOR) fr(dvorak) French (Dvorak) fr(mac) French (Macintosh) fr(azerty) French (AZERTY) +fr(afnor) French (AFNOR standardized AZERTY) fr(bre) French (Breton) fr(oci) Occitan fr(geo) Georgian (France, AZERTY Tskapo) @@ -585,6 +595,7 @@ it(geo) Georgian (Italy) it(ibm) Italian (IBM 142) it(intl) Italian (intl., with dead keys) it(scn) Sicilian +it(fur) Friulian (Italy) _ jp Japanese @@ -628,6 +639,7 @@ lt(us) Lithuanian (US, with Lithuanian l lt(ibm) Lithuanian (IBM LST 1205-92) lt(lekp) Lithuanian (LEKP) lt(lekpa) Lithuanian (LEKPa) +lt(sgs) Samogitian _ lv Latvian @@ -658,6 +670,8 @@ mk(nodeadkeys) Macedonian (no dead keys) _ mt Maltese mt(us) Maltese (with US layout) +mt(alt-us) Maltese (US layout with AltGr overrides) +mt(alt-gb) Maltese (UK layout with AltGr overrides) _ mn Mongolian @@ -950,7 +964,11 @@ md Moldavian md(gag) Moldavian (Gagauz) _ -id Indonesian (Jawi) +id Indonesian (Arab Melayu, phonetic) +id(phoneticx) Indonesian (Arab Melayu, ext. phonetic) + +_ +jv Indonesian (Javanese) _ my Malay (Jawi, Arabic Keyboard) @@ -973,7 +991,7 @@ Option Description grp:switch Right Alt (while
CVS commit: src/external/bsd/blacklist/bin
Module Name:src Committed By: christos Date: Thu Mar 12 19:47:32 UTC 2020 Modified Files: src/external/bsd/blacklist/bin: conf.c Log Message: Disable routing perms check for now. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/bsd/blacklist/bin/conf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/bin/conf.c diff -u src/external/bsd/blacklist/bin/conf.c:1.29 src/external/bsd/blacklist/bin/conf.c:1.30 --- src/external/bsd/blacklist/bin/conf.c:1.29 Thu Mar 12 15:35:11 2020 +++ src/external/bsd/blacklist/bin/conf.c Thu Mar 12 15:47:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.29 2020/03/12 19:35:11 christos Exp $ */ +/* $NetBSD: conf.c,v 1.30 2020/03/12 19:47:32 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: conf.c,v 1.29 2020/03/12 19:35:11 christos Exp $"); +__RCSID("$NetBSD: conf.c,v 1.30 2020/03/12 19:47:32 christos Exp $"); #include #ifdef HAVE_LIBUTIL_H @@ -1005,7 +1005,8 @@ confset_match(const struct confset *cs, #ifdef AF_ROUTE static int conf_route_perm(int fd) { -#if defined(RTM_IFANNOUNCE) && defined(RT_ROUNDUP) +/* Disable for now, the access check in the routing socket uses curlwp */ +#if defined(RTM_IFANNOUNCE) && defined(RT_ROUNDUP) && 0 /* * Send a routing message that is not supported to check for access * We expect EOPNOTSUPP for having access, since we are sending a
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Thu Mar 12 19:36:33 UTC 2020 Modified Files: src/sys/net: rtsock_shared.c Log Message: move debugging code after the NULL check. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/rtsock_shared.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/rtsock_shared.c diff -u src/sys/net/rtsock_shared.c:1.15 src/sys/net/rtsock_shared.c:1.16 --- src/sys/net/rtsock_shared.c:1.15 Sat Feb 22 04:30:42 2020 +++ src/sys/net/rtsock_shared.c Thu Mar 12 15:36:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock_shared.c,v 1.15 2020/02/22 09:30:42 maxv Exp $ */ +/* $NetBSD: rtsock_shared.c,v 1.16 2020/03/12 19:36:33 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.15 2020/02/22 09:30:42 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.16 2020/03/12 19:36:33 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -686,6 +686,10 @@ COMPATNAME(route_output)(struct mbuf *m, senderr(EINVAL); } info.rti_flags = rtm->rtm_flags; + if (info.rti_info[RTAX_DST] == NULL || + (info.rti_info[RTAX_DST]->sa_family >= AF_MAX)) { + senderr(EINVAL); + } #ifdef RTSOCK_DEBUG if (info.rti_info[RTAX_DST]->sa_family == AF_INET) { char abuf[INET_ADDRSTRLEN]; @@ -693,10 +697,6 @@ COMPATNAME(route_output)(struct mbuf *m, RT_IN_PRINT(, abuf, RTAX_DST)); } #endif /* RTSOCK_DEBUG */ - if (info.rti_info[RTAX_DST] == NULL || - (info.rti_info[RTAX_DST]->sa_family >= AF_MAX)) { - senderr(EINVAL); - } if (info.rti_info[RTAX_GATEWAY] != NULL && (info.rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) { senderr(EINVAL);
CVS commit: src/external/bsd/blacklist/bin
Module Name:src Committed By: christos Date: Thu Mar 12 19:35:11 UTC 2020 Modified Files: src/external/bsd/blacklist/bin: conf.c Log Message: Handle fds that are pointing to routing sockets. If the fd has access to make changes via the routing socket, grant full permission to make filter changes. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/external/bsd/blacklist/bin/conf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/bin/conf.c diff -u src/external/bsd/blacklist/bin/conf.c:1.28 src/external/bsd/blacklist/bin/conf.c:1.29 --- src/external/bsd/blacklist/bin/conf.c:1.28 Thu Mar 12 07:31:23 2020 +++ src/external/bsd/blacklist/bin/conf.c Thu Mar 12 15:35:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.28 2020/03/12 11:31:23 roy Exp $ */ +/* $NetBSD: conf.c,v 1.29 2020/03/12 19:35:11 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: conf.c,v 1.28 2020/03/12 11:31:23 roy Exp $"); +__RCSID("$NetBSD: conf.c,v 1.29 2020/03/12 19:35:11 christos Exp $"); #include #ifdef HAVE_LIBUTIL_H @@ -46,6 +46,7 @@ __RCSID("$NetBSD: conf.c,v 1.28 2020/03/ #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ __RCSID("$NetBSD: conf.c,v 1.28 2020/03/ #include #include #include +#include #include #include "bl.h" @@ -90,7 +92,7 @@ advance(char **p) } static int -getnum(const char *f, size_t l, bool local, void *rp, const char *name, +conf_getnum(const char *f, size_t l, bool local, void *rp, const char *name, const char *p) { int e; @@ -127,13 +129,14 @@ out: } static int -getnfail(const char *f, size_t l, bool local, struct conf *c, const char *p) +conf_getnfail(const char *f, size_t l, bool local, struct conf *c, +const char *p) { - return getnum(f, l, local, >c_nfail, "nfail", p); + return conf_getnum(f, l, local, >c_nfail, "nfail", p); } static int -getsecs(const char *f, size_t l, bool local, struct conf *c, const char *p) +conf_getsecs(const char *f, size_t l, bool local, struct conf *c, const char *p) { int e; char *ep; @@ -193,7 +196,7 @@ out: } static int -getport(const char *f, size_t l, bool local, void *r, const char *p) +conf_getport(const char *f, size_t l, bool local, void *r, const char *p) { struct servent *sv; @@ -207,11 +210,11 @@ getport(const char *f, size_t l, bool lo return 0; } - return getnum(f, l, local, r, "service", p); + return conf_getnum(f, l, local, r, "service", p); } static int -getmask(const char *f, size_t l, bool local, const char **p, int *mask) +conf_getmask(const char *f, size_t l, bool local, const char **p, int *mask) { char *d; const char *s = *p; @@ -226,11 +229,12 @@ getmask(const char *f, size_t l, bool lo } *d++ = '\0'; - return getnum(f, l, local, mask, "mask", d); + return conf_getnum(f, l, local, mask, "mask", d); } static int -gethostport(const char *f, size_t l, bool local, struct conf *c, const char *p) +conf_gethostport(const char *f, size_t l, bool local, struct conf *c, +const char *p) { char *d; // XXX: Ok to write to string. in_port_t *port = NULL; @@ -249,7 +253,7 @@ gethostport(const char *f, size_t l, boo } else pstr = p; - if (getmask(f, l, local, , >c_lmask) == -1) + if (conf_getmask(f, l, local, , >c_lmask) == -1) goto out; if (d) { @@ -300,7 +304,7 @@ gethostport(const char *f, size_t l, boo } } - if (getport(f, l, local, >c_port, pstr) == -1) + if (conf_getport(f, l, local, >c_port, pstr) == -1) return -1; if (port && c->c_port != FSTAR && c->c_port != FEQUAL) @@ -320,7 +324,7 @@ out2: } static int -getproto(const char *f, size_t l, bool local __unused, struct conf *c, +conf_getproto(const char *f, size_t l, bool local __unused, struct conf *c, const char *p) { if (strcmp(p, "stream") == 0) { @@ -331,22 +335,22 @@ getproto(const char *f, size_t l, bool l c->c_proto = IPPROTO_UDP; return 0; } - return getnum(f, l, local, >c_proto, "protocol", p); + return conf_getnum(f, l, local, >c_proto, "protocol", p); } static int -getfamily(const char *f, size_t l, bool local __unused, struct conf *c, +conf_getfamily(const char *f, size_t l, bool local __unused, struct conf *c, const char *p) { if (strncmp(p, "tcp", 3) == 0 || strncmp(p, "udp", 3) == 0) { c->c_family = p[3] == '6' ? AF_INET6 : AF_INET; return 0; } - return getnum(f, l, local, >c_family, "family", p); + return conf_getnum(f, l, local, >c_family, "family", p); } static int -getuid(const char *f, size_t l, bool local __unused, struct conf *c, +conf_getuid(const char *f, size_t l, bool local __unused, struct conf *c, const char *p) { struct passwd *pw; @@ -356,15 +360,15 @@ getuid(const char *f, size_t l, bool loc return 0; } - return getnum(f, l, local,
CVS commit: src/tests/sbin/resize_ffs
Module Name:src Committed By: martin Date: Thu Mar 12 18:08:54 UTC 2020 Modified Files: src/tests/sbin/resize_ffs: common.sh Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/sbin/resize_ffs/common.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/sbin/resize_ffs/common.sh diff -u src/tests/sbin/resize_ffs/common.sh:1.15 src/tests/sbin/resize_ffs/common.sh:1.16 --- src/tests/sbin/resize_ffs/common.sh:1.15 Sun Oct 8 21:12:27 2017 +++ src/tests/sbin/resize_ffs/common.sh Thu Mar 12 18:08:54 2020 @@ -140,7 +140,7 @@ resize_ffs() then atf_skip 'No PUFFS available in kernel' else - aft_fail "rump_ffs mount failed: $(tail -r S.Err | + atf_fail "rump_ffs mount failed: $(tail -r S.Err | sed -e '/^$/d' -e p -e q )" fi fi
CVS commit: src/external/gpl3/gdb/dist
Module Name:src Committed By: kamil Date: Thu Mar 12 15:56:45 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/libiberty: strerror.c src/external/gpl3/gdb/dist/sim/ppc: events.c hw_memory.c Log Message: Reduce diff with upstream Remove local no longer needed modifications. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/libiberty/strerror.c cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/sim/ppc/events.c \ src/external/gpl3/gdb/dist/sim/ppc/hw_memory.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/libiberty/strerror.c diff -u src/external/gpl3/gdb/dist/libiberty/strerror.c:1.3 src/external/gpl3/gdb/dist/libiberty/strerror.c:1.4 --- src/external/gpl3/gdb/dist/libiberty/strerror.c:1.3 Sun Aug 16 09:58:18 2015 +++ src/external/gpl3/gdb/dist/libiberty/strerror.c Thu Mar 12 15:56:44 2020 @@ -347,7 +347,7 @@ static const struct error_info error_tab ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"), #endif #if defined (ENOPROTOOPT) - ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"), + ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"), #endif #if defined (EPROTONOSUPPORT) ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"), Index: src/external/gpl3/gdb/dist/sim/ppc/events.c diff -u src/external/gpl3/gdb/dist/sim/ppc/events.c:1.3 src/external/gpl3/gdb/dist/sim/ppc/events.c:1.4 --- src/external/gpl3/gdb/dist/sim/ppc/events.c:1.3 Thu Oct 3 18:30:46 2013 +++ src/external/gpl3/gdb/dist/sim/ppc/events.c Thu Mar 12 15:56:45 2020 @@ -24,7 +24,6 @@ #include "basics.h" #include "events.h" -#include #include #include Index: src/external/gpl3/gdb/dist/sim/ppc/hw_memory.c diff -u src/external/gpl3/gdb/dist/sim/ppc/hw_memory.c:1.3 src/external/gpl3/gdb/dist/sim/ppc/hw_memory.c:1.4 --- src/external/gpl3/gdb/dist/sim/ppc/hw_memory.c:1.3 Sun Aug 16 10:00:19 2015 +++ src/external/gpl3/gdb/dist/sim/ppc/hw_memory.c Thu Mar 12 15:56:45 2020 @@ -29,8 +29,6 @@ #include "device_table.h" -#include - /* DEVICE
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Thu Mar 12 15:50:12 UTC 2020 Modified Files: src/lib/libcurses: initscr.c Log Message: curses: use perror rather than err in initscr libhack lacks err and perror is more portable. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/lib/libcurses/initscr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/initscr.c diff -u src/lib/libcurses/initscr.c:1.34 src/lib/libcurses/initscr.c:1.35 --- src/lib/libcurses/initscr.c:1.34 Wed Mar 11 21:33:38 2020 +++ src/lib/libcurses/initscr.c Thu Mar 12 15:50:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: initscr.c,v 1.34 2020/03/11 21:33:38 roy Exp $ */ +/* $NetBSD: initscr.c,v 1.35 2020/03/12 15:50:11 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,11 +34,10 @@ #if 0 static char sccsid[] = "@(#)initscr.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: initscr.c,v 1.34 2020/03/11 21:33:38 roy Exp $"); +__RCSID("$NetBSD: initscr.c,v 1.35 2020/03/12 15:50:11 roy Exp $"); #endif #endif /* not lint */ -#include #include #include "curses.h" @@ -66,8 +65,15 @@ initscr(void) sp = Def_term; /* LINTED const castaway; newterm does not modify sp! */ - if ((_cursesi_screen = newterm((char *) sp, stdout, stdin)) == NULL) - errx(EXIT_FAILURE, "initscr"); /* POSIX says exit on failure */ + if ((_cursesi_screen = newterm((char *) sp, stdout, stdin)) == NULL) { + /* + * POSIX says we should write a diagnostic and exit on error. + * As such some applications don't bother checking the return + * value at all. + */ + perror("initscr"); + exit(EXIT_FAILURE); + } set_term(_cursesi_screen); wrefresh(curscr);
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: pgoyette Date: Thu Mar 12 15:04:13 UTC 2020 Modified Files: src/distrib/sets/lists/modules: ad.aarch64 ad.arm ad.mips md.amd64 md.sparc64 Log Message: Add new netbsd32 quota modules to sets lists To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/modules/ad.aarch64 cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/modules/ad.arm cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/modules/ad.mips cvs rdiff -u -r1.85 -r1.86 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/modules/md.sparc64 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/modules/ad.aarch64 diff -u src/distrib/sets/lists/modules/ad.aarch64:1.5 src/distrib/sets/lists/modules/ad.aarch64:1.6 --- src/distrib/sets/lists/modules/ad.aarch64:1.5 Sun Mar 8 15:21:15 2020 +++ src/distrib/sets/lists/modules/ad.aarch64 Thu Mar 12 15:04:13 2020 @@ -1,4 +1,4 @@ -# $NetBSD: ad.aarch64,v 1.5 2020/03/08 15:21:15 skrll Exp $ +# $NetBSD: ad.aarch64,v 1.6 2020/03/12 15:04:13 pgoyette Exp $ ./@MODULEDIR@/bpfjitmodules-base-kernel kmod,sljit ./@MODULEDIR@/bpfjit/bpfjit.kmod modules-base-kernel kmod,sljit ./@MODULEDIR@/compat_netbsd32 modules-base-kernel kmod @@ -41,6 +41,10 @@ ./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_raid modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_raid/compat_netbsd32_raid.kmod modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota/compat_netbsd32_quota.kmod modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota_50 modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota_50/compat_netbsd32_quota_50.kmod modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_sysvipc modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_sysvipc_10 modules-base-kernel kmod Index: src/distrib/sets/lists/modules/ad.arm diff -u src/distrib/sets/lists/modules/ad.arm:1.15 src/distrib/sets/lists/modules/ad.arm:1.16 --- src/distrib/sets/lists/modules/ad.arm:1.15 Tue Feb 11 11:36:53 2020 +++ src/distrib/sets/lists/modules/ad.arm Thu Mar 12 15:04:13 2020 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.15 2020/02/11 11:36:53 uki Exp $ +# $NetBSD: ad.arm,v 1.16 2020/03/12 15:04:13 pgoyette Exp $ ./@MODULEDIR@/compat_netbsd32 modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod modules-base-kernel kmod @@ -38,6 +38,10 @@ ./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_raid modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_raid/compat_netbsd32_raid.kmod modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota/compat_netbsd32_quota.kmod modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota_50 modules-base-kernel kmod +./@MODULEDIR@/compat_netbsd32_quota_50/compat_netbsd32_quota_50.kmod modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_sysvipc modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod modules-base-kernel kmod ./@MODULEDIR@/compat_netbsd32_sysvipc_10 modules-base-kernel kmod Index: src/distrib/sets/lists/modules/ad.mips diff -u src/distrib/sets/lists/modules/ad.mips:1.14 src/distrib/sets/lists/modules/ad.mips:1.15 --- src/distrib/sets/lists/modules/ad.mips:1.14 Tue Feb 11 11:36:53 2020 +++ src/distrib/sets/lists/modules/ad.mips Thu Mar 12 15:04:13 2020 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.14 2020/02/11 11:36:53 uki Exp $ +# $NetBSD: ad.mips,v 1.15 2020/03/12 15:04:13 pgoyette Exp $ ./@MODULEDIR@/compat_netbsd32 modules-base-kernel kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod modules-base-kernel kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_09 modules-base-kernel kmod,arch64,nocompatmodules @@ -37,6 +37,10 @@ ./@MODULEDIR@/compat_netbsd32_ptrace/compat_netbsd32_ptrace.kmod modules-base-kernel kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_raid modules-base-kernel kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_raid/compat_netbsd32_raid.kmod modules-base-kernel kmod,arch64,nocompatmodules +./@MODULEDIR@/compat_netbsd32_quota modules-base-kernel kmod,arch64,nocompatmodules +./@MODULEDIR@/compat_netbsd32_quota/compat_netbsd32_quota.kmod modules-base-kernel kmod,arch64,nocompatmodules +./@MODULEDIR@/compat_netbsd32_quota_50 modules-base-kernel kmod,arch64,nocompatmodules +./@MODULEDIR@/compat_netbsd32_quota_50/compat_netbsd32_quota_50.kmod modules-base-kernel kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_sysvipc
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Mar 12 15:03:15 UTC 2020 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c netbsd32_systrace_args.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/compat/netbsd32/netbsd32_syscall.h cvs rdiff -u -r1.148 -r1.149 src/sys/compat/netbsd32/netbsd32_syscallargs.h \ src/sys/compat/netbsd32/netbsd32_syscalls.c cvs rdiff -u -r1.28 -r1.29 \ src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c cvs rdiff -u -r1.147 -r1.148 src/sys/compat/netbsd32/netbsd32_sysent.c cvs rdiff -u -r1.39 -r1.40 src/sys/compat/netbsd32/netbsd32_systrace_args.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/compat/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.149 src/sys/compat/netbsd32/netbsd32_syscall.h:1.150 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.149 Sat Mar 7 00:57:31 2020 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Thu Mar 12 15:03:15 2020 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.149 2020/03/07 00:57:31 pgoyette Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.150 2020/03/12 15:03:15 pgoyette Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.132 2020/03/07 00:56:41 pgoyette Exp + * created from NetBSD: syscalls.master,v 1.133 2020/03/12 15:02:29 pgoyette Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -428,13 +428,9 @@ /* syscall: "setsid" ret: "int" args: */ #define NETBSD32_SYS_setsid 147 -#if defined(QUOTA) || !defined(_KERNEL_OPT) /* syscall: "compat_50_netbsd32_quotactl" ret: "int" args: "netbsd32_charp" "int" "int" "netbsd32_voidp" */ #define NETBSD32_SYS_compat_50_netbsd32_quotactl 148 -#else -/* 148 is excluded compat_netbsd32_quotactl */ -#endif /* 149 is excluded compat_netbsd32_quota */ /* syscall: "compat_43_netbsd32_ogetsockname" ret: "int" args: "int" "netbsd32_voidp" "netbsd32_intp" */ #define NETBSD32_SYS_compat_43_netbsd32_ogetsockname 150 @@ -1237,13 +1233,9 @@ /* syscall: "netbsd32_futimens" ret: "int" args: "int" "const netbsd32_timespecp_t" */ #define NETBSD32_SYS_netbsd32_futimens 472 -#if defined(QUOTA) || !defined(_KERNEL_OPT) /* syscall: "netbsd32___quotactl" ret: "int" args: "const netbsd32_charp" "netbsd32_voidp" */ #define NETBSD32_SYS_netbsd32___quotactl 473 -#else -/* 473 is excluded netbsd32___quotactl */ -#endif /* syscall: "netbsd32_posix_spawn" ret: "int" args: "netbsd32_pid_tp" "const netbsd32_charp" "const netbsd32_posix_spawn_file_actionsp" "const netbsd32_posix_spawnattrp" "netbsd32_charpp" "netbsd32_charpp" */ #define NETBSD32_SYS_netbsd32_posix_spawn 474 Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.148 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.149 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.148 Sat Mar 7 00:57:31 2020 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Thu Mar 12 15:03:15 2020 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.148 2020/03/07 00:57:31 pgoyette Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.149 2020/03/12 15:03:15 pgoyette Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.132 2020/03/07 00:56:41 pgoyette Exp + * created from NetBSD: syscalls.master,v 1.133 2020/03/12 15:02:29 pgoyette Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ @@ -793,7 +793,6 @@ struct compat_43_netbsd32_killpg_args { syscallarg(int) signum; }; check_syscall_args(compat_43_netbsd32_killpg) -#if defined(QUOTA) || !defined(_KERNEL_OPT) struct compat_50_netbsd32_quotactl_args { syscallarg(netbsd32_charp) path; @@ -802,8 +801,6 @@ struct compat_50_netbsd32_quotactl_args syscallarg(netbsd32_voidp) arg; }; check_syscall_args(compat_50_netbsd32_quotactl) -#else -#endif struct compat_43_netbsd32_ogetsockname_args { syscallarg(int) fdec; @@ -2534,15 +2531,12 @@ struct netbsd32_futimens_args { syscallarg(const netbsd32_timespecp_t) tptr; }; check_syscall_args(netbsd32_futimens) -#if defined(QUOTA) || !defined(_KERNEL_OPT) struct netbsd32___quotactl_args { syscallarg(const netbsd32_charp) path; syscallarg(netbsd32_voidp) args; }; check_syscall_args(netbsd32___quotactl) -#else -#endif struct netbsd32_posix_spawn_args { syscallarg(netbsd32_pid_tp) pid; @@ -2925,11 +2919,8 @@ int compat_43_netbsd32_killpg(struct lwp int sys_setsid(struct lwp *, const void *, register_t *); -#if defined(QUOTA) || !defined(_KERNEL_OPT) int compat_50_netbsd32_quotactl(struct lwp *, const struct compat_50_netbsd32_quotactl_args *, register_t *); -#else -#endif
CVS commit: src/sys
Module Name:src Committed By: pgoyette Date: Thu Mar 12 15:02:29 UTC 2020 Modified Files: src/sys/compat/netbsd32: files.netbsd32 netbsd32_compat_50.c netbsd32_quota.c syscalls.master src/sys/modules: Makefile src/sys/modules/compat_netbsd32: Makefile src/sys/modules/compat_netbsd32_50: Makefile Added Files: src/sys/compat/netbsd32: netbsd32_compat_50_quota.c src/sys/modules/compat_netbsd32_quota: Makefile src/sys/modules/compat_netbsd32_quota_50: Makefile Log Message: Split out the quota code from the rest of compat_netbsd32 module. This allows loading of compat_netbsd32 on kernels that don't have ``options QUOTA'' enabled. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/compat/netbsd32/files.netbsd32 cvs rdiff -u -r1.46 -r1.47 src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_compat_50_quota.c cvs rdiff -u -r1.2 -r1.3 src/sys/compat/netbsd32/netbsd32_quota.c cvs rdiff -u -r1.132 -r1.133 src/sys/compat/netbsd32/syscalls.master cvs rdiff -u -r1.242 -r1.243 src/sys/modules/Makefile cvs rdiff -u -r1.31 -r1.32 src/sys/modules/compat_netbsd32/Makefile cvs rdiff -u -r1.5 -r1.6 src/sys/modules/compat_netbsd32_50/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_quota/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_quota_50/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/files.netbsd32 diff -u src/sys/compat/netbsd32/files.netbsd32:1.49 src/sys/compat/netbsd32/files.netbsd32:1.50 --- src/sys/compat/netbsd32/files.netbsd32:1.49 Sun Sep 22 22:59:38 2019 +++ src/sys/compat/netbsd32/files.netbsd32 Thu Mar 12 15:02:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.netbsd32,v 1.49 2019/09/22 22:59:38 christos Exp $ +# $NetBSD: files.netbsd32,v 1.50 2020/03/12 15:02:29 pgoyette Exp $ # # config file description for machine-independent netbsd32 compat code. # included by ports that need it. @@ -54,6 +54,8 @@ file compat/netbsd32/netbsd32_compat_30. file compat/netbsd32/netbsd32_compat_40.c compat_netbsd32 & compat_40 file compat/netbsd32/netbsd32_compat_43.c compat_netbsd32 & (compat_43 | compat_sunos | compat_linux32) file compat/netbsd32/netbsd32_compat_50.c compat_netbsd32 & compat_50 +file compat/netbsd32/netbsd32_compat_50_quota.c compat_netbsd32 & compat_50 & + quota file compat/netbsd32/netbsd32_rndpseudo_50.c compat_netbsd32 & compat_50 file compat/netbsd32/netbsd32_compat_50_sysv.c compat_netbsd32 & compat_50 & (sysvmsg | sysvsem | sysvshm) Index: src/sys/compat/netbsd32/netbsd32_compat_50.c diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.46 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.47 --- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.46 Thu Feb 27 20:54:24 2020 +++ src/sys/compat/netbsd32/netbsd32_compat_50.c Thu Mar 12 15:02:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_50.c,v 1.46 2020/02/27 20:54:24 pgoyette Exp $ */ +/* $NetBSD: netbsd32_compat_50.c,v 1.47 2020/03/12 15:02:29 pgoyette Exp $ */ /*- * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.46 2020/02/27 20:54:24 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.47 2020/03/12 15:02:29 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -916,26 +916,6 @@ compat_50_netbsd32_getitimer(struct lwp return copyout(, SCARG_P32(uap, itv), sizeof(s32it)); } -#ifdef QUOTA -int -compat_50_netbsd32_quotactl(struct lwp *l, const struct compat_50_netbsd32_quotactl_args *uap, register_t *retval) -{ - /* { - syscallarg(const netbsd32_charp) path; - syscallarg(int) cmd; - syscallarg(int) uid; - syscallarg(netbsd32_voidp) arg; - } */ - struct compat_50_sys_quotactl_args ua; - - NETBSD32TOP_UAP(path, const char); - NETBSD32TO64_UAP(cmd); - NETBSD32TO64_UAP(uid); - NETBSD32TOP_UAP(arg, void *); - return (compat_50_sys_quotactl(l, , retval)); -} -#endif - #ifdef NTP int compat_50_netbsd32_ntp_gettime(struct lwp *l, @@ -1026,10 +1006,6 @@ static struct syscall_package compat_net (sy_call_t *)compat_50_netbsd32_setitimer }, { NETBSD32_SYS_compat_50_netbsd32_getitimer, 0, (sy_call_t *)compat_50_netbsd32_getitimer }, -#ifdef QUOTA - { NETBSD32_SYS_compat_50_netbsd32_quotactl, 0, - (sy_call_t *)compat_50_netbsd32_quotactl }, -#endif #ifdef NTP { NETBSD32_SYS_compat_50_netbsd32_ntp_gettime, 0, (sy_call_t *)compat_50_netbsd32_ntp_gettime }, Index: src/sys/compat/netbsd32/netbsd32_quota.c diff -u src/sys/compat/netbsd32/netbsd32_quota.c:1.2 src/sys/compat/netbsd32/netbsd32_quota.c:1.3 --- src/sys/compat/netbsd32/netbsd32_quota.c:1.2 Tue Jun 18 16:22:54 2019 +++ src/sys/compat/netbsd32/netbsd32_quota.c Thu Mar 12
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Thu Mar 12 14:52:04 UTC 2020 Modified Files: src/lib/libterminfo: compile.c Log Message: terminfo: truncate numeric parameters to a short Because that is what our API demands. We should probably change to int when we next bump the API. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libterminfo/compile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libterminfo/compile.c diff -u src/lib/libterminfo/compile.c:1.12 src/lib/libterminfo/compile.c:1.13 --- src/lib/libterminfo/compile.c:1.12 Thu May 4 09:46:30 2017 +++ src/lib/libterminfo/compile.c Thu Mar 12 14:52:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: compile.c,v 1.12 2017/05/04 09:46:30 roy Exp $ */ +/* $NetBSD: compile.c,v 1.13 2020/03/12 14:52:04 roy Exp $ */ /* * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #endif #include -__RCSID("$NetBSD: compile.c,v 1.12 2017/05/04 09:46:30 roy Exp $"); +__RCSID("$NetBSD: compile.c,v 1.13 2020/03/12 14:52:04 roy Exp $"); #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H #include @@ -579,7 +579,11 @@ _ti_compile(char *cap, int flags) tic->name, token); continue; } - num = (short)cnum; + + if (cnum > SHRT_MAX) +num = SHRT_MAX; + else +num = (short)cnum; if (ind == -1) _ti_store_extra(tic, 1, token, 'n', -1, num, NULL, 0, flags);
CVS commit: src/tests/lib/libc/db
Module Name:src Committed By: martin Date: Thu Mar 12 14:10:59 UTC 2020 Modified Files: src/tests/lib/libc/db: t_db.sh Log Message: bsize_torture: skip bigger page size tests if space in the database directory is limited (numbers pulled out of thin air). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/db/t_db.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/lib/libc/db/t_db.sh diff -u src/tests/lib/libc/db/t_db.sh:1.8 src/tests/lib/libc/db/t_db.sh:1.9 --- src/tests/lib/libc/db/t_db.sh:1.8 Thu Mar 12 14:03:42 2020 +++ src/tests/lib/libc/db/t_db.sh Thu Mar 12 14:10:59 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_db.sh,v 1.8 2020/03/12 14:03:42 martin Exp $ +# $NetBSD: t_db.sh,v 1.9 2020/03/12 14:10:59 martin Exp $ # # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -919,7 +919,15 @@ bsize_torture_body() { TMPDIR="$(pwd)/db_dir"; export TMPDIR mkdir ${TMPDIR} - for i in 2048 4096 8192 16384 32768 65536 + AVAIL=$( df -m ${TMPDIR} | awk '{if (int($4) > 0) print $4}' ) + LIST="2048 4096 8192 16384" + if [ $AVAIL -gt 30 ]; then + LIST="$LIST 32768" + fi + if [ $AVAIL -gt 60 ]; then + LIST="$LIST 65536" + fi + for i in $LIST do atf_check "$(prog_lfsr)" $i done
CVS commit: src/tests/lib/libc/db
Module Name:src Committed By: martin Date: Thu Mar 12 14:03:43 UTC 2020 Modified Files: src/tests/lib/libc/db: t_db.sh Log Message: btree_weird_page_split: set timeout to 900s, now my landisk tests have a chance to complete this one. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/db/t_db.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/lib/libc/db/t_db.sh diff -u src/tests/lib/libc/db/t_db.sh:1.7 src/tests/lib/libc/db/t_db.sh:1.8 --- src/tests/lib/libc/db/t_db.sh:1.7 Sat Sep 24 20:12:33 2016 +++ src/tests/lib/libc/db/t_db.sh Thu Mar 12 14:03:42 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_db.sh,v 1.7 2016/09/24 20:12:33 christos Exp $ +# $NetBSD: t_db.sh,v 1.8 2020/03/12 14:03:42 martin Exp $ # # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -934,6 +934,7 @@ btree_weird_page_split_head() "be the only item on the left page results in index 0 of " \ "the right page being erroneously skipped; this only " \ "happens with one particular key+data length for each page size." + atf_set "timeout" "900" } btree_weird_page_split_body() {
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: tnn Date: Thu Mar 12 13:01:59 UTC 2020 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: vmx_vmptrst(): only used when DIAGNOSTIC To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/nvmm/x86/nvmm_x86_vmx.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.49 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.50 --- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.49 Fri Feb 21 00:26:22 2020 +++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Thu Mar 12 13:01:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_vmx.c,v 1.49 2020/02/21 00:26:22 joerg Exp $ */ +/* $NetBSD: nvmm_x86_vmx.c,v 1.50 2020/03/12 13:01:59 tnn Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.49 2020/02/21 00:26:22 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.50 2020/03/12 13:01:59 tnn Exp $"); #include #include @@ -134,6 +134,7 @@ vmx_vmwrite(uint64_t field, uint64_t val ); } +#ifdef DIAGNOSTIC static inline paddr_t vmx_vmptrst(void) { @@ -148,6 +149,7 @@ vmx_vmptrst(void) return pa; } +#endif static inline void vmx_vmptrld(paddr_t *pa)
CVS commit: src/tests/lib/libarchive
Module Name:src Committed By: martin Date: Thu Mar 12 12:57:45 UTC 2020 Modified Files: src/tests/lib/libarchive: t_libarchive.sh Log Message: Bump timeout to 10m To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libarchive/t_libarchive.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/lib/libarchive/t_libarchive.sh diff -u src/tests/lib/libarchive/t_libarchive.sh:1.2 src/tests/lib/libarchive/t_libarchive.sh:1.3 --- src/tests/lib/libarchive/t_libarchive.sh:1.2 Tue Jan 28 18:18:32 2020 +++ src/tests/lib/libarchive/t_libarchive.sh Thu Mar 12 12:57:45 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_libarchive.sh,v 1.2 2020/01/28 18:18:32 martin Exp $ +# $NetBSD: t_libarchive.sh,v 1.3 2020/03/12 12:57:45 martin Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,7 +30,7 @@ atf_test_case libarchive libarchive_head() { atf_set "descr" "test libarchive" - atf_set "timeout" "3600" + atf_set "timeout" "6000" } libarchive_body()
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Thu Mar 12 12:17:15 UTC 2020 Modified Files: src/lib/libcurses: clrtobot.c clrtoeol.c curses.h erase.c Log Message: curses: normalise erase logic with clrtoeol and clrtobot Define WA_ATTRIBUTES as 0 for the non wide case just to make our code easier to write. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libcurses/clrtobot.c cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/clrtoeol.c cvs rdiff -u -r1.126 -r1.127 src/lib/libcurses/curses.h cvs rdiff -u -r1.29 -r1.30 src/lib/libcurses/erase.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/clrtobot.c diff -u src/lib/libcurses/clrtobot.c:1.24 src/lib/libcurses/clrtobot.c:1.25 --- src/lib/libcurses/clrtobot.c:1.24 Fri Jan 6 13:53:18 2017 +++ src/lib/libcurses/clrtobot.c Thu Mar 12 12:17:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: clrtobot.c,v 1.24 2017/01/06 13:53:18 roy Exp $ */ +/* $NetBSD: clrtobot.c,v 1.25 2020/03/12 12:17:15 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)clrtobot.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: clrtobot.c,v 1.24 2017/01/06 13:53:18 roy Exp $"); +__RCSID("$NetBSD: clrtobot.c,v 1.25 2020/03/12 12:17:15 roy Exp $"); #endif #endif/* not lint */ @@ -65,6 +65,7 @@ wclrtobot(WINDOW *win) { int minx, startx, starty, y; __LDATA *sp, *end, *maxx; + wchar_t bch; attr_t attr; #ifdef __GNUC__ @@ -77,6 +78,11 @@ wclrtobot(WINDOW *win) starty = win->cury; startx = win->curx; } +#ifdef HAVE_WCHAR + bch = (wchar_t)btowc((int)win->bch); +#else + bch = win->bch; +#endif if (win != curscr) attr = win->battr & __ATTRIBUTES; else @@ -85,28 +91,23 @@ wclrtobot(WINDOW *win) minx = -1; end = >alines[y]->line[win->maxx]; for (sp = >alines[y]->line[startx]; sp < end; sp++) { -#ifndef HAVE_WCHAR - if (sp->ch != win->bch || sp->attr != attr) { -#else - if (sp->ch != (wchar_t)btowc((int)win->bch) || - (sp->attr & WA_ATTRIBUTES) != attr || sp->nsp) { -#endif /* HAVE_WCHAR */ -maxx = sp; -if (minx == -1) - minx = (int)(sp - win->alines[y]->line); -if (sp->attr & __ALTCHARSET) - sp->attr = attr | __ALTCHARSET; -else - sp->attr = attr; + if (sp->ch == bch && #ifdef HAVE_WCHAR -sp->ch = (wchar_t)btowc((int)win->bch); -if (_cursesi_copy_nsp(win->bnsp, sp) == ERR) - return ERR; -SET_WCOL(*sp, 1); -#else -sp->ch = win->bch; -#endif /* HAVE_WCHAR */ - } + sp->nsp == NULL && WCOL(*sp) >= 0 && +#endif + (sp->attr & WA_ATTRIBUTES) == attr) +continue; + + maxx = sp; + if (minx == -1) +minx = (int)(sp - win->alines[y]->line); + sp->attr = attr | (sp->attr & __ALTCHARSET); + sp->ch = bch; +#ifdef HAVE_WCHAR + if (_cursesi_copy_nsp(win->bnsp, sp) == ERR) +return ERR; + SET_WCOL(*sp, 1); +#endif } if (minx != -1) Index: src/lib/libcurses/clrtoeol.c diff -u src/lib/libcurses/clrtoeol.c:1.28 src/lib/libcurses/clrtoeol.c:1.29 --- src/lib/libcurses/clrtoeol.c:1.28 Fri Jan 6 13:53:18 2017 +++ src/lib/libcurses/clrtoeol.c Thu Mar 12 12:17:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: clrtoeol.c,v 1.28 2017/01/06 13:53:18 roy Exp $ */ +/* $NetBSD: clrtoeol.c,v 1.29 2020/03/12 12:17:15 roy Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: clrtoeol.c,v 1.28 2017/01/06 13:53:18 roy Exp $"); +__RCSID("$NetBSD: clrtoeol.c,v 1.29 2020/03/12 12:17:15 roy Exp $"); #endif #endif/* not lint */ @@ -65,6 +65,7 @@ wclrtoeol(WINDOW *win) { int minx, x, y; __LDATA *end, *maxx, *sp; + wchar_t bch; attr_t attr; y = win->cury; @@ -82,31 +83,34 @@ wclrtoeol(WINDOW *win) end = >alines[y]->line[win->maxx]; minx = -1; maxx = >alines[y]->line[x]; +#ifdef HAVE_WCHAR + bch = (wchar_t)btowc((int)win->bch); +#else + bch = win->bch; +#endif if (win != curscr) attr = win->battr & __ATTRIBUTES; else attr = 0; - for (sp = maxx; sp < end; sp++) -#ifndef HAVE_WCHAR - if (sp->ch != win->bch || sp->attr != attr) { -#else - if (sp->ch != (wchar_t)btowc((int) win->bch ) || - (sp->attr & WA_ATTRIBUTES) != attr || sp->nsp - || (WCOL(*sp) < 0)) { -#endif /* HAVE_WCHAR */ - maxx = sp; - if (minx == -1) -minx = (int) (sp - win->alines[y]->line); - sp->attr = attr | (sp->attr & __ALTCHARSET); + for (sp = maxx; sp < end; sp++) { + if (sp->ch == bch && #ifdef HAVE_WCHAR - sp->ch = (wchar_t)btowc((int) win->bch); - if (_cursesi_copy_nsp(win->bnsp, sp) == ERR) -return ERR; - SET_WCOL(*sp, 1); -#else - sp->ch = win->bch; -#endif /* HAVE_WCHAR */ - } + sp->nsp == NULL && WCOL(*sp) >= 0 && +#endif + (sp->attr & WA_ATTRIBUTES) == attr) + continue; + + maxx = sp; + if (minx == -1) + minx = (int)(sp - win->alines[y]->line); +
CVS commit: src/lib/libcurses
Module Name:src Committed By: roy Date: Thu Mar 12 11:38:28 UTC 2020 Modified Files: src/lib/libcurses: curses_screen.3 Log Message: curses: note the change in initscr in our fine man page. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libcurses/curses_screen.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/curses_screen.3 diff -u src/lib/libcurses/curses_screen.3:1.25 src/lib/libcurses/curses_screen.3:1.26 --- src/lib/libcurses/curses_screen.3:1.25 Tue Oct 2 17:35:44 2018 +++ src/lib/libcurses/curses_screen.3 Thu Mar 12 11:38:28 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: curses_screen.3,v 1.25 2018/10/02 17:35:44 roy Exp $ +.\" $NetBSD: curses_screen.3,v 1.26 2020/03/12 11:38:28 roy Exp $ .\" .\" Copyright (c) 2002 .\" Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au) @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd October 2, 2018 +.Dd March 12, 2020 .Dt CURSES_SCREEN 3 .Os .Sh NAME @@ -267,7 +267,10 @@ of the current screen to .Sh RETURN VALUES Functions returning pointers will return .Dv NULL -if an error is detected. +if an error is detected with the exception of +.Fn initscr +which will log a diagnostic to standard error output and then call +.Xr exit 3 . The functions that return an int will return one of the following values: .Pp
CVS commit: src/external/bsd/blacklist
Module Name:src Committed By: roy Date: Thu Mar 12 11:31:23 UTC 2020 Modified Files: src/external/bsd/blacklist/bin: blacklistd.c conf.c src/external/bsd/blacklist/lib: bl.c Log Message: Revert allowing fd == -1 at the request of Christos. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/external/bsd/blacklist/bin/blacklistd.c cvs rdiff -u -r1.27 -r1.28 src/external/bsd/blacklist/bin/conf.c cvs rdiff -u -r1.30 -r1.31 src/external/bsd/blacklist/lib/bl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/bin/blacklistd.c diff -u src/external/bsd/blacklist/bin/blacklistd.c:1.42 src/external/bsd/blacklist/bin/blacklistd.c:1.43 --- src/external/bsd/blacklist/bin/blacklistd.c:1.42 Wed Mar 11 02:33:18 2020 +++ src/external/bsd/blacklist/bin/blacklistd.c Thu Mar 12 11:31:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.42 2020/03/11 02:33:18 roy Exp $ */ +/* $NetBSD: blacklistd.c,v 1.43 2020/03/12 11:31:23 roy Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.42 2020/03/11 02:33:18 roy Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.43 2020/03/12 11:31:23 roy Exp $"); #include #include @@ -119,14 +119,12 @@ getremoteaddress(bl_info_t *bi, struct s *rsl = sizeof(*rss); memset(rss, 0, *rsl); - if (bi->bi_fd != -1) { - if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) - return 0; - - if (errno != ENOTCONN) { - (*lfun)(LOG_ERR, "getpeername failed (%m)"); - return -1; - } + if (getpeername(bi->bi_fd, (void *)rss, rsl) != -1) + return 0; + + if (errno != ENOTCONN) { + (*lfun)(LOG_ERR, "getpeername failed (%m)"); + return -1; } if (bi->bi_slen == 0) { Index: src/external/bsd/blacklist/bin/conf.c diff -u src/external/bsd/blacklist/bin/conf.c:1.27 src/external/bsd/blacklist/bin/conf.c:1.28 --- src/external/bsd/blacklist/bin/conf.c:1.27 Wed Mar 11 02:12:08 2020 +++ src/external/bsd/blacklist/bin/conf.c Thu Mar 12 11:31:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.27 2020/03/11 02:12:08 roy Exp $ */ +/* $NetBSD: conf.c,v 1.28 2020/03/12 11:31:23 roy Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: conf.c,v 1.27 2020/03/11 02:12:08 roy Exp $"); +__RCSID("$NetBSD: conf.c,v 1.28 2020/03/12 11:31:23 roy Exp $"); #include #ifdef HAVE_LIBUTIL_H @@ -1009,14 +1009,6 @@ conf_find(int fd, uid_t uid, const struc char buf[BUFSIZ]; memset(cr, 0, sizeof(*cr)); - - if (fd == -1) { - cr->c_proto = FSTAR; - cr->c_port = FSTAR; - memcpy(, rss, sizeof(lss)); - goto done_fd; - } - slen = sizeof(lss); memset(, 0, slen); if (getsockname(fd, (void *), ) == -1) { @@ -1059,7 +1051,6 @@ conf_find(int fd, uid_t uid, const struc return NULL; } -done_fd: cr->c_ss = lss; cr->c_lmask = FSTAR; cr->c_uid = (int)uid; Index: src/external/bsd/blacklist/lib/bl.c diff -u src/external/bsd/blacklist/lib/bl.c:1.30 src/external/bsd/blacklist/lib/bl.c:1.31 --- src/external/bsd/blacklist/lib/bl.c:1.30 Wed Mar 11 02:12:08 2020 +++ src/external/bsd/blacklist/lib/bl.c Thu Mar 12 11:31:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bl.c,v 1.30 2020/03/11 02:12:08 roy Exp $ */ +/* $NetBSD: bl.c,v 1.31 2020/03/12 11:31:23 roy Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: bl.c,v 1.30 2020/03/11 02:12:08 roy Exp $"); +__RCSID("$NetBSD: bl.c,v 1.31 2020/03/12 11:31:23 roy Exp $"); #include #include @@ -384,6 +384,7 @@ bl_send(bl_t b, bl_type_t e, int pfd, co if (bl_getsock(b, _ss, sa, slen, ctx) == -1) return -1; + ub.bl.bl_salen = slen; memcpy(ub.bl.bl_data, ctx, ctxlen); @@ -393,17 +394,15 @@ bl_send(bl_t b, bl_type_t e, int pfd, co msg.msg_iovlen = 1; msg.msg_flags = 0; - if (pfd != -1) { - msg.msg_control = ua.ctrl; - msg.msg_controllen = sizeof(ua.ctrl); - - cmsg = CMSG_FIRSTHDR(); - cmsg->cmsg_len = CMSG_LEN(sizeof(int)); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; + msg.msg_control = ua.ctrl; + msg.msg_controllen = sizeof(ua.ctrl); + + cmsg = CMSG_FIRSTHDR(); + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; - memcpy(CMSG_DATA(cmsg), , sizeof(pfd)); - } + memcpy(CMSG_DATA(cmsg), , sizeof(pfd)); tried = 0; again: @@ -495,15 +494,14 @@ bl_recv(bl_t b) } - if (!(got & GOT_FD)) - bi->bi_fd = -1; - + if (got != (GOT_CRED|GOT_FD)) { + bl_log(b->b_fun, LOG_ERR, "message missing %s %s", #if GOT_CRED != 0 - if (!(got & GOT_CRED)) { - bl_log(b->b_fun, LOG_ERR, "message missing cred"); + (got & GOT_CRED) == 0 ? "cred" : +#endif + "", (got & GOT_FD) == 0 ? "fd" : ""); return NULL; } -#endif if ((size_t)rlen <= sizeof(ub.bl)) { bl_log(b->b_fun,
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Thu Mar 12 10:44:00 UTC 2020 Modified Files: src/sys/kern: sched_4bsd.c Log Message: Put back missing set of SPCF_SHOULDYIELD. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/kern/sched_4bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sched_4bsd.c diff -u src/sys/kern/sched_4bsd.c:1.42 src/sys/kern/sched_4bsd.c:1.43 --- src/sys/kern/sched_4bsd.c:1.42 Thu Jan 9 16:35:03 2020 +++ src/sys/kern/sched_4bsd.c Thu Mar 12 10:44:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sched_4bsd.c,v 1.42 2020/01/09 16:35:03 ad Exp $ */ +/* $NetBSD: sched_4bsd.c,v 1.43 2020/03/12 10:44:00 ad Exp $ */ /* * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2019, 2020 @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sched_4bsd.c,v 1.42 2020/01/09 16:35:03 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sched_4bsd.c,v 1.43 2020/03/12 10:44:00 ad Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" @@ -147,6 +147,7 @@ sched_tick(struct cpu_info *ci) * Indicate that the process should yield. */ pri = MAXPRI_KTHREAD; + spc->spc_flags |= SPCF_SHOULDYIELD; } else if ((spc->spc_flags & SPCF_1STCLASS) == 0) { /* * For SMT or assymetric systems push a little @@ -154,6 +155,7 @@ sched_tick(struct cpu_info *ci) * find a better one to run this LWP. */ pri = MAXPRI_KTHREAD; + spc->spc_flags |= SPCF_SHOULDYIELD; } else { spc->spc_flags |= SPCF_SEENRR; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: yamaguchi Date: Thu Mar 12 09:38:11 UTC 2020 Modified Files: src/sys/dev/pci: if_ixl.c Log Message: hold the lock for struct ixl_softc during read or write to sc->sc_media_* OKed by knakahara@n.o To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/if_ixl.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_ixl.c diff -u src/sys/dev/pci/if_ixl.c:1.61 src/sys/dev/pci/if_ixl.c:1.62 --- src/sys/dev/pci/if_ixl.c:1.61 Thu Mar 12 09:34:41 2020 +++ src/sys/dev/pci/if_ixl.c Thu Mar 12 09:38:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ixl.c,v 1.61 2020/03/12 09:34:41 yamaguchi Exp $ */ +/* $NetBSD: if_ixl.c,v 1.62 2020/03/12 09:38:10 yamaguchi Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.61 2020/03/12 09:34:41 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.62 2020/03/12 09:38:10 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -800,7 +800,7 @@ static void ixl_get_link_status(void *); static int ixl_get_link_status_poll(struct ixl_softc *, int *); static void ixl_get_link_status_done(struct ixl_softc *, const struct ixl_aq_desc *); -static int ixl_set_link_status(struct ixl_softc *, +static int ixl_set_link_status_locked(struct ixl_softc *, const struct ixl_aq_desc *); static uint64_t ixl_search_link_speed(uint8_t); static uint8_t ixl_search_baudrate(uint64_t); @@ -1686,8 +1686,10 @@ ixl_media_status(struct ifnet *ifp, stru { struct ixl_softc *sc = ifp->if_softc; + mutex_enter(>sc_cfg_lock); ifmr->ifm_status = sc->sc_media_status; ifmr->ifm_active = sc->sc_media_active; + mutex_exit(>sc_cfg_lock); } static int @@ -3645,8 +3647,17 @@ static void ixl_get_link_status_done(struct ixl_softc *sc, const struct ixl_aq_desc *iaq) { + struct ixl_aq_desc iaq_buf; - ixl_link_state_update(sc, iaq); + memcpy(_buf, iaq, sizeof(iaq_buf)); + + /* + * The lock can be released here + * because there is no post processing about ATQ + */ + mutex_exit(>sc_atq_lock); + ixl_link_state_update(sc, _buf); + mutex_enter(>sc_atq_lock); } static void @@ -3666,11 +3677,12 @@ ixl_get_link_status(void *xsc) param->notify = IXL_AQ_LINK_NOTIFY; error = ixl_atq_exec_locked(sc, >sc_link_state_atq); + ixl_atq_set(>sc_link_state_atq, ixl_get_link_status_done); + if (error == 0) { ixl_get_link_status_done(sc, iaq); } - ixl_atq_set(>sc_link_state_atq, ixl_get_link_status_done); mutex_exit(>sc_atq_lock); } @@ -3681,15 +3693,17 @@ ixl_link_state_update(struct ixl_softc * struct ifnet *ifp = >sc_ec.ec_if; int link_state; - KASSERT(kpreempt_disabled()); - - link_state = ixl_set_link_status(sc, iaq); + mutex_enter(>sc_cfg_lock); + link_state = ixl_set_link_status_locked(sc, iaq); + mutex_exit(>sc_cfg_lock); if (ifp->if_link_state != link_state) if_link_state_change(ifp, link_state); if (link_state != LINK_STATE_DOWN) { + kpreempt_disable(); if_schedule_deferred_start(ifp); + kpreempt_enable(); } } @@ -3751,9 +3765,7 @@ ixl_arq(void *xsc) switch (iaq->iaq_opcode) { case htole16(IXL_AQ_OP_PHY_LINK_STATUS): - kpreempt_disable(); ixl_link_state_update(sc, iaq); - kpreempt_enable(); break; } @@ -4500,7 +4512,8 @@ ixl_get_link_status_poll(struct ixl_soft return EIO; } - link = ixl_set_link_status(sc, ); + /* It is unneccessary to hold lock */ + link = ixl_set_link_status_locked(sc, ); if (l != NULL) *l = link; @@ -5690,7 +5703,7 @@ out: } static int -ixl_set_link_status(struct ixl_softc *sc, const struct ixl_aq_desc *iaq) +ixl_set_link_status_locked(struct ixl_softc *sc, const struct ixl_aq_desc *iaq) { const struct ixl_aq_link_status *status; const struct ixl_phy_type *itype; @@ -5722,6 +5735,7 @@ ixl_set_link_status(struct ixl_softc *sc baudrate = ixl_search_link_speed(status->link_speed); done: + /* sc->sc_cfg_lock held expect during attach */ sc->sc_media_active = ifm_active; sc->sc_media_status = ifm_status;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: yamaguchi Date: Thu Mar 12 09:34:41 UTC 2020 Modified Files: src/sys/dev/pci: if_ixl.c Log Message: remove unnecessary code because IFM_ACTIVE is setted in ixl_set_link_status() OKed by knakahara@n.o To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/if_ixl.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_ixl.c diff -u src/sys/dev/pci/if_ixl.c:1.60 src/sys/dev/pci/if_ixl.c:1.61 --- src/sys/dev/pci/if_ixl.c:1.60 Tue Mar 3 04:55:46 2020 +++ src/sys/dev/pci/if_ixl.c Thu Mar 12 09:34:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ixl.c,v 1.60 2020/03/03 04:55:46 yamaguchi Exp $ */ +/* $NetBSD: if_ixl.c,v 1.61 2020/03/12 09:34:41 yamaguchi Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.60 2020/03/03 04:55:46 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.61 2020/03/12 09:34:41 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1688,11 +1688,6 @@ ixl_media_status(struct ifnet *ifp, stru ifmr->ifm_status = sc->sc_media_status; ifmr->ifm_active = sc->sc_media_active; - - mutex_enter(>sc_cfg_lock); - if (ifp->if_link_state == LINK_STATE_UP) - SET(ifmr->ifm_status, IFM_ACTIVE); - mutex_exit(>sc_cfg_lock); } static int