<p dir="ltr">This sounds and looks reasonable.</p>
<p dir="ltr">The old stack needs to be moved into its own build tree. </p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 4, 2016 5:43 PM, "Pavel Pisa" <<a href="mailto:ppisa4lists@pikron.com">ppisa4lists@pikron.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This change is required to build RTEMS with classic "--enable-networking"<br>
and link applications/tests which reference RTEMS_BSP_NETWORK_DRIVER_<wbr>ATTACH.<br>
---<br>
c/src/lib/libbsp/i386/pc386/<wbr>ne2000/ne2000.c | 10 +---------<br>
c/src/libchip/network/<wbr>dec21140.c | 7 +------<br>
c/src/libchip/network/elnk.c | 12 +-----------<br>
c/src/libchip/network/if_dc.c | 9 +--------<br>
c/src/libchip/network/if_fxp.c | 7 +------<br>
5 files changed, 5 insertions(+), 40 deletions(-)<br>
<br>
Discussion: I have stumbled over problem to build some external tests<br>
for i386 because original integrated Ethernet drivers cannot be linked<br>
into application. Even that libbsd is a future goal it worth to correct<br>
this at least for testing. It seems that original i8259s concept<br>
handling is finally overcome by generic approach.<br>
I hope that field isOn is no longer referenced by any architecture<br>
or if referenced, that NULL is valid option.<br>
<br>
I am leaving for next week so I would not push this change probably.<br>
<br>
In the longer perspective, I think that even for these deprecated drivers<br>
rtems_interrupt_handler_<wbr>install generic concept could/should be used.<br>
If it is agreed that it is right change then I can prepare patch<br>
for that in future.<br>
<br>
But I think that correction of the builds in meantime worth<br>
to be pushed.<br>
<br>
diff --git a/c/src/lib/libbsp/i386/pc386/<wbr>ne2000/ne2000.c b/c/src/lib/libbsp/i386/pc386/<wbr>ne2000/ne2000.c<br>
index 5a13b29..d757e27 100644<br>
--- a/c/src/lib/libbsp/i386/pc386/<wbr>ne2000/ne2000.c<br>
+++ b/c/src/lib/libbsp/i386/pc386/<wbr>ne2000/ne2000.c<br>
@@ -428,14 +428,6 @@ ne_interrupt_off (const rtems_irq_connect_data *irq)<br>
outport_byte (sc->port + IMR, 0);<br>
}<br>
<br>
-/* Return whether NE2000 interrupts are on. */<br>
-<br>
-static int<br>
-ne_interrupt_is_on (const rtems_irq_connect_data *irq)<br>
-{<br>
- return BSP_irq_enabled_at_i8259s (irq->name);<br>
-}<br>
-<br>
/* Initialize the NE2000 hardware. */<br>
<br>
static void<br>
@@ -526,7 +518,7 @@ ne_init_irq_handler(int irno)<br>
irq.handle = (rtems_irq_hdl) irno;<br>
irq.on = ne_interrupt_on;<br>
irq.off = ne_interrupt_off;<br>
- irq.isOn = ne_interrupt_is_on;<br>
+ irq.isOn = NULL;<br>
<br>
if (!BSP_install_rtems_irq_<wbr>handler (&irq))<br>
rtems_panic ("Can't attach NE interrupt handler for irq %d\n", irno);<br>
diff --git a/c/src/libchip/network/<wbr>dec21140.c b/c/src/libchip/network/<wbr>dec21140.c<br>
index aa6be29..3bfc91d 100644<br>
--- a/c/src/libchip/network/<wbr>dec21140.c<br>
+++ b/c/src/libchip/network/<wbr>dec21140.c<br>
@@ -345,11 +345,6 @@ static void no_op(const rtems_irq_connect_data* irq)<br>
return;<br>
}<br>
<br>
-static int dec21140IsOn(const rtems_irq_connect_data* irq)<br>
-{<br>
- return BSP_irq_enabled_at_i8259s (irq->name);<br>
-}<br>
-<br>
/*<br>
* DEC21140 interrupt handler<br>
*/<br>
@@ -539,7 +534,7 @@ dec21140Enet_initialize_<wbr>hardware (struct dec21140_softc *sc)<br>
sc->irqInfo.hdl = (rtems_irq_hdl)dec21140Enet_<wbr>interrupt_handler_entry;<br>
sc->irqInfo.on = no_op;<br>
sc->irqInfo.off = no_op;<br>
- sc->irqInfo.isOn = dec21140IsOn;<br>
+ sc->irqInfo.isOn = NULL;<br>
<br>
#ifdef DEC_DEBUG<br>
printk( "dec2114x: Installing IRQ %d\n", sc->irqInfo.name );<br>
diff --git a/c/src/libchip/network/elnk.c b/c/src/libchip/network/elnk.c<br>
index 06ece5b..1c63e35 100644<br>
--- a/c/src/libchip/network/elnk.c<br>
+++ b/c/src/libchip/network/elnk.c<br>
@@ -1875,16 +1875,6 @@ static void no_op(const rtems_irq_connect_data* irq)<br>
<br>
<br>
<br>
-static int elnkIsOn(const rtems_irq_connect_data* irq)<br>
-{<br>
- return BSP_irq_enabled_at_i8259s (irq->name);<br>
-}<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
static void<br>
elnk_start_txchain( struct elnk_softc *sc, struct TXMD *chainhead )<br>
{<br>
@@ -2214,7 +2204,7 @@ elnk_initialize_hardware (struct elnk_softc *sc)<br>
sc->irqInfo.hdl = (rtems_irq_hdl)elnk_interrupt_<wbr>handler_entry;<br>
sc->irqInfo.on = no_op;<br>
sc->irqInfo.off = no_op;<br>
- sc->irqInfo.isOn = elnkIsOn;<br>
+ sc->irqInfo.isOn = NULL;<br>
<br>
if( sc->irqInfo.name != 255 )<br>
{<br>
diff --git a/c/src/libchip/network/if_dc.<wbr>c b/c/src/libchip/network/if_dc.<wbr>c<br>
index 1563be5..24f2fc1 100644<br>
--- a/c/src/libchip/network/if_dc.<wbr>c<br>
+++ b/c/src/libchip/network/if_dc.<wbr>c<br>
@@ -1893,13 +1893,6 @@ nop(const rtems_irq_connect_data* unused)<br>
{<br>
}<br>
<br>
-static int<br>
-decISON(const rtems_irq_connect_data* irq)<br>
-{<br>
- return (BSP_irq_enabled_at_i8259s(<wbr>irq->name));<br>
-}<br>
-<br>
-<br>
/*<br>
* Attach the interface. Allocate softc structures, do ifmedia<br>
* setup and ethernet/BPF attach.<br>
@@ -2023,7 +2016,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching)<br>
sc->irqInfo.handle = (void *)sc; /* new parameter */<br>
sc->irqInfo.on = nop;<br>
sc->irqInfo.off = nop;<br>
- sc->irqInfo.isOn = decISON;<br>
+ sc->irqInfo.isOn = NULL;<br>
<br>
#ifdef BSP_SHARED_HANDLER_SUPPORT<br>
rc = BSP_install_rtems_shared_irq_<wbr>handler( &sc->irqInfo );<br>
diff --git a/c/src/libchip/network/if_<wbr>fxp.c b/c/src/libchip/network/if_<wbr>fxp.c<br>
index ce59db1..35d7c07 100644<br>
--- a/c/src/libchip/network/if_<wbr>fxp.c<br>
+++ b/c/src/libchip/network/if_<wbr>fxp.c<br>
@@ -431,11 +431,6 @@ static void nopOn(const rtems_irq_connect_data* notUsed)<br>
*/<br>
}<br>
<br>
-static int fxpIsOn(const rtems_irq_connect_data* irq)<br>
-{<br>
- return BSP_irq_enabled_at_i8259s (irq->name);<br>
-}<br>
-<br>
int<br>
rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching)<br>
{<br>
@@ -1933,7 +1928,7 @@ rtems_task_wake_after(100);<br>
sc->irqInfo.hdl = (rtems_irq_hdl)fxp_intr;<br>
sc->irqInfo.on = nopOn;<br>
sc->irqInfo.off = nopOn;<br>
- sc->irqInfo.isOn = fxpIsOn;<br>
+ sc->irqInfo.isOn = NULL;<br>
rv = BSP_install_rtems_irq_handler (&sc->irqInfo);<br>
if (rv != 1) {<br>
rtems_panic ("Can't attach fxp interrupt handler for irq %d\n",<br>
--<br>
1.9.1<br>
<br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</blockquote></div></div>