8390 ei_debug : Reenable the use of debugging in 8390 based chips
Subsystems (3)
Ethernet boards based on the 8390 chip had an '#ifdef notdef' disabling the use of the debug variable ei_debug. Reenable it for those of us who still occasionally use it.
Also handle the case of the 'ne' driver which uses 8390p.o rather than 8390.o. In that case ei_debug is aliased to eip_debug so it doesn't clash with the previously exported ei_debug.
--- drivers/net/ethernet/8390/8390.h | 5 ++++- drivers/net/ethernet/8390/8390p.c | 1 + drivers/net/ethernet/8390/axnet_cs.c | 5 ----- drivers/net/ethernet/8390/lib8390.c | 8 ++++++-- drivers/net/ethernet/8390/ne.c | 1 + 5 files changed, 12 insertions(+), 8 deletions(-)
drivers/net/ethernet/8390/8390.h +4 -1
@@ -21,7 +21,10 @@ struct e8390_pkt_hdr {unsigned short count;/* header + packet length in bytes */ }; -#ifdef notdef +#if (definedEI_DEBUG && definedEIP_DEBUG ) +#define ei_debug eip_debug +extern int eip_debug; +#elif (definedEI_DEBUG && ! definedEIP_DEBUG )extern int ei_debug;#else #define ei_debug 1
drivers/net/ethernet/8390/8390p.c +1 -0
@@ -7,6 +7,7 @@ static const char version[] =#define ei_outb (_v, _p) outb(_v, _p)#define ei_inb_p (_p) inb_p(_p)#define ei_outb_p (_v, _p) outb_p(_v, _p) +#define EIP_DEBUG 1#include "lib8390.c"
drivers/net/ethernet/8390/axnet_cs.c +0 -5
@@ -810,11 +810,6 @@ module_pcmcia_driver(axnet_cs_driver);#define ei_block_input (ei_local->block_input)#define ei_get_8390_hdr (ei_local->get_8390_hdr) -/* use 0 for production, 1 for verification, >2 for debug */ -#ifndef ei_debug -int ei_debug =1 ; -#endif -/* Index to functions. */ static void ei_tx_intr (struct net_device *dev);static void ei_tx_err (struct net_device *dev);
drivers/net/ethernet/8390/lib8390.c +6 -2
@@ -100,8 +100,12 @@#define ei_get_8390_hdr (ei_local->get_8390_hdr)/* use 0 for production, 1 for verification, >2 for debug */ -#ifndef ei_debug -int ei_debug =1 ; +#if (definedEI_DEBUG && definedEIP_DEBUG ) +int eip_debug =EI_DEBUG ; +EXPORT_SYMBOL (eip_debug); +#elif (definedEI_DEBUG && ! definedEIP_DEBUG ) +int ei_debug =EI_DEBUG ; +EXPORT_SYMBOL (ei_debug);#endif /* Index to functions. */
drivers/net/ethernet/8390/ne.c +1 -0
@@ -54,6 +54,7 @@ static const char version2[] =#include <linux/platform_device.h> #include <asm/io.h> +#define EIP_DEBUG 1#include "8390.h"
Signature · 1 line
1.7.2.5
David Miller
maintainerFrom: Matthew Whitehead <[email protected]>
Date: Mon, 14 Oct 2013 22:46:01 -0400
Quoted 9 lines
Ethernet boards based on the 8390 chip had an '#ifdef notdef' disabling the use of the debug variable
ei_debug. Reenable it for those of us who still occasionally use it.Also handle the case of the 'ne' driver which uses 8390p.o rather than 8390.o. In that case
ei_debugis aliased toeip_debugso it doesn't clash with the previously exportedei_debug.Signed-off-by Matthew Whitehead <[email protected]>
I'd rather not encourage the use of things like this.
We have a standard, run time, way to enable and disable debugging output on a per-netdevice basis. And the "default" value of which can be controlled by a module parameter if need be.
Please convert the driver to this method instead.
Thank you.