Mercurial > ecos-v3_0-branch
changeset 821:fa95d14326ad
linux exec fix
| author | msalter |
|---|---|
| date | Tue, 11 Mar 2003 15:41:11 +0000 |
| parents | 1f775ec4a9ce |
| children | 060f6b8274f3 |
| files | packages/hal/arm/arch/current/ChangeLog packages/hal/arm/arch/current/src/redboot_linux_exec.c packages/io/eth/current/ChangeLog packages/io/eth/current/include/eth_drv.h packages/io/eth/current/src/stand_alone/eth_drv.c |
| diffstat | 5 files changed, 28 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/arm/arch/current/ChangeLog +++ b/packages/hal/arm/arch/current/ChangeLog @@ -1,3 +1,7 @@ +2003-03-11 Mark Salter <msalter@redhat.com> + + * src/redboot_linux_exec.c (do_exec): Call eth_drv_stop as necessary. + 2003-02-13 Mark Salter <msalter@redhat.com> * src/redboot_linux_exec.c (do_exec): Add missing semicolon.
--- a/packages/hal/arm/arch/current/src/redboot_linux_exec.c +++ b/packages/hal/arm/arch/current/src/redboot_linux_exec.c @@ -66,6 +66,10 @@ #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 @@ -375,6 +379,11 @@ do_exec(int argc, char *argv[]) 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();
--- a/packages/io/eth/current/ChangeLog +++ b/packages/io/eth/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-11 Mark Salter <msalter@redhat.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@eCosCentric.com> * cdl/eth_drivers.cdl: Add doc link.
--- a/packages/io/eth/current/include/eth_drv.h +++ b/packages/io/eth/current/include/eth_drv.h @@ -223,6 +223,7 @@ 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
--- a/packages/io/eth/current/src/stand_alone/eth_drv.c +++ b/packages/io/eth/current/src/stand_alone/eth_drv.c @@ -8,7 +8,7 @@ //####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 @@ -86,7 +86,7 @@ int cyg_io_eth_net_debug = CYGDBG_IO_ETH #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 // @@ -232,16 +232,17 @@ eth_drv_init(struct eth_drv_sc *sc, unsi } } -#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.
