[PATCH rtems 12/18] mv643xx_eth_bsdnet.c: define ISR (which was removed from low-level driver)

Vijay Kumar Banerjee vijay at rtems.org
Tue Mar 30 01:27:44 UTC 2021


From: till straumann <till.straumann at alumni.tu-berlin.de>

NOTE: apparently we now must use rtems_bsdnet_event_send(). The
combination of rtems_event_send()/rtems_bsdnet_event_receive()
apparently no longer works (rtems-5).

Update #4344
---
 .../beatnik/net/if_mve/mv643xx_eth_bsdnet.c        | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/bsps/powerpc/beatnik/net/if_mve/mv643xx_eth_bsdnet.c b/bsps/powerpc/beatnik/net/if_mve/mv643xx_eth_bsdnet.c
index 308b992479..2bafe09ac7 100644
--- a/bsps/powerpc/beatnik/net/if_mve/mv643xx_eth_bsdnet.c
+++ b/bsps/powerpc/beatnik/net/if_mve/mv643xx_eth_bsdnet.c
@@ -877,6 +877,17 @@ int					f;
 
 /* DRIVER TASK */
 
+static void mveth_isr(void *arg)
+{
+struct mveth_softc	*sc = (struct mveth_softc*) arg;
+int                 idx = (sc - &theMvEths[0]);
+	BSP_mve_disable_irqs( sc->pvt );
+#ifdef MVETH_DEBUG
+	printk(DRVNAME": bsdnet isr; posting event %i to 0x%08x\n", idx, BSP_mve_get_tid( sc->pvt ));
+#endif
+	rtems_bsdnet_event_send( BSP_mve_get_tid( sc->pvt ), (1<<idx) );
+}
+
 /* Daemon task does all the 'interrupt' work */
 static void mveth_daemon(void *arg)
 {
@@ -997,8 +1008,9 @@ struct	ifnet		*ifp;
 			ifcfg->xbuf_count = MV643XX_TX_RING_SIZE;
 		}
 
-		if ( !BSP_mve_setup( unit,
+		if ( !mve_setup_bsd( unit,
 						     mveth_tid,
+		                     mveth_isr, (void*)sc,
 						     release_tx_mbuf, ifp,
 						     alloc_mbuf_rx,
 						     consume_rx_mbuf, ifp,
-- 
2.26.2



More information about the devel mailing list