This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
linux exec fis
- From: Mark Salter <msalter at redhat dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Tue, 11 Mar 2003 10:49:33 -0500 (EST)
- Subject: linux exec fis
Index: hal/arm/arch/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/arch/current/ChangeLog,v
retrieving revision 1.85
diff -u -p -5 -r1.85 ChangeLog
--- hal/arm/arch/current/ChangeLog 13 Feb 2003 15:22:34 -0000 1.85
+++ hal/arm/arch/current/ChangeLog 11 Mar 2003 15:37:06 -0000
@@ -1,5 +1,9 @@
+2003-03-11 Mark Salter <msalter at redhat dot com>
+
+ * src/redboot_linux_exec.c (do_exec): Call eth_drv_stop as necessary.
+
2003-02-13 Mark Salter <msalter at redhat dot com>
* src/redboot_linux_exec.c (do_exec): Add missing semicolon.
2003-02-13 Gary Thomas <gary at mlbassoc dot com>
Index: hal/arm/arch/current/src/redboot_linux_exec.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/arch/current/src/redboot_linux_exec.c,v
retrieving revision 1.9
diff -u -p -5 -r1.9 redboot_linux_exec.c
--- hal/arm/arch/current/src/redboot_linux_exec.c 13 Feb 2003 15:22:34 -0000 1.9
+++ hal/arm/arch/current/src/redboot_linux_exec.c 11 Mar 2003 15:37:06 -0000
@@ -64,10 +64,14 @@
//==========================================================================
#include <pkgconf/hal.h>
#include <redboot.h>
+#ifdef CYGPKG_IO_ETH_DRIVERS
+#include <cyg/io/eth/eth_drv.h> // Logical driver interfaces
+#endif
+
#include <cyg/hal/hal_intr.h>
#include <cyg/hal/hal_cache.h>
#include CYGHWR_MEMORY_LAYOUT_H
#include <cyg/hal/hal_io.h>
@@ -373,10 +377,15 @@ do_exec(int argc, char *argv[])
(void*)base_addr, (void*)length);
} else if (base_addr_set && !length_set) {
diag_printf("Length required for non-standard base address\n");
return;
}
+
+#ifdef CYGPKG_IO_ETH_DRIVERS
+ eth_drv_stop();
+#endif
+
HAL_DISABLE_INTERRUPTS(oldints);
HAL_DCACHE_SYNC();
HAL_ICACHE_DISABLE();
HAL_DCACHE_DISABLE();
HAL_DCACHE_SYNC();
Index: io/eth/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/eth/current/ChangeLog,v
retrieving revision 1.40
diff -u -p -5 -r1.40 ChangeLog
--- io/eth/current/ChangeLog 24 Feb 2003 14:24:13 -0000 1.40
+++ io/eth/current/ChangeLog 11 Mar 2003 15:37:15 -0000
@@ -1,5 +1,11 @@
+2003-03-11 Mark Salter <msalter at redhat dot com>
+
+ * src/stand_alone/eth_drv.c (eth_drv_stop): Uncomment, make non-static,
+ and use __local_enet_sc.
+ * include/eth_drv.h: Add extern decl for eth_drv_stop.
+
2003-02-24 Jonathan Larmour <jifl at eCosCentric dot com>
* cdl/eth_drivers.cdl: Add doc link.
2003-02-07 Jonathan Larmour <jifl at eCosCentric dot com>
Index: io/eth/current/include/eth_drv.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/eth/current/include/eth_drv.h,v
retrieving revision 1.8
diff -u -p -5 -r1.8 eth_drv.h
--- io/eth/current/include/eth_drv.h 13 Aug 2002 15:55:53 -0000 1.8
+++ io/eth/current/include/eth_drv.h 11 Mar 2003 15:37:15 -0000
@@ -221,10 +221,11 @@ struct eth_drv_mc_list {
#ifndef CYGPKG_NET
extern void eth_drv_buffers_init(void);
extern int eth_drv_read(char *eth_hdr, char *buf, int len);
extern void eth_drv_write(char *eth_hdr, char *buf, int len);
extern int eth_drv_int_vector(void);
+extern void eth_drv_stop(void);
extern unsigned char __local_enet_addr[];
extern struct eth_drv_sc *__local_enet_sc;
#endif
#endif // _ETH_DRV_H_
Index: io/eth/current/src/stand_alone/eth_drv.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/eth/current/src/stand_alone/eth_drv.c,v
retrieving revision 1.17
diff -u -p -5 -r1.17 eth_drv.c
--- io/eth/current/src/stand_alone/eth_drv.c 23 May 2002 23:06:04 -0000 1.17
+++ io/eth/current/src/stand_alone/eth_drv.c 11 Mar 2003 15:37:15 -0000
@@ -6,11 +6,11 @@
//
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
@@ -84,11 +84,11 @@ int cyg_io_eth_net_debug = CYGDBG_IO_ETH
#define DIAG_DUMP_BUF_HDR( a, b )
#define DIAG_DUMP_BUF_BDY( a, b )
#endif
unsigned char __local_enet_addr[ETHER_ADDR_LEN+2];
-struct eth_drv_sc *__local_enet_sc;
+struct eth_drv_sc *__local_enet_sc = NULL;
#ifdef CYGSEM_IO_ETH_DRIVERS_PASS_PACKETS
//
// Horrible hack: In order to allow the stand-alone networking code to work
// alongside eCos (or any other stack), separate IP addresses must be used.
@@ -230,20 +230,21 @@ eth_drv_init(struct eth_drv_sc *sc, unsi
__local_enet_sc = sc;
eth_drv_start(sc);
}
}
-#if 0 // Not currently used. Left in case it's needed in the future
//
// This [internal] function will be called to stop activity on an interface.
//
-static void
-eth_drv_stop(struct eth_drv_sc *sc)
+void
+eth_drv_stop(void)
{
- (sc->funs->stop)(sc);
+ struct eth_drv_sc *sc = __local_enet_sc;
+
+ if (sc != NULL)
+ (sc->funs->stop)(sc);
}
-#endif
//
// This [internal] function will be called to start activity on an interface.
//
static void