<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>I think I understood what you were trying to say over previous emails. As suggested by you, I went over the code in search of where all these functions are called resulting in getting not all, but some answers.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>I sincerely hope this time the patch is right !! :-)</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;">Regards</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial,
 helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><span style="background-color:transparent;line-height:1.22;">Vipul Nayyar </span></div><div style="color: rgb(0, 0, 0); font-size: 12.727272033691406px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><br></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Vipul Nayyar <nayyar_vipul@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> rtems-devel@rtems.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Saturday, 13 July 2013 1:44 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> [PATCH] Updated Legacy code in arm rtl22xx<br>
 </font> </div> <div class="y_msg_container"><br>---<br> c/src/lib/libbsp/arm/rtl22xx/network/network.c | 33 ++++++++++++++++----------<br> 1 file changed, 20 insertions(+), 13 deletions(-)<br><br>diff --git a/c/src/lib/libbsp/arm/rtl22xx/network/network.c b/c/src/lib/libbsp/arm/rtl22xx/network/network.c<br>index 3b54862..a42bd07 100644<br>--- a/c/src/lib/libbsp/arm/rtl22xx/network/network.c<br>+++ b/c/src/lib/libbsp/arm/rtl22xx/network/network.c<br>@@ -3,24 +3,18 @@<br> #include <sys/mbuf.h><br> #include <bsp/irq.h><br> #include <libchip/cs8900.h><br>+#include <assert.h><br> <br> #define CS8900_BASE 0x20000300<br> unsigned int bsp_cs8900_io_base = 0;<br> unsigned int bsp_cs8900_memory_base = 0;<br>-cs8900_device *g_cs;<br>-void cs8900_isr(rtems_irq_hdl_param unused);<br>-rtems_irq_connect_data cs8900_isr_data = {LPC22xx_INTERRUPT_EINT2,<br>-                         
                cs8900_isr,<br>-                      NULL,<br>-                      NULL,<br>-                      NULL,<br>-                      NULL};<br>+static void cs8900_isr(void *);<br> <br> char g_enetbuf[1520];<br> <br>-void cs8900_isr(rtems_irq_hdl_param unused)<br>+static void cs8900_isr(void *arg)<br> {<br>-    cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, g_cs);<br>+    cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, arg);<br> }<br> <br> /* cs8900_io_set_reg - set one of the I/O addressed registers */<br>@@ -69,13 +63,26 @@ unsigned short cs8900_mem_get_reg (cs8900_device *cs,
 unsigned long reg)<br> <br> void cs8900_attach_interrupt (cs8900_device *cs)<br> {<br>-    g_cs = cs;<br>-    BSP_install_rtems_irq_handler(&cs8900_isr_data);<br>+    rtems_status_code status = RTEMS_SUCCESSFUL;<br>+    status = rtems_interrupt_handler_install(<br>+        LPC22xx_INTERRUPT_EINT2,<br>+        "Network",<br>+        RTEMS_INTERRUPT_UNIQUE,<br>+        (rtems_interrupt_handler)cs8900_isr,<br>+        cs<br>+    );<br>+    assert(status == RTEMS_SUCCESSFUL);<br> }<br> <br> void cs8900_detach_interrupt (cs8900_device *cs)<br> {<br>-    BSP_remove_rtems_irq_handler(&cs8900_isr_data);<br>+    rtems_status_code status = RTEMS_SUCCESSFUL;<br>+    status = rtems_interrupt_handler_remove(<br>+       
 LPC22xx_INTERRUPT_EINT2,<br>+        (rtems_interrupt_handler)cs8900_isr,<br>+        cs<br>+    );<br>+    assert(status == RTEMS_SUCCESSFUL);<br> }<br> <br> unsigned short cs8900_get_data_block (cs8900_device *cs, unsigned char *data)<br>-- <br>1.7.11.7<br><br>_______________________________________________<br>rtems-devel mailing list<br><a ymailto="mailto:rtems-devel@rtems.org" href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br><a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br><br><br></div> </div> </div>  </div></body></html>