# HG changeset patch # User gthomas # Date 1065125517 0 # Node ID 236516292e4518d1ccfd5d3fd5c0261a8871803a # Parent e1738e65692acc5f1b802db1e508375f3ebb9000 Allow platform overrides for default ESA diff --git a/packages/devs/eth/ns/dp83816/current/ChangeLog b/packages/devs/eth/ns/dp83816/current/ChangeLog --- a/packages/devs/eth/ns/dp83816/current/ChangeLog +++ b/packages/devs/eth/ns/dp83816/current/ChangeLog @@ -1,3 +1,8 @@ +2003-10-02 Gary Thomas + + * src/dp83816.h: Let default ESA be a pointer, so platforms can more + easily set it a runtime. + 2003-09-30 Gary Thomas * src/if_dp83816.c: diff --git a/packages/devs/eth/ns/dp83816/current/src/dp83816.h b/packages/devs/eth/ns/dp83816/current/src/dp83816.h --- a/packages/devs/eth/ns/dp83816/current/src/dp83816.h +++ b/packages/devs/eth/ns/dp83816/current/src/dp83816.h @@ -86,7 +86,7 @@ typedef struct dp83816_bd { // Private driver structure typedef struct dp83816_priv_data { char *esa_key; // RedBoot 'key' for device ESA - unsigned char enaddr[6]; + unsigned char *enaddr; int rxnum; // Number of Rx buffers unsigned char *rxbuf; // Rx buffer space dp83816_bd_t *rxd; // Rx descriptor pool diff --git a/packages/devs/eth/powerpc/moab/current/ChangeLog b/packages/devs/eth/powerpc/moab/current/ChangeLog --- a/packages/devs/eth/powerpc/moab/current/ChangeLog +++ b/packages/devs/eth/powerpc/moab/current/ChangeLog @@ -1,3 +1,9 @@ +2003-10-02 Gary Thomas + + * include/moab_eth_dp83816.inl: + * include/moab_eth.inl: Default ethernet station addresses are now + computed by system startup, based on CPU serial number. + 2003-09-30 Gary Thomas * include/moab_eth_dp83816.inl: diff --git a/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl b/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl --- a/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl +++ b/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl @@ -70,10 +70,11 @@ static unsigned char ppc405_eth_txbufs[T static mal_bd_t ppc405_eth_rxbd[CYGNUM_DEVS_ETH_POWERPC_PPC405_RxNUM] __attribute__((aligned(HAL_DCACHE_LINE_SIZE))); static mal_bd_t ppc405_eth_txbd[CYGNUM_DEVS_ETH_POWERPC_PPC405_TxNUM] __attribute__((aligned(HAL_DCACHE_LINE_SIZE))); +extern char _moab_eth0_ESA[]; static struct ppc405_eth_info ppc405_eth0_info = { 0, // Interrupt vector "eth0_esa", - { 0x08, 0x00, 0x3C, 0x28, 0x7A, 0xBA}, // Default ESA + _moab_eth0_ESA, CYGNUM_DEVS_ETH_POWERPC_PPC405_RxNUM, // Number of Rx buffers ppc405_eth_rxbufs, // Rx buffer space ppc405_eth_rxbd, // Rx buffer headers @@ -109,7 +110,7 @@ NETDEVTAB_ENTRY(ppc405_netdev, RedBoot_config_option("eth0 network hardware address [MAC]", eth0_esa, ALWAYS_ENABLED, true, - CONFIG_ESA, &ppc405_eth0_info.enaddr + CONFIG_ESA, _moab_eth0_ESA ); #endif // CYGSEM_REDBOOT_FLASH_CONFIG #endif // CYGPKG_REDBOOT diff --git a/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl b/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl --- a/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl +++ b/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl @@ -108,9 +108,10 @@ static unsigned char dp83816_eth_txbufs[ static dp83816_bd_t dp83816_eth_rxbd[CYGNUM_DEVS_ETH_MOAB_DP83816_RxNUM] __attribute__((aligned(HAL_DCACHE_LINE_SIZE))); static dp83816_bd_t dp83816_eth_txbd[CYGNUM_DEVS_ETH_MOAB_DP83816_TxNUM] __attribute__((aligned(HAL_DCACHE_LINE_SIZE))); +extern char _moab_eth1_ESA[]; static dp83816_priv_data_t dp83816_eth1_priv_data = { "eth1_esa", - { 0x08, 0x00, 0x3C, 0x29, 0x7A, 0xBA}, // Default ESA + _moab_eth1_ESA, CYGNUM_DEVS_ETH_MOAB_DP83816_RxNUM, // Number of Rx buffers dp83816_eth_rxbufs, // Rx buffer space dp83816_eth_rxbd, // Rx buffer headers @@ -145,7 +146,7 @@ NETDEVTAB_ENTRY(dp83816_netdev, RedBoot_config_option("eth1 network hardware address [MAC]", eth1_esa, ALWAYS_ENABLED, true, - CONFIG_ESA, &dp83816_eth1_priv_data.enaddr + CONFIG_ESA, _moab_eth1_ESA ); #endif // CYGSEM_REDBOOT_FLASH_CONFIG #else diff --git a/packages/devs/eth/powerpc/ppc405/current/ChangeLog b/packages/devs/eth/powerpc/ppc405/current/ChangeLog --- a/packages/devs/eth/powerpc/ppc405/current/ChangeLog +++ b/packages/devs/eth/powerpc/ppc405/current/ChangeLog @@ -1,3 +1,8 @@ +2003-10-02 Gary Thomas + + * src/ppc405_enet.h: Let default ESA be a pointer so that platforms + may set/change it a runtime. + 2003-09-19 Gary Thomas * src/ppc405_enet.h: diff --git a/packages/devs/eth/powerpc/ppc405/current/src/ppc405_enet.h b/packages/devs/eth/powerpc/ppc405/current/src/ppc405_enet.h --- a/packages/devs/eth/powerpc/ppc405/current/src/ppc405_enet.h +++ b/packages/devs/eth/powerpc/ppc405/current/src/ppc405_enet.h @@ -338,7 +338,7 @@ struct ppc405_eth_info { // These fields should be defined by the implementation int int_vector; char *esa_key; // RedBoot 'key' for device ESA - unsigned char enaddr[6]; + unsigned char *enaddr; int rxnum; // Number of Rx buffers unsigned char *rxbuf; // Rx buffer space mal_bd_t *rxbd_table; // Rx buffer headers