<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Note that this patch is for 6-freebsd-12 and its removal reduces the burden to make the master branch match functionality.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 27, 2023 at 10:28 AM Kinsey Moore <<a href="mailto:kinsey.moore@oarcorp.com">kinsey.moore@oarcorp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This removes the workaround applied on the fly for QEMU that disables<br>
priority queueing. The priority queue interrupt was not previously<br>
hooked up properly in QEMU and RSB now has the patches to allow it to<br>
work.<br>
---<br>
 freebsd/sys/dev/cadence/if_cgem.c | 26 +++++++-------------------<br>
 1 file changed, 7 insertions(+), 19 deletions(-)<br>
<br>
diff --git a/freebsd/sys/dev/cadence/if_cgem.c b/freebsd/sys/dev/cadence/if_cgem.c<br>
index 689c3611..c1c88e77 100644<br>
--- a/freebsd/sys/dev/cadence/if_cgem.c<br>
+++ b/freebsd/sys/dev/cadence/if_cgem.c<br>
@@ -133,7 +133,6 @@ struct cgem_softc {<br>
        uint32_t                net_ctl_shadow;<br>
 #ifdef __rtems__<br>
        uint32_t                net_cfg_shadow;<br>
-       int                     neednullqs;<br>
        int                     phy_contype;<br>
 #endif /* __rtems__ */<br>
        int                     ref_clk_num;<br>
@@ -458,9 +457,8 @@ cgem_setup_descs(struct cgem_softc *sc)<br>
        int desc_rings_size = CGEM_NUM_RX_DESCS * sizeof(struct cgem_rx_desc) +<br>
            CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc);<br>
<br>
-       if (sc->neednullqs)<br>
-               desc_rings_size += sizeof(struct cgem_rx_desc) +<br>
-                   sizeof(struct cgem_tx_desc);<br>
+       desc_rings_size += sizeof(struct cgem_rx_desc) +<br>
+           sizeof(struct cgem_tx_desc);<br>
 #endif /* __rtems__ */<br>
        sc->txring = NULL;<br>
        sc->rxring = NULL;<br>
@@ -609,13 +607,11 @@ cgem_setup_descs(struct cgem_softc *sc)<br>
        sc->txring_queued = 0;<br>
<br>
 #ifdef __rtems__<br>
-       if (sc->neednullqs) {<br>
-               sc->null_qs = (void *)(sc->txring + CGEM_NUM_TX_DESCS);<br>
-               sc->null_qs_physaddr = sc->txring_physaddr +<br>
-                   CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc);<br>
+       sc->null_qs = (void *)(sc->txring + CGEM_NUM_TX_DESCS);<br>
+       sc->null_qs_physaddr = sc->txring_physaddr +<br>
+           CGEM_NUM_TX_DESCS * sizeof(struct cgem_tx_desc);<br>
<br>
-               cgem_null_qs(sc);<br>
-       }<br>
+       cgem_null_qs(sc);<br>
 #endif /* __rtems__ */<br>
<br>
        return (0);<br>
@@ -2074,15 +2070,7 @@ cgem_attach(device_t dev)<br>
<br>
        sc->if_old_flags = if_getflags(ifp);<br>
        sc->rxbufs = DEFAULT_NUM_RX_BUFS;<br>
-#if defined(CGEM64) && defined(__rtems__)<br>
-       uint32_t design_cfg6 = RD4(sc, CGEM_DESIGN_CFG6);<br>
-       /*<br>
-        * QEMU does not have PBUF_CUTTHRU defined and is broken when trying<br>
-        * to use nullqs<br>
-        */<br>
-       if ((design_cfg6 & CGEM_DESIGN_CFG6_PBUF_CUTTHRU))<br>
-               sc->neednullqs = 1;<br>
-#else<br>
+#if !defined(CGEM64) && defined(__rtems__)<br>
        sc->rxhangwar = 1;<br>
 #endif<br>
<br>
-- <br>
2.30.2<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>