CVS commit: src/common/lib/libc/stdlib
Module Name:src Committed By: roy Date: Thu Nov 28 12:33:23 UTC 2019 Modified Files: src/common/lib/libc/stdlib: strtoi.c strtou.c Log Message: Make it easier to use strtoi and strtou in downsteam applications without the need to define HAVE_NBTOOL_CONFIG_H and yet allow -Wundef not to log any warnings. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/stdlib/strtoi.c \ src/common/lib/libc/stdlib/strtou.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/stdlib/strtoi.c diff -u src/common/lib/libc/stdlib/strtoi.c:1.2 src/common/lib/libc/stdlib/strtoi.c:1.3 --- src/common/lib/libc/stdlib/strtoi.c:1.2 Fri May 1 14:17:56 2015 +++ src/common/lib/libc/stdlib/strtoi.c Thu Nov 28 12:33:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: strtoi.c,v 1.2 2015/05/01 14:17:56 christos Exp $ */ +/* $NetBSD: strtoi.c,v 1.3 2019/11/28 12:33:23 roy Exp $ */ /*- * Copyright (c) 2005 The DragonFly Project. All rights reserved. @@ -30,12 +30,12 @@ * NetBSD: src/common/lib/libc/stdlib/strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp */ -#if HAVE_NBTOOL_CONFIG_H +#if defined(HAVE_NBTOOL_CONFIG_H) && HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif #include -__RCSID("$NetBSD: strtoi.c,v 1.2 2015/05/01 14:17:56 christos Exp $"); +__RCSID("$NetBSD: strtoi.c,v 1.3 2019/11/28 12:33:23 roy Exp $"); #ifdef _LIBC #include "namespace.h" Index: src/common/lib/libc/stdlib/strtou.c diff -u src/common/lib/libc/stdlib/strtou.c:1.2 src/common/lib/libc/stdlib/strtou.c:1.3 --- src/common/lib/libc/stdlib/strtou.c:1.2 Fri May 1 14:17:56 2015 +++ src/common/lib/libc/stdlib/strtou.c Thu Nov 28 12:33:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: strtou.c,v 1.2 2015/05/01 14:17:56 christos Exp $ */ +/* $NetBSD: strtou.c,v 1.3 2019/11/28 12:33:23 roy Exp $ */ /*- * Copyright (c) 2005 The DragonFly Project. All rights reserved. @@ -30,12 +30,12 @@ * NetBSD: src/common/lib/libc/stdlib/strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp */ -#if HAVE_NBTOOL_CONFIG_H +#if defined(HAVE_NBTOOL_CONFIG_H) && HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif #include -__RCSID("$NetBSD: strtou.c,v 1.2 2015/05/01 14:17:56 christos Exp $"); +__RCSID("$NetBSD: strtou.c,v 1.3 2019/11/28 12:33:23 roy Exp $"); #ifdef _LIBC #include "namespace.h"
CVS commit: src/common/lib/libc/stdlib
Module Name:src Committed By: roy Date: Thu Nov 28 12:33:23 UTC 2019 Modified Files: src/common/lib/libc/stdlib: strtoi.c strtou.c Log Message: Make it easier to use strtoi and strtou in downsteam applications without the need to define HAVE_NBTOOL_CONFIG_H and yet allow -Wundef not to log any warnings. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/stdlib/strtoi.c \ src/common/lib/libc/stdlib/strtou.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: msaitoh Date: Thu Nov 28 14:08:22 UTC 2019 Modified Files: src/sys/net: if_media.h Log Message: Fix comment. The ifm_media member of struct ifmedia is NOT user-set media word but the current "active" media. The user-set media word is one of the ifmedia_entry's ifm_media(A) that ifm_cur points to (e.g. IFM_AUTO). It can be taken as ifmediareq's ifm_current entry. The current active media word is the ifm_media(B) entry of struct ifmedia (e.g 1000baseTX-FDX as the result of auto negotiation). It can be taken as ifmediareq's ifm_active entry. struct ifmedia_entry { TAILQ_ENTRY(ifmedia_entry) ifm_list; u_int ifm_media; /* IFMWD: description of this media */ /* A */ u_int ifm_data; /* for driver-specific use */ void*ifm_aux; /* for driver-specific use */ }; struct ifmedia { u_int ifm_mask; /* IFMWD: mask of changes we don't care */ u_int ifm_media; /* IFMWD: current active media word */ /* B */ struct ifmedia_entry *ifm_cur; /* current user-selected media */ TAILQ_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */ ifm_change_cb_t ifm_change; /* media change driver callback */ ifm_stat_cb_t ifm_status; /* media status driver callback */ }; So: in kernel SIOCGIFMEDIA(ifmediareq) - user-setting: ifm->ifm_cur->ifm_media ifm_current current active: ifm->ifm_media ifm_active It would be good to rename some members to make those meaning clear. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/net/if_media.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: msaitoh Date: Thu Nov 28 14:08:22 UTC 2019 Modified Files: src/sys/net: if_media.h Log Message: Fix comment. The ifm_media member of struct ifmedia is NOT user-set media word but the current "active" media. The user-set media word is one of the ifmedia_entry's ifm_media(A) that ifm_cur points to (e.g. IFM_AUTO). It can be taken as ifmediareq's ifm_current entry. The current active media word is the ifm_media(B) entry of struct ifmedia (e.g 1000baseTX-FDX as the result of auto negotiation). It can be taken as ifmediareq's ifm_active entry. struct ifmedia_entry { TAILQ_ENTRY(ifmedia_entry) ifm_list; u_int ifm_media; /* IFMWD: description of this media */ /* A */ u_int ifm_data; /* for driver-specific use */ void*ifm_aux; /* for driver-specific use */ }; struct ifmedia { u_int ifm_mask; /* IFMWD: mask of changes we don't care */ u_int ifm_media; /* IFMWD: current active media word */ /* B */ struct ifmedia_entry *ifm_cur; /* current user-selected media */ TAILQ_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */ ifm_change_cb_t ifm_change; /* media change driver callback */ ifm_stat_cb_t ifm_status; /* media status driver callback */ }; So: in kernel SIOCGIFMEDIA(ifmediareq) - user-setting: ifm->ifm_cur->ifm_media ifm_current current active: ifm->ifm_media ifm_active It would be good to rename some members to make those meaning clear. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/net/if_media.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_media.h diff -u src/sys/net/if_media.h:1.66 src/sys/net/if_media.h:1.67 --- src/sys/net/if_media.h:1.66 Thu Oct 3 14:41:14 2019 +++ src/sys/net/if_media.h Thu Nov 28 14:08:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_media.h,v 1.66 2019/10/03 14:41:14 jmcneill Exp $ */ +/* $NetBSD: if_media.h,v 1.67 2019/11/28 14:08:22 msaitoh Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -872,7 +872,7 @@ typedef void (*ifm_stat_cb_t)(struct ifn */ struct ifmedia_entry { TAILQ_ENTRY(ifmedia_entry) ifm_list; - u_int ifm_media; /* description of this media attachment */ + u_int ifm_media; /* IFMWD: description of this media */ u_int ifm_data; /* for driver-specific use */ void *ifm_aux; /* for driver-specific use */ }; @@ -882,9 +882,9 @@ struct ifmedia_entry { * It is used to keep general media state. */ struct ifmedia { - u_int ifm_mask; /* mask of changes we don't care about */ - u_int ifm_media; /* current user-set media word */ - struct ifmedia_entry *ifm_cur; /* currently selected media */ + u_int ifm_mask; /* IFMWD: mask of changes we don't care */ + u_int ifm_media; /* IFMWD: current active media word */ + struct ifmedia_entry *ifm_cur; /* current user-selected media */ TAILQ_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */ ifm_change_cb_t ifm_change; /* media change driver callback */ ifm_stat_cb_t ifm_status; /* media status driver callback */
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Nov 28 14:13:37 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_com.c Log Message: Remove FDT_INTR_MPSAFE flag. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Nov 28 14:13:37 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_com.c Log Message: Remove FDT_INTR_MPSAFE flag. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/fdt/imx6_com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/imx/fdt/imx6_com.c diff -u src/sys/arch/arm/imx/fdt/imx6_com.c:1.1 src/sys/arch/arm/imx/fdt/imx6_com.c:1.2 --- src/sys/arch/arm/imx/fdt/imx6_com.c:1.1 Wed Jul 24 13:12:33 2019 +++ src/sys/arch/arm/imx/fdt/imx6_com.c Thu Nov 28 14:13:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_com.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/* $NetBSD: imx6_com.c,v 1.2 2019/11/28 14:13:37 hkenken Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. * Written by Hashimoto Kenichi for Genetec Corporation. @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_com.c,v 1.1 2019/07/24 13:12:33 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_com.c,v 1.2 2019/11/28 14:13:37 hkenken Exp $"); #include "opt_fdt.h" #include "opt_imxuart.h" @@ -99,9 +99,11 @@ imx6_com_attach(device_t parent, device_ } sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SERIAL, - FDT_INTR_MPSAFE, imxuintr, sc); - if (sc->sc_ih == NULL) + 0, imxuintr, sc); + if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt\n"); + return; + } aprint_normal_dev(self, "interrupting on %s\n", intrstr);
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: martin Date: Thu Nov 28 14:21:25 UTC 2019 Modified Files: src/sys/arch/sparc/stand/ofwboot: srt0.s Log Message: Provide a mostly-zeroed page at the start of the text segment, to work around an OpenBIOS bug, see PR port-sparc64/54719 for details. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/srt0.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/stand/ofwboot/srt0.s diff -u src/sys/arch/sparc/stand/ofwboot/srt0.s:1.7 src/sys/arch/sparc/stand/ofwboot/srt0.s:1.8 --- src/sys/arch/sparc/stand/ofwboot/srt0.s:1.7 Sun Aug 23 10:59:15 2015 +++ src/sys/arch/sparc/stand/ofwboot/srt0.s Thu Nov 28 14:21:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: srt0.s,v 1.7 2015/08/23 10:59:15 joerg Exp $ */ +/* $NetBSD: srt0.s,v 1.8 2019/11/28 14:21:25 martin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -63,7 +63,10 @@ _esym: .word 0 /* end of symbol table _C_LABEL(kernel_text) = _start _start: nop ! For some reason this is needed to fixup the text section - + b 1f + nop + .zero 8192-(.-_start) /* hack for OpenBIOS, see port-sparc64/54719 */ +1: /* * Start by creating a stack for ourselves. */
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: martin Date: Thu Nov 28 14:21:25 UTC 2019 Modified Files: src/sys/arch/sparc/stand/ofwboot: srt0.s Log Message: Provide a mostly-zeroed page at the start of the text segment, to work around an OpenBIOS bug, see PR port-sparc64/54719 for details. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/srt0.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/arm/broadcom
> On Nov 28, 2019, at 2:21 AM, Jared McNeill wrote: > > I should have commented the code in gicv3 so that you would have realized it > was “unnecessarily complicated” for a reason :) Ok, I'll fix and add a comment. > > The interrupt_distribute(9) API makes an assumption that the return value of > anything_intr_establish can be used as input for the MD interrupt_distribute > implementation. For arm pic, struct intrsource * made most sense. It is a bit > of a hassle for fdtbus and really shows the need for an MI interrupt API. > > So where this breaks things is if you have something in the kernel do: > > Ih = fdtbus_intr_establish(…) > interrupt_distribute(ih, target, NULL) > > Currently the only place where this can happen is arch/arm/fdt/pmu_fdt.c but > IMHO the code is perfectly valid and could appear in other places in the > future. -- thorpej
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: thorpej Date: Thu Nov 28 15:35:51 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm2835_intr.c Log Message: Jared points out that interrupt_distribute(9) assumes that any interrupt handle can be used as an input to the MD interrupt_distribute implementation so we are forced to return the handle we got back from intr_establish(). Upshot is that the input to bcm2835_icu_fdt_disestablish() is ambiguous for shared IRQs, rendering them un-disestablishable. While here, make sure to actually bump the intr_refcnt, and add an assertion on the value we get back from bcm2835_icu_fdt_decode_irq(). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/broadcom/bcm2835_intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm2835_intr.c diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.25 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.26 --- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.25 Thu Nov 28 01:08:06 2019 +++ src/sys/arch/arm/broadcom/bcm2835_intr.c Thu Nov 28 15:35:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_intr.c,v 1.25 2019/11/28 01:08:06 thorpej Exp $ */ +/* $NetBSD: bcm2835_intr.c,v 1.26 2019/11/28 15:35:51 thorpej Exp $ */ /*- * Copyright (c) 2012, 2015, 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.25 2019/11/28 01:08:06 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.26 2019/11/28 15:35:51 thorpej Exp $"); #define _INTR_PRIVATE @@ -473,6 +473,8 @@ bcm2835_icu_fdt_establish(device_t dev, if (irq == -1) return NULL; + KASSERT(irq < BCM2835_NIRQ); + firq = sc->sc_irq[irq]; if (firq == NULL) { firq = kmem_alloc(sizeof(*firq), KM_SLEEP); @@ -517,31 +519,54 @@ bcm2835_icu_fdt_establish(device_t dev, firqh->ih_irq = firq; firqh->ih_fn = func; firqh->ih_arg = arg; + + firq->intr_refcnt++; TAILQ_INSERT_TAIL(&firq->intr_handlers, firqh, ih_next); - return firqh; + /* + * XXX interrupt_distribute(9) assumes that any interrupt + * handle can be used as an input to the MD interrupt_distribute + * implementationm, so we are forced to return the handle + * we got back from intr_establish(). Upshot is that the + * input to bcm2835_icu_fdt_disestablish() is ambiguous for + * shared IRQs, rendering them un-disestablishable. + */ + + return firq->intr_ih; } static void bcm2835_icu_fdt_disestablish(device_t dev, void *ih) { struct bcm2835icu_softc * const sc = device_private(dev); - struct bcm2835icu_irqhandler *firqh = ih; - struct bcm2835icu_irq *firq = firqh->ih_irq; + struct bcm2835icu_irqhandler *firqh; + struct bcm2835icu_irq *firq; + u_int n; - KASSERT(firq->intr_refcnt > 0); + for (n = 0; n < BCM2835_NIRQ; n++) { + firq = sc->sc_irq[n]; + if (firq == NULL || firq->intr_ih != ih) + continue; + + KASSERT(firq->intr_refcnt > 0); + + /* XXX see above */ + if (firq->intr_refcnt > 1) + panic("%s: cannot disestablish shared irq", __func__); - /* XXX */ - if (firq->intr_refcnt > 1) - panic("%s: cannot disestablish shared irq", __func__); + intr_disestablish(firq->intr_ih); - intr_disestablish(firq->intr_ih); + firqh = TAILQ_FIRST(&firq->intr_handlers); + TAILQ_REMOVE(&firq->intr_handlers, firqh, ih_next); + kmem_free(firqh, sizeof(*firqh)); - TAILQ_REMOVE(&firq->intr_handlers, firqh, ih_next); - kmem_free(firqh, sizeof(*firqh)); + sc->sc_irq[firq->intr_irq] = NULL; + kmem_free(firq, sizeof(*firq)); + + return; + } - sc->sc_irq[firq->intr_irq] = NULL; - kmem_free(firq, sizeof(*firq)); + panic("%s: interrupt not established", __func__); } static int
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: thorpej Date: Thu Nov 28 15:35:51 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm2835_intr.c Log Message: Jared points out that interrupt_distribute(9) assumes that any interrupt handle can be used as an input to the MD interrupt_distribute implementation so we are forced to return the handle we got back from intr_establish(). Upshot is that the input to bcm2835_icu_fdt_disestablish() is ambiguous for shared IRQs, rendering them un-disestablishable. While here, make sure to actually bump the intr_refcnt, and add an assertion on the value we get back from bcm2835_icu_fdt_decode_irq(). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/broadcom/bcm2835_intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Nov 28 16:02:07 UTC 2019 Modified Files: src/sys/dev/pci: if_mcx.c Log Message: - Change IFM_10G_T(10GBase-T) entry to IFM_10G_CR1(10GBASE-CR1) - Add the following entries: 20GBASE-KR2 56GBASE-R4 100GBASE-LR4 100BaseTX 1000baseT 10GBase-T To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_mcx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Nov 28 16:02:07 UTC 2019 Modified Files: src/sys/dev/pci: if_mcx.c Log Message: - Change IFM_10G_T(10GBase-T) entry to IFM_10G_CR1(10GBASE-CR1) - Add the following entries: 20GBASE-KR2 56GBASE-R4 100GBASE-LR4 100BaseTX 1000baseT 10GBase-T To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_mcx.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_mcx.c diff -u src/sys/dev/pci/if_mcx.c:1.7 src/sys/dev/pci/if_mcx.c:1.8 --- src/sys/dev/pci/if_mcx.c:1.7 Tue Nov 26 10:33:19 2019 +++ src/sys/dev/pci/if_mcx.c Thu Nov 28 16:02:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mcx.c,v 1.7 2019/11/26 10:33:19 jmcneill Exp $ */ +/* $NetBSD: if_mcx.c,v 1.8 2019/11/28 16:02:07 msaitoh Exp $ */ /* $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */ /* @@ -159,8 +159,10 @@ #define MCX_ETHER_CAP_10G_CX4 (1 << 2) #define MCX_ETHER_CAP_10G_KX4 (1 << 3) #define MCX_ETHER_CAP_10G_KR (1 << 4) +#define MCX_ETHER_CAP_20G_KR2 (1 << 5) #define MCX_ETHER_CAP_40G_CR4 (1 << 6) #define MCX_ETHER_CAP_40G_KR4 (1 << 7) +#define MCX_ETHER_CAP_56G_R4 (1 << 8) #define MCX_ETHER_CAP_10G_CR (1 << 12) #define MCX_ETHER_CAP_10G_SR (1 << 13) #define MCX_ETHER_CAP_10G_LR (1 << 14) @@ -170,6 +172,10 @@ #define MCX_ETHER_CAP_100G_CR4 (1 << 20) #define MCX_ETHER_CAP_100G_SR4 (1 << 21) #define MCX_ETHER_CAP_100G_KR4 (1 << 22) +#define MCX_ETHER_CAP_100G_LR4 (1 << 23) +#define MCX_ETHER_CAP_100_TX (1 << 24) +#define MCX_ETHER_CAP_1000_T (1 << 25) +#define MCX_ETHER_CAP_10G_T (1 << 26) #define MCX_ETHER_CAP_25G_CR (1 << 27) #define MCX_ETHER_CAP_25G_KR (1 << 28) #define MCX_ETHER_CAP_25G_SR (1 << 29) @@ -2146,14 +2152,14 @@ static const uint64_t mcx_eth_cap_map[] IFM_10G_CX4, IFM_10G_KX4, IFM_10G_KR, - 0, + IFM_20G_KR2, IFM_40G_CR4, IFM_40G_KR4, + IFM_56G_R4, 0, 0, 0, - 0, - IFM_10G_T, + IFM_10G_CR1, IFM_10G_SR, IFM_10G_LR, IFM_40G_SR4, @@ -2164,10 +2170,10 @@ static const uint64_t mcx_eth_cap_map[] IFM_100G_CR4, IFM_100G_SR4, IFM_100G_KR4, - 0, - 0, - 0, - 0, + IFM_100G_LR4, + IFM_100_TX, + IFM_1000_T, + IFM_10G_T, IFM_25G_CR, IFM_25G_KR, IFM_25G_SR,
CVS commit: src/sys/dev
Module Name:src Committed By: maxv Date: Thu Nov 28 17:09:10 UTC 2019 Modified Files: src/sys/dev/pci: if_et.c if_msk.c if_sk.c mpii.c src/sys/dev/pcmcia: if_xi.c src/sys/dev/usb: if_atu.c if_urtw.c if_zyd.c Log Message: localify To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/if_et.c cvs rdiff -u -r1.94 -r1.95 src/sys/dev/pci/if_msk.c cvs rdiff -u -r1.101 -r1.102 src/sys/dev/pci/if_sk.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/mpii.c cvs rdiff -u -r1.91 -r1.92 src/sys/dev/pcmcia/if_xi.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/if_urtw.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/usb/if_zyd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: maxv Date: Thu Nov 28 17:09:10 UTC 2019 Modified Files: src/sys/dev/pci: if_et.c if_msk.c if_sk.c mpii.c src/sys/dev/pcmcia: if_xi.c src/sys/dev/usb: if_atu.c if_urtw.c if_zyd.c Log Message: localify To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/if_et.c cvs rdiff -u -r1.94 -r1.95 src/sys/dev/pci/if_msk.c cvs rdiff -u -r1.101 -r1.102 src/sys/dev/pci/if_sk.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/mpii.c cvs rdiff -u -r1.91 -r1.92 src/sys/dev/pcmcia/if_xi.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/usb/if_atu.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/if_urtw.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/usb/if_zyd.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_et.c diff -u src/sys/dev/pci/if_et.c:1.27 src/sys/dev/pci/if_et.c:1.28 --- src/sys/dev/pci/if_et.c:1.27 Sat Oct 12 06:00:52 2019 +++ src/sys/dev/pci/if_et.c Thu Nov 28 17:09:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_et.c,v 1.27 2019/10/12 06:00:52 msaitoh Exp $ */ +/* $NetBSD: if_et.c,v 1.28 2019/11/28 17:09:10 maxv Exp $ */ /* $OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.27 2019/10/12 06:00:52 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.28 2019/11/28 17:09:10 maxv Exp $"); #include "opt_inet.h" #include "vlan.h" @@ -81,63 +81,62 @@ __KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1. #include -int et_match(device_t, cfdata_t, void *); -void et_attach(device_t, device_t, void *); -int et_detach(device_t, int); -int et_shutdown(device_t); - -int et_miibus_readreg(device_t, int, int, uint16_t *); -int et_miibus_writereg(device_t, int, int, uint16_t); -void et_miibus_statchg(struct ifnet *); - -int et_init(struct ifnet *); -int et_ioctl(struct ifnet *, u_long, void *); -void et_start(struct ifnet *); -void et_watchdog(struct ifnet *); +static int et_match(device_t, cfdata_t, void *); +static void et_attach(device_t, device_t, void *); +static int et_detach(device_t, int); + +static int et_miibus_readreg(device_t, int, int, uint16_t *); +static int et_miibus_writereg(device_t, int, int, uint16_t); +static void et_miibus_statchg(struct ifnet *); + +static int et_init(struct ifnet *); +static int et_ioctl(struct ifnet *, u_long, void *); +static void et_start(struct ifnet *); +static void et_watchdog(struct ifnet *); static int et_ifmedia_upd(struct ifnet *); static void et_ifmedia_sts(struct ifnet *, struct ifmediareq *); -int et_intr(void *); -void et_enable_intrs(struct et_softc *, uint32_t); -void et_disable_intrs(struct et_softc *); -void et_rxeof(struct et_softc *); -void et_txeof(struct et_softc *); -void et_txtick(void *); - -int et_dma_alloc(struct et_softc *); -void et_dma_free(struct et_softc *); -int et_dma_mem_create(struct et_softc *, bus_size_t, +static int et_intr(void *); +static void et_enable_intrs(struct et_softc *, uint32_t); +static void et_disable_intrs(struct et_softc *); +static void et_rxeof(struct et_softc *); +static void et_txeof(struct et_softc *); +static void et_txtick(void *); + +static int et_dma_alloc(struct et_softc *); +static void et_dma_free(struct et_softc *); +static int et_dma_mem_create(struct et_softc *, bus_size_t, void **, bus_addr_t *, bus_dmamap_t *, bus_dma_segment_t *); -void et_dma_mem_destroy(struct et_softc *, void *, bus_dmamap_t); -int et_dma_mbuf_create(struct et_softc *); -void et_dma_mbuf_destroy(struct et_softc *, int, const int[]); - -int et_init_tx_ring(struct et_softc *); -int et_init_rx_ring(struct et_softc *); -void et_free_tx_ring(struct et_softc *); -void et_free_rx_ring(struct et_softc *); -int et_encap(struct et_softc *, struct mbuf **); -int et_newbuf(struct et_rxbuf_data *, int, int, int); -int et_newbuf_cluster(struct et_rxbuf_data *, int, int); -int et_newbuf_hdr(struct et_rxbuf_data *, int, int); - -void et_stop(struct et_softc *); -int et_chip_init(struct et_softc *); -void et_chip_attach(struct et_softc *); -void et_init_mac(struct et_softc *); -void et_init_rxmac(struct et_softc *); -void et_init_txmac(struct et_softc *); -int et_init_rxdma(struct et_softc *); -int et_init_txdma(struct et_softc *); -int et_start_rxdma(struct et_softc *); -int et_start_txdma(struct et_softc *); -int et_stop_rxdma(struct et_softc *); -int et_stop_txdma(struct et_softc *); -void et_reset(struct et_softc *); -int et_bus_config(struct et_softc *); -void et_get_eaddr(struct et_softc *, uint8_t[]); -void et_setmulti(struct et_softc *); -void et_tick(void *); +static void et_dma_mem_destroy(struct et_softc *, void *, bus_dmamap_t); +static int et_dma_mbuf_create(struct et_softc *); +static void et_dma_mbuf_destroy(struct et_softc *, int, const int[]); + +static int et_init_tx_ring(struct et_softc *); +static int et_init
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Thu Nov 28 19:31:27 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc8 Log Message: note that earm and riscv switched to GCC 8. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/README.gcc8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Thu Nov 28 19:31:27 UTC 2019 Modified Files: src/external/gpl3/gcc: README.gcc8 Log Message: note that earm and riscv switched to GCC 8. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/README.gcc8 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/gcc/README.gcc8 diff -u src/external/gpl3/gcc/README.gcc8:1.5 src/external/gpl3/gcc/README.gcc8:1.6 --- src/external/gpl3/gcc/README.gcc8:1.5 Mon Nov 18 01:13:39 2019 +++ src/external/gpl3/gcc/README.gcc8 Thu Nov 28 19:31:27 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc8,v 1.5 2019/11/18 01:13:39 mrg Exp $ +$NetBSD: README.gcc8,v 1.6 2019/11/28 19:31:27 mrg Exp $ new stuff: cc1objcplus @@ -28,20 +28,20 @@ architecture tools kernels libgcc native - --- -- -- --- aarch64 y y y y y y y y alpha y y y y y ? ? ? -earmv4 y y y y y y ? ? -earmv4eb y ? y y ? ? ? ? -earm y ? y y ? ? ? ? -earmeb y ? y y ? ? ? ? -earmhf y ? y y ? ? ? ? -earmhfeb y ? y y ? ? ? ? -earmv6 y ? y y ? ? ? ? -earmv6eb y ? y y ? ? ? ? -earmv6hf y ? y y ? ? ? ? -earmv6hfeb y ? y y ? ? ? ? -earmv7 y ? y y ? ? ? ? -earmv7eb y ? y y ? ? ? ? -earmv7hf y y y y y y n[3] n -earmv7hfeb y ? y y ? ? ? ? +earmv4 y y y y y y ? y +earmv4eb y ? y y ? ? ? y +earm y ? y y ? ? ? y +earmeb y ? y y ? ? ? y +earmhf y ? y y ? ? ? y +earmhfeb y ? y y ? ? ? y +earmv6 y ? y y ? ? ? y +earmv6eb y ? y y ? ? ? y +earmv6hf y ? y y ? ? ? y +earmv6hfeb y ? y y ? ? ? y +earmv7 y ? y y ? ? ? y +earmv7eb y ? y y ? ? ? y +earmv7hf y y y y y y n[3] y +earmv7hfeb y ? y y ? ? ? y hppa y ? y y ? ? ? ? i386 y y y y y y y y ia64 y y y y y y n[4] y @@ -59,8 +59,8 @@ sparc y y y y y y y y sparc64 y y y y y y y y vax y ? ? y ? ? ? ? x86_64 y y y y y y y y -riscv32 y ? y y y ? ? ? -riscv64 y ? y y y ? ? ? +riscv32 y ? y y y ? ? y +riscv64 y ? y y y ? ? y -- coldfire ? N/A ? ? ? N/A N/A - --- -- -- ---
CVS commit: src/distrib/notes/common
Module Name:src Committed By: uwe Date: Thu Nov 28 19:53:04 UTC 2019 Modified Files: src/distrib/notes/common: macros Log Message: Fix typo in register name in previous. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/distrib/notes/common/macros Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: uwe Date: Thu Nov 28 19:53:04 UTC 2019 Modified Files: src/distrib/notes/common: macros Log Message: Fix typo in register name in previous. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/distrib/notes/common/macros Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/macros diff -u src/distrib/notes/common/macros:1.49 src/distrib/notes/common/macros:1.50 --- src/distrib/notes/common/macros:1.49 Thu Nov 28 00:06:39 2019 +++ src/distrib/notes/common/macros Thu Nov 28 19:53:04 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: macros,v 1.49 2019/11/28 00:06:39 uwe Exp $ +.\" $NetBSD: macros,v 1.50 2019/11/28 19:53:04 uwe Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -316,7 +316,7 @@ .de mktoc .nr mktoc-level \\$1 .shift -.write toc-tmp .Ti \\n[toc-level] \\n% "\\$*" +.write toc-tmp .Ti \\n[mktoc-level] \\n% "\\$*" .. .rn Ss Ss-toc .de Ss
CVS commit: src/distrib/notes/common
Module Name:src Committed By: uwe Date: Thu Nov 28 19:59:48 UTC 2019 Modified Files: src/distrib/notes/common: macros Log Message: Don't emit page numbers in TOC for HTML, they are meaningless. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/distrib/notes/common/macros Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: uwe Date: Thu Nov 28 19:59:48 UTC 2019 Modified Files: src/distrib/notes/common: macros Log Message: Don't emit page numbers in TOC for HTML, they are meaningless. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/distrib/notes/common/macros Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/macros diff -u src/distrib/notes/common/macros:1.50 src/distrib/notes/common/macros:1.51 --- src/distrib/notes/common/macros:1.50 Thu Nov 28 19:53:04 2019 +++ src/distrib/notes/common/macros Thu Nov 28 19:59:48 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: macros,v 1.50 2019/11/28 19:53:04 uwe Exp $ +.\" $NetBSD: macros,v 1.51 2019/11/28 19:59:48 uwe Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -343,8 +343,8 @@ .if dTOC .mktoc \\n[To-toc-level] \\$@ .. .de Ti -.ie rHTML \{.ta (\n(.lu+\w''u)R -\h'3n*\\$1u' \\$3\a\\$2 +.ie rHTML \{\ +\h'3n*\\$1u' \\$3 .\} .el \h'3n*\\$1u' \\$3\a\\$2 ..
CVS commit: src/external/apache2/llvm
Module Name:src Committed By: joerg Date: Thu Nov 28 23:01:22 UTC 2019 Modified Files: src/external/apache2/llvm: Makefile.inc Log Message: Use -fno-strict-aliasing unconditionally for the cross compiler. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/apache2/llvm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/llvm/Makefile.inc diff -u src/external/apache2/llvm/Makefile.inc:1.3 src/external/apache2/llvm/Makefile.inc:1.4 --- src/external/apache2/llvm/Makefile.inc:1.3 Mon Nov 18 19:54:23 2019 +++ src/external/apache2/llvm/Makefile.inc Thu Nov 28 23:01:22 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.3 2019/11/18 19:54:23 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.4 2019/11/28 23:01:22 joerg Exp $ .if !defined(LLVM_TOPLEVEL_MK) LLVM_TOPLEVEL_MK= @@ -28,7 +28,7 @@ CLANG_INCLUDE_CONFIG= ${LLVM_TOOLCONF_OB LLVM_INCLUDE_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm-include && ${PRINTOBJDIR} LLVM_TOOLCONF_OBJDIR!= cd ${NETBSDSRCDIR}/tools/llvm && ${PRINTOBJDIR} HOST_CPPFLAGS+= ${CPPFLAGS} -HOST_CXXFLAGS+= -O2 -fno-rtti -fno-exceptions +HOST_CXXFLAGS+= -O2 -fno-rtti -fno-exceptions -fno-strict-aliasing HOST_CPPFLAGS+= -std=c++14 LLVM_TARGETS= x86,powerpc,sparc,aarch64,arm,mips .else
CVS commit: src/external/apache2/llvm
Module Name:src Committed By: joerg Date: Thu Nov 28 23:01:22 UTC 2019 Modified Files: src/external/apache2/llvm: Makefile.inc Log Message: Use -fno-strict-aliasing unconditionally for the cross compiler. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/apache2/llvm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/calendar/calendars
Module Name:src Committed By: sevan Date: Thu Nov 28 23:49:13 UTC 2019 Modified Files: src/usr.bin/calendar/calendars: calendar.birthday Log Message: Add Aaron Swartz and Steve Jobs To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/calendar/calendars/calendar.birthday Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/calendar/calendars
Module Name:src Committed By: sevan Date: Thu Nov 28 23:49:13 UTC 2019 Modified Files: src/usr.bin/calendar/calendars: calendar.birthday Log Message: Add Aaron Swartz and Steve Jobs To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/calendar/calendars/calendar.birthday Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/calendar/calendars/calendar.birthday diff -u src/usr.bin/calendar/calendars/calendar.birthday:1.32 src/usr.bin/calendar/calendars/calendar.birthday:1.33 --- src/usr.bin/calendar/calendars/calendar.birthday:1.32 Mon Oct 14 17:30:17 2019 +++ src/usr.bin/calendar/calendars/calendar.birthday Thu Nov 28 23:49:13 2019 @@ -9,6 +9,7 @@ 01/08 Stephen Hawking born in Oxford, England, 1942 01/10 Ethan Allen born, 1738 01/11 Alexander Hamilton born in Nevis, British West Indies, 1757? +01/11 Aaron Hillel Swartz died in Brooklyn, New York, 2013 01/12 "Long" John Baldry born in London, 1941 01/13 Horatio Alger born, 1834 01/13 Sophie Tucker born, 1884 @@ -63,6 +64,7 @@ 02/22 Pierre Jules Cesar Janssen born, 1838, found hydrogen in the sun 02/23 W.E.B. DuBois born, 1868 02/24 Winslow Homer born, 1836 +02/24 Steven Paul Jobs was born in San Francisco, California, 1955 02/25 George Harrison born in Liverpool, England, 1943 02/25 Renoir born, 1841 02/26 Dominique Francois Jean Arago born, 1786; @@ -223,6 +225,7 @@ 10/04 John V. Atanasoff born, 1903 10/05 Pablo Picasso born in Malaga, Spain, 1881 10/05 Ray Kroc (founder of McDonald's) born, 1902 +10/05 Steven Paul Jobs died in Palo Alto, California, 2011 10/08 Dennis Ritchie died in Murray Hill, New Jersey, 2011 10/13 Lenny Bruce born in New York City, 1925 10/13 Virgil (Publius Vergilius Maro) born near Mantua, Italy, 70 BC @@ -241,6 +244,7 @@ 11/02 Daniel Boone born near Reading, PA, 1734 11/04 King William III of Orange born, 1650 11/05 Roy Rogers born, 1912 +11/08 Aaron Hillel Swartz was born in Highland Park, Illinois, 1986 11/09 Carl Sagan born, 1934 11/10 Martin Luther born in Eisleben, Germany, 1483 11/10 Soviet President Leonid Brezhnev dies at age 75, 1982
CVS commit: src/sys/arch/arm/ti
Module Name:src Committed By: jmcneill Date: Thu Nov 28 23:57:09 UTC 2019 Modified Files: src/sys/arch/arm/ti: ti_sdhc.c Log Message: Support 1-bit mode and force all xfers to bounce to workaround a transfer error issue for now To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/ti_sdhc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/ti/ti_sdhc.c diff -u src/sys/arch/arm/ti/ti_sdhc.c:1.4 src/sys/arch/arm/ti/ti_sdhc.c:1.5 --- src/sys/arch/arm/ti/ti_sdhc.c:1.4 Wed Nov 27 23:03:24 2019 +++ src/sys/arch/arm/ti/ti_sdhc.c Thu Nov 28 23:57:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_sdhc.c,v 1.4 2019/11/27 23:03:24 jmcneill Exp $ */ +/* $NetBSD: ti_sdhc.c,v 1.5 2019/11/28 23:57:09 jmcneill Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.4 2019/11/27 23:03:24 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.5 2019/11/28 23:57:09 jmcneill Exp $"); #include #include @@ -428,15 +428,21 @@ static int ti_sdhc_bus_width(struct sdhc_softc *sc, int width) { struct ti_sdhc_softc *hmsc = (struct ti_sdhc_softc *)sc; - uint32_t con; + uint32_t con, hctl; con = bus_space_read_4(hmsc->sc_bst, hmsc->sc_bsh, MMCHS_CON); + hctl = SDHC_READ(hmsc, SDHC_HOST_CTL); if (width == 8) { con |= CON_DW8; + } else if (width == 4) { + con &= ~CON_DW8; + hctl |= SDHC_4BIT_MODE; } else { con &= ~CON_DW8; + hctl &= ~SDHC_4BIT_MODE; } bus_space_write_4(hmsc->sc_bst, hmsc->sc_bsh, MMCHS_CON, con); + SDHC_WRITE(hmsc, SDHC_HOST_CTL, hctl); return 0; } @@ -487,6 +493,13 @@ ti_sdhc_edma_init(struct ti_sdhc_softc * error); return error; } + error = bus_dmamap_load(sc->sc.sc_dmat, sc->sc_edma_dmamap, + sc->sc_edma_bbuf, MAXPHYS, NULL, BUS_DMA_WAITOK); + if (error) { + device_printf(sc->sc.sc_dev, "couldn't load dmamap: %d\n", + error); + return error; + } return error; } @@ -496,24 +509,23 @@ ti_sdhc_edma_xfer_data(struct sdhc_softc { struct ti_sdhc_softc *sc = device_private(sdhc_sc->sc_dev); const bus_dmamap_t map = cmd->c_dmamap; - int seg, error; bool bounce; + int error; - for (bounce = false, seg = 0; seg < cmd->c_dmamap->dm_nsegs; seg++) { - if ((cmd->c_dmamap->dm_segs[seg].ds_addr & 0x1f) != 0) { +#if notyet + bounce = false; + for (int seg = 0; seg < cmd->c_dmamap->dm_nsegs; seg++) { + if ((cmd->c_dmamap->dm_segs[seg].ds_addr & 0x1f) != 0 || + (cmd->c_dmamap->dm_segs[seg].ds_len & 3) != 0) { bounce = true; break; } } +#else + bounce = true; +#endif if (bounce) { - error = bus_dmamap_load(sc->sc.sc_dmat, sc->sc_edma_dmamap, - sc->sc_edma_bbuf, MAXPHYS, NULL, BUS_DMA_WAITOK); - if (error) { - device_printf(sc->sc.sc_dev, - "[bounce] bus_dmamap_load failed: %d\n", error); - return error; - } if (ISSET(cmd->c_flags, SCF_CMD_READ)) { bus_dmamap_sync(sc->sc.sc_dmat, sc->sc_edma_dmamap, 0, MAXPHYS, BUS_DMASYNC_PREREAD); @@ -536,7 +548,6 @@ ti_sdhc_edma_xfer_data(struct sdhc_softc bus_dmamap_sync(sc->sc.sc_dmat, sc->sc_edma_dmamap, 0, MAXPHYS, BUS_DMASYNC_POSTWRITE); } - bus_dmamap_unload(sc->sc.sc_dmat, sc->sc_edma_dmamap); if (ISSET(cmd->c_flags, SCF_CMD_READ) && error == 0) { memcpy(cmd->c_data, sc->sc_edma_bbuf, cmd->c_datalen); }
CVS commit: src/sys/arch/arm/ti
Module Name:src Committed By: jmcneill Date: Thu Nov 28 23:57:09 UTC 2019 Modified Files: src/sys/arch/arm/ti: ti_sdhc.c Log Message: Support 1-bit mode and force all xfers to bounce to workaround a transfer error issue for now To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/ti_sdhc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Fri Nov 29 00:36:22 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk3399_pcie.c Log Message: Do not crash if the optional vpcie3v3-supply property is missing or the regulator can not be found. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/rockchip/rk3399_pcie.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/rockchip/rk3399_pcie.c diff -u src/sys/arch/arm/rockchip/rk3399_pcie.c:1.6 src/sys/arch/arm/rockchip/rk3399_pcie.c:1.7 --- src/sys/arch/arm/rockchip/rk3399_pcie.c:1.6 Sun Jun 23 16:15:43 2019 +++ src/sys/arch/arm/rockchip/rk3399_pcie.c Fri Nov 29 00:36:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rk3399_pcie.c,v 1.6 2019/06/23 16:15:43 jmcneill Exp $ */ +/* $NetBSD: rk3399_pcie.c,v 1.7 2019/11/29 00:36:22 jmcneill Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -17,7 +17,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.6 2019/06/23 16:15:43 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.7 2019/11/29 00:36:22 jmcneill Exp $"); #include #include @@ -241,8 +241,10 @@ rkpcie_attach(device_t parent, device_t struct fdtbus_regulator *regulator; regulator = fdtbus_regulator_acquire(phandle, "vpcie3v3-supply"); - fdtbus_regulator_enable(regulator); - fdtbus_regulator_release(regulator); + if (regulator != NULL) { + fdtbus_regulator_enable(regulator); + fdtbus_regulator_release(regulator); + } fdtbus_clock_assign(phandle); clock_enable_all(phandle);
CVS commit: src/sys/arch/arm/rockchip
Module Name:src Committed By: jmcneill Date: Fri Nov 29 00:36:22 UTC 2019 Modified Files: src/sys/arch/arm/rockchip: rk3399_pcie.c Log Message: Do not crash if the optional vpcie3v3-supply property is missing or the regulator can not be found. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/rockchip/rk3399_pcie.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: hkenken Date: Fri Nov 29 04:59:15 UTC 2019 Modified Files: src/sys/dev/i2c: at24cxx.c Log Message: Support more than 128Kbit model. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/at24cxx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: hkenken Date: Fri Nov 29 04:59:15 UTC 2019 Modified Files: src/sys/dev/i2c: at24cxx.c Log Message: Support more than 128Kbit model. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/at24cxx.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/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.32 src/sys/dev/i2c/at24cxx.c:1.33 --- src/sys/dev/i2c/at24cxx.c:1.32 Sun Oct 27 19:10:38 2019 +++ src/sys/dev/i2c/at24cxx.c Fri Nov 29 04:59:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.32 2019/10/27 19:10:38 jmcneill Exp $ */ +/* $NetBSD: at24cxx.c,v 1.33 2019/11/29 04:59:15 hkenken Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.32 2019/10/27 19:10:38 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.33 2019/11/29 04:59:15 hkenken Exp $"); #include #include @@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v #define AT24CXX_ADDR 0x50 #define AT24CXX_WRITE_CYCLE_MS 10 -#define AT24CXX_ADDR_HI(a) (((a) >> 8) & 0x1f) +#define AT24CXX_ADDR_HI(a) (((a) >> 8) & 0xff) #define AT24CXX_ADDR_LO(a) ((a) & 0xff) #include "seeprom.h"
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nisimura Date: Fri Nov 29 05:47:26 UTC 2019 Modified Files: src/sys/dev/pci: if_kse.c Log Message: switch to deferred if_start framework. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/if_kse.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_kse.c diff -u src/sys/dev/pci/if_kse.c:1.42 src/sys/dev/pci/if_kse.c:1.43 --- src/sys/dev/pci/if_kse.c:1.42 Tue Nov 26 08:37:05 2019 +++ src/sys/dev/pci/if_kse.c Fri Nov 29 05:47:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_kse.c,v 1.42 2019/11/26 08:37:05 nisimura Exp $ */ +/* $NetBSD: if_kse.c,v 1.43 2019/11/29 05:47:26 nisimura Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.42 2019/11/26 08:37:05 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.43 2019/11/29 05:47:26 nisimura Exp $"); #include #include @@ -567,6 +567,7 @@ kse_attach(device_t parent, device_t sel IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_UDPv4_Rx; if_attach(ifp); + if_deferred_start_init(ifp, NULL); ether_ifattach(ifp, enaddr); #ifdef KSE_EVENT_COUNTERS @@ -1012,7 +1013,8 @@ kse_start(struct ifnet *ifp) bus_dmamap_sync(sc->sc_dmat, dmamap, 0, dmamap->dm_mapsize, BUS_DMASYNC_PREWRITE); - lasttx = -1; tdes0 = 0; + tdes0 = 0; /* to postpone 1st segment T0_OWN write */ + lasttx = -1; for (nexttx = sc->sc_txnext, seg = 0; seg < dmamap->dm_nsegs; seg++, nexttx = KSE_NEXTTX(nexttx)) { @@ -1027,10 +1029,9 @@ kse_start(struct ifnet *ifp) tdes->t1 = sc->sc_t1csum | (dmamap->dm_segs[seg].ds_len & T1_TBS_MASK); tdes->t0 = tdes0; - tdes0 |= T0_OWN; + tdes0 = T0_OWN; /* 2nd and other segments */ lasttx = nexttx; } - /* * Outgoing NFS mbuf must be unloaded when Tx completed. * Without T1_IC NFS mbuf is left unack'ed for excessive @@ -1047,7 +1048,7 @@ kse_start(struct ifnet *ifp) } } while ((m = m->m_next) != NULL); - /* Write last T0_OWN bit of the 1st segment */ + /* Write deferred 1st segment T0_OWN at the final stage */ sc->sc_txdescs[lasttx].t1 |= T1_LS; sc->sc_txdescs[sc->sc_txnext].t1 |= T1_FS; sc->sc_txdescs[sc->sc_txnext].t0 = T0_OWN; @@ -1188,6 +1189,7 @@ static int kse_intr(void *arg) { struct kse_softc *sc = arg; + struct ifnet *ifp = &sc->sc_ethercom.ec_if; uint32_t isr; if ((isr = CSR_READ_4(sc, INTST)) == 0) @@ -1203,6 +1205,10 @@ kse_intr(void *arg) aprint_error_dev(sc->sc_dev, "Rx descriptor full\n"); CSR_WRITE_4(sc, INTST, isr); + + if (ifp->if_flags & IFF_RUNNING) + if_schedule_deferred_start(ifp); + return 1; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nisimura Date: Fri Nov 29 05:47:26 UTC 2019 Modified Files: src/sys/dev/pci: if_kse.c Log Message: switch to deferred if_start framework. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/if_kse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/arm/broadcom
On Nov 27, 2019, at 9:08 PM, Jason R Thorpe wrote: > > + firqh = kmem_alloc(sizeof(*firqh), KM_SLEEP); > + firqh->ih_irq = firq; > + firqh->ih_fn = func; > + firqh->ih_arg = arg; > + TAILQ_INSERT_TAIL(&firq->intr_handlers, firqh, ih_next); > + > + return firqh; I should have commented the code in gicv3 so that you would have realized it was “unnecessarily complicated” for a reason :) The interrupt_distribute(9) API makes an assumption that the return value of anything_intr_establish can be used as input for the MD interrupt_distribute implementation. For arm pic, struct intrsource * made most sense. It is a bit of a hassle for fdtbus and really shows the need for an MI interrupt API. So where this breaks things is if you have something in the kernel do: Ih = fdtbus_intr_establish(…) interrupt_distribute(ih, target, NULL) Currently the only place where this can happen is arch/arm/fdt/pmu_fdt.c but IMHO the code is perfectly valid and could appear in other places in the future.
CVS commit: src/sys/opencrypto
Module Name:src Committed By: hikaru Date: Fri Nov 29 07:20:03 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: HMAC-SHA-512 has 32 bytes MAC. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/opencrypto/cryptodev.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/opencrypto/cryptodev.h diff -u src/sys/opencrypto/cryptodev.h:1.39 src/sys/opencrypto/cryptodev.h:1.40 --- src/sys/opencrypto/cryptodev.h:1.39 Wed Jul 26 06:44:50 2017 +++ src/sys/opencrypto/cryptodev.h Fri Nov 29 07:20:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.h,v 1.39 2017/07/26 06:44:50 knakahara Exp $ */ +/* $NetBSD: cryptodev.h,v 1.40 2019/11/29 07:20:03 hikaru Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $ */ /* $OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $ */ @@ -262,7 +262,7 @@ struct crypt_sgop { struct session_n_op * sessions; }; -#define CRYPTO_MAX_MAC_LEN 20 +#define CRYPTO_MAX_MAC_LEN 32 /* Keep this updated */ /* bignum parameter, in packed bytes, ... */ struct crparam {
CVS commit: src/sys/opencrypto
Module Name:src Committed By: hikaru Date: Fri Nov 29 07:20:03 UTC 2019 Modified Files: src/sys/opencrypto: cryptodev.h Log Message: HMAC-SHA-512 has 32 bytes MAC. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/opencrypto/cryptodev.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.