[rtems commit] bsps: PR2076: SMC91111 fixes for mpc55xxevb BSP

Sebastian Huber sebh at rtems.org
Tue Oct 2 13:24:03 UTC 2012


Module:    rtems
Branch:    master
Commit:    967481a09a2bc244ca1031f98eb4c44814aa3dc8
Changeset: http://git.rtems.org/rtems/commit/?id=967481a09a2bc244ca1031f98eb4c44814aa3dc8

Author:    Peter Dufault <dufault at hda.com>
Date:      Mon Oct  1 15:12:25 2012 +0200

bsps: PR2076: SMC91111 fixes for mpc55xxevb BSP

- A typo prevents if_smc.c from being built when configured;
- The argument passed to the interrupt handler was incorrect and the
  addition of support for RTEMS_INTERRUPT_SHARED exposed it;
- A "#ifdef DEBUG" is supposed to be "#if DEBUG" since 0 is supposed to
  make it quiet.

---

 .../lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c |   11 +++++------
 c/src/libchip/network/smc91111.c                   |    4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c
index 05f512e..026a56c 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/network/if_smc.c
@@ -1,6 +1,6 @@
 #include <bsp.h>
 
-#ifdef HAS_SMC91111M
+#ifdef HAS_SMC91111
 
 #include <mpc55xx/mpc55xx.h>
 #include <mpc55xx/regs.h>
@@ -38,18 +38,17 @@
 #define SMC91111_BASE_IRQ  MPC55XX_IRQ_SIU_EXTERNAL_2
 #define SMC91111_BASE_PIO  4
 
-extern rtems_isr lan91cxx_interrupt_handler(rtems_vector_number v);
+extern void lan91cxx_interrupt_handler(void *arg);
 
 static const union SIU_EISR_tag clear_eisr_2 = {.B.EIF2 = 1};
 
-static void rtems_smc91111_interrupt_wrapper(rtems_vector_number v, void *arg)
+static void rtems_smc91111_interrupt_wrapper(void *arg)
 {
     /* Clear external interrupt status */
 
     SIU.EISR = clear_eisr_2;
 
-    lan91cxx_interrupt_handler(v);
-
+    lan91cxx_interrupt_handler(arg);
 }
 
 scmv91111_configuration_t mpc5554_scmv91111_configuration = {
@@ -164,4 +163,4 @@ int rtems_smc91111_driver_attach_mpc5554(struct rtems_bsdnet_ifconfig *config)
     return _rtems_smc91111_driver_attach(config,&mpc5554_scmv91111_configuration);
 };
 
-#endif /* HAS_SMC91111M */
+#endif /* HAS_SMC91111 */
diff --git a/c/src/libchip/network/smc91111.c b/c/src/libchip/network/smc91111.c
index 1216ba6..3e87935 100644
--- a/c/src/libchip/network/smc91111.c
+++ b/c/src/libchip/network/smc91111.c
@@ -962,7 +962,7 @@ int _rtems_smc91111_driver_attach (struct rtems_bsdnet_ifconfig *config,
 	if_attach(ifp);
 	ether_ifattach(ifp);
 
-#ifdef DEBUG
+#if DEBUG
 	printf("SMC91111 : driver has been attached\n");
 #endif
 
@@ -1035,7 +1035,7 @@ int lan91cxx_hardware_init(struct lan91cxx_priv_data *cpd)
 			cpd->config.info,
 			cpd->config.options,
 			cpd->config.interrupt_wrapper,
-			cpd->config.arg
+			cpd
 		);
 		if (sc != RTEMS_SUCCESSFUL) {
 			printf("rtems_interrupt_handler_install returned %d.\n", sc);




More information about the vc mailing list