CVS commit: [netbsd-10] src/sys/arch/arm/ti
Module Name:src Committed By: martin Date: Wed Oct 18 11:49:09 UTC 2023 Modified Files: src/sys/arch/arm/ti [netbsd-10]: ti_com.c Log Message: Pull up following revision(s) (requested by gutteridge in ticket #419): sys/arch/arm/ti/ti_com.c: revision 1.12 ti_com.c: set sc_type to COM_TYPE_OMAP Avoid a kernel hang reported by Brook Milligan in PR port-arm/57598. Patch suggested by RVP, seems correct to several of us. (If this introduces a regression with some board, sorry, mea culpa. But in that case we should still be carrying this, just conditionalized.) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.18.1 src/sys/arch/arm/ti/ti_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/ti/ti_com.c diff -u src/sys/arch/arm/ti/ti_com.c:1.11 src/sys/arch/arm/ti/ti_com.c:1.11.18.1 --- src/sys/arch/arm/ti/ti_com.c:1.11 Wed Jan 27 03:10:20 2021 +++ src/sys/arch/arm/ti/ti_com.c Wed Oct 18 11:49:09 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_com.c,v 1.11 2021/01/27 03:10:20 thorpej Exp $ */ +/* $NetBSD: ti_com.c,v 1.11.18.1 2023/10/18 11:49:09 martin Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: ti_com.c,v 1.11 2021/01/27 03:10:20 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: ti_com.c,v 1.11.18.1 2023/10/18 11:49:09 martin Exp $"); #include #include @@ -95,7 +95,7 @@ ti_com_attach(device_t parent, device_t return; } - sc->sc_type = COM_TYPE_NORMAL; + sc->sc_type = COM_TYPE_OMAP; error = bus_space_map(bst, addr, size, 0, &bsh); if (error) {
CVS commit: [netbsd-10] src/sys/arch/arm/ti
Module Name:src Committed By: martin Date: Wed Oct 18 11:49:09 UTC 2023 Modified Files: src/sys/arch/arm/ti [netbsd-10]: ti_com.c Log Message: Pull up following revision(s) (requested by gutteridge in ticket #419): sys/arch/arm/ti/ti_com.c: revision 1.12 ti_com.c: set sc_type to COM_TYPE_OMAP Avoid a kernel hang reported by Brook Milligan in PR port-arm/57598. Patch suggested by RVP, seems correct to several of us. (If this introduces a regression with some board, sorry, mea culpa. But in that case we should still be carrying this, just conditionalized.) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.18.1 src/sys/arch/arm/ti/ti_com.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/arch/arm/ti
Module Name:src Committed By: martin Date: Fri Mar 3 17:02:43 UTC 2023 Modified Files: src/sys/arch/arm/ti [netbsd-10]: if_cpsw.c Log Message: Pull up following revision(s) (requested by sekiya in ticket #109): sys/arch/arm/ti/if_cpsw.c: revision 1.17 Uncomment and protect sanity checks that would drop into the debugger with a CPSW_DEBUG_DMA define. This handles a condition where checking for DMA_RXEOQ in the received packet results in the console being spammed with "rxeoq" messages, which soon results in a kernel panic. The corresponding Debugger() call for this check was commented out. The TI documentation ("AM335x and AMIC110 Sitara(TM) Processors Technical Reference Manual") documents the EOQ bit thus: (14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies that a descriptor is the last for a given packet received (also sets the EOP flag), and there are no more descriptors in the receive list (next descriptor pointer is NULL). The software application can use this bit to detect when the EMAC receiver for the corresponding channel has halted. This is useful when the application appends additional free buffer descriptors to an active receive queue. Note that this flag is valid on EOP descriptors only. Moving this check (and the offending printf() ) into a debug #ifdef results in the BeagleBone Green surviving the nightly checks; it would always drop into the debugger before this change. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/arch/arm/ti/if_cpsw.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/if_cpsw.c diff -u src/sys/arch/arm/ti/if_cpsw.c:1.16 src/sys/arch/arm/ti/if_cpsw.c:1.16.4.1 --- src/sys/arch/arm/ti/if_cpsw.c:1.16 Sun Sep 18 15:47:09 2022 +++ src/sys/arch/arm/ti/if_cpsw.c Fri Mar 3 17:02:43 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cpsw.c,v 1.16 2022/09/18 15:47:09 thorpej Exp $ */ +/* $NetBSD: if_cpsw.c,v 1.16.4.1 2023/03/03 17:02:43 martin Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.16 2022/09/18 15:47:09 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.16.4.1 2023/03/03 17:02:43 martin Exp $"); #include #include @@ -95,6 +95,8 @@ __KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v CTASSERT(powerof2(CPSW_NTXDESCS)); CTASSERT(powerof2(CPSW_NRXDESCS)); +#undef CPSW_DEBUG_DMA /* define this for DMA debugging */ + #define CPSW_PAD_LEN (ETHER_MIN_LEN - ETHER_CRC_LEN) #define TXDESC_NEXT(x) cpsw_txdesc_adjust((x), 1) @@ -1181,10 +1183,12 @@ cpsw_rxintr(void *arg) return 1; } +#if defined(CPSW_DEBUG_DMA) if ((dw[3] & (CPDMA_BD_SOP | CPDMA_BD_EOP)) != (CPDMA_BD_SOP | CPDMA_BD_EOP)) { - //Debugger(); + Debugger(); } +#endif bus_dmamap_sync(sc->sc_bdt, dm, 0, dm->dm_mapsize, BUS_DMASYNC_POSTREAD); @@ -1219,10 +1223,12 @@ next: cpsw_rxdesc_paddr(sc, i)); } +#if defined(CPSW_DEBUG_DMA) if (sc->sc_rxeoq) { device_printf(sc->sc_dev, "rxeoq\n"); - //Debugger(); + Debugger(); } +#endif cpsw_write_4(sc, CPSW_CPDMA_CPDMA_EOI_VECTOR, CPSW_INTROFF_RX); @@ -1269,9 +1275,11 @@ cpsw_txintr(void *arg) cpsw_get_txdesc(sc, sc->sc_txhead, &bd); +#if defined(CPSW_DEBUG_DMA) if (dw[2] == 0) { //Debugger(); } +#endif if (ISSET(dw[3], CPDMA_BD_SOP) == 0) goto next;
CVS commit: [netbsd-10] src/sys/arch/arm/ti
Module Name:src Committed By: martin Date: Fri Mar 3 17:02:43 UTC 2023 Modified Files: src/sys/arch/arm/ti [netbsd-10]: if_cpsw.c Log Message: Pull up following revision(s) (requested by sekiya in ticket #109): sys/arch/arm/ti/if_cpsw.c: revision 1.17 Uncomment and protect sanity checks that would drop into the debugger with a CPSW_DEBUG_DMA define. This handles a condition where checking for DMA_RXEOQ in the received packet results in the console being spammed with "rxeoq" messages, which soon results in a kernel panic. The corresponding Debugger() call for this check was commented out. The TI documentation ("AM335x and AMIC110 Sitara(TM) Processors Technical Reference Manual") documents the EOQ bit thus: (14.3.2.4.1.2.4) This bit is set by the EMAC when the EMAC identifies that a descriptor is the last for a given packet received (also sets the EOP flag), and there are no more descriptors in the receive list (next descriptor pointer is NULL). The software application can use this bit to detect when the EMAC receiver for the corresponding channel has halted. This is useful when the application appends additional free buffer descriptors to an active receive queue. Note that this flag is valid on EOP descriptors only. Moving this check (and the offending printf() ) into a debug #ifdef results in the BeagleBone Green surviving the nightly checks; it would always drop into the debugger before this change. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/arch/arm/ti/if_cpsw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.