net: ne2000: Divided a function of NE2000 driver
PATCH 1/1 net: ne2000: Divided a function of NE2000 driver
get_prom function was used __attriute__ , but it is not enable. ax88796.o does not do link besides ne2000.o. When ld is carried out, get_prom function of ax88796.c is ignored.
This problem is a thing by specifications of ld.
I checked and test this patch on SuperH and MIPS.
--- drivers/net/Makefile | 6 +- drivers/net/ax88796.c | 2 +- drivers/net/ne2000.c | 719 +-------------------------------------------- drivers/net/ne2000_base.h | 36 ++- 4 files changed, 40 insertions(+), 723 deletions(-)
drivers/net/Makefile +2 -4
@@ -42,10 +42,8 @@ COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o COBJS-$(CONFIG_MACB) += macb.o COBJS-$(CONFIG_MCFFEC) += mcffec.o COBJS-$(CONFIG_NATSEMI) += natsemi.o -ifeq ($(CONFIG_DRIVER_NE2000),y) -COBJS-y += ne2000.o -COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o -endif +COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o +COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.o COBJS-$(CONFIG_NETCONSOLE) += netconsole.o COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o
drivers/net/ax88796.c +1 -1
@@ -143,7 +143,7 @@ static void ax88796_mac_read(u8 *buff) } } -int get_prom (u8 * mac_addr) +int get_prom (u8 * mac_addr,u8 * base_addr) {u8 prom[32 ];int i;
drivers/net/ne2000.c +7 -712
756 lines not on this page · raw message
drivers/net/ne2000_base.h +30 -6
@@ -80,10 +80,35 @@ are GPL, so this is, of course, GPL.#define __NE2000_BASE_H__#define bool int -#define false 0#define true 1 +/* +* Debugging details +* +* Set to perms of: +* 0 disables all debug output +* 1 for process debug output +* 2 for added data IO output: get_reg, put_reg +* 4 for packet allocation/free output +* 8 for only startup status, so we can tell we're installed OK +*/ +#if 0 +#define DEBUG 0xf +#else +#define DEBUG 0 +#endif + +#if DEBUG &1 +#define DEBUG_FUNCTION () do { printf("%s\n", __FUNCTION__); } while (0) +#define DEBUG_LINE () do { printf("%d\n", __LINE__); } while (0) +#define PRINTK(args...) printf(args) +#else +#define DEBUG_FUNCTION () do {} while(0) +#define DEBUG_LINE () do {} while(0) +#define PRINTK(args...) +#endif +/* timeout for tx/rx in s */ #define TOUT 5/* Ether MAC address size */
@@ -119,11 +144,6 @@ typedef struct dp83902a_priv_data {int rx_buf_start, rx_buf_end; } dp83902a_priv_data_t; -/* -* Some forward declarations -*/ -static void dp83902a_poll (void ); -/* ------------------------------------------------------------------------ */ /* Register offsets */
@@ -281,4 +301,8 @@ static void dp83902a_poll(void);#define IEEE_8023_MAX_FRAME 1518/* Largest possible ethernet frame */ #define IEEE_8023_MIN_FRAME 64/* Smallest possible ethernet frame */ + +/* Functions */ +int get_prom (u8 * mac_addr,u8 * base_addr); +#endif /* __NE2000_BASE_H__ */
Signature · 1 line
1.5.6.2
PATCH RESEND 1/1 net: ne2000: Divided a function of NE2000 driver
Dear Ben,
Quoted 6 lines · In message <[email protected]> Nobuhiro Iwamatsu wrote:
get_promfunction was used__attriute__, but it is not enable. ax88796.o does not do link besides ne2000.o. When ld is carried out,get_promfunction ofax88796.cis ignored.
This problem is a thing by specifications of ld.
I checked and test this patch on SuperH and MIPS.
Quoted 7 lines
Signed-off-by Nobuhiro Iwamatsu <[email protected]>--- drivers/net/Makefile | 6 +- drivers/net/ax88796.c | 2 +- drivers/net/ne2000.c | 719 +-------------------------------------------- drivers/net/ne2000_base.h | 36 ++- 4 files changed, 40 insertions(+), 723 deletions(-)
I think this patch was not added, nor was any feedback sent?
Please comment.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "There are three principal ways to lose money: wine, women, and en- gineers. While the first two are more pleasant, the third is by far the more certain." -- Baron Rothschild, ca. 1800
PATCH RESEND 1/1 net: ne2000: Divided a function of NE2000 driver
Quoted 19 lines · Wolfgang Denk
Dear Ben,
Quoted 6 lines · In message <[email protected]> Nobuhiro Iwamatsu wrote:
get_promfunction was used__attriute__, but it is not enable. ax88796.o does not do link besides ne2000.o. When ld is carried out,get_promfunction ofax88796.cis ignored.
This problem is a thing by specifications of ld.
I checked and test this patch on SuperH and MIPS.Quoted 8 lines
Signed-off-by Nobuhiro Iwamatsu <[email protected]>--- drivers/net/Makefile | 6 +- drivers/net/ax88796.c | 2 +- drivers/net/ne2000.c | 719 +-------------------------------------------- drivers/net/ne2000_base.h | 36 ++- 4 files changed, 40 insertions(+), 723 deletions(-)
Quoted 4 lines
I think this patch was not added, nor was any feedback sent?
Please comment.
There's been commentary about v2 of this patch within the last couple of weeks. I'm not crazy about it but no better ideas have shown up. I'll pull it in ASAP.
regards,
Ben