Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c45f812f authored by Matthew Whitehead's avatar Matthew Whitehead Committed by David S. Miller
Browse files

8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature



Removed the shared ei_debug variable. Replaced it by adding u32 msg_enable to
the private struct ei_device. Now each 8390 ethernet instance has a per-device
logging variable.

Changed older style printk() calls to more canonical forms.

Tested on: ne, ne2k-pci, smc-ultra, and wd hardware.

V4.0
- Substituted pr_info() and pr_debug() for printk() KERN_INFO and KERN_DEBUG

V3.0
- Checked for cases where pr_cont() was most appropriate choice.
- Changed module parameter from 'debug' to 'msg_enable' because debug was
no longer the best description.

V2.0
- Changed netif_msg_(drv|probe|ifdown|rx_err|tx_err|tx_queued|intr|rx_status|hw)
to netif_(dbg|info|warn|err) where possible.

Signed-off-by: default avatarMatthew Whitehead <tedheadster@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e980569
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -21,12 +21,6 @@ struct e8390_pkt_hdr {
  unsigned short count; /* header + packet length in bytes */
};

#ifdef notdef
extern int ei_debug;
#else
#define ei_debug 1
#endif

#ifdef CONFIG_NET_POLL_CONTROLLER
void ei_poll(struct net_device *dev);
void eip_poll(struct net_device *dev);
@@ -99,6 +93,7 @@ struct ei_device {
	u32 *reg_offset;		/* Register mapping table */
	spinlock_t page_lock;		/* Page register locks */
	unsigned long priv;		/* Private field to store bus IDs etc. */
	u32 msg_enable;			/* debug message level */
#ifdef AX88796_PLATFORM
	unsigned char rxcr_base;	/* default value for RXCR */
#endif
+36 −26
Original line number Diff line number Diff line
@@ -116,9 +116,15 @@ static const char version[] =

static int apne_owned;	/* signal if card already owned */

static u32 apne_msg_enable;
module_param_named(msg_enable, apne_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH));
MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)");

struct net_device * __init apne_probe(int unit)
{
	struct net_device *dev;
	struct ei_device *ei_local;

#ifndef MANUAL_CONFIG
	char tuple[8];
#endif
@@ -133,11 +139,11 @@ struct net_device * __init apne_probe(int unit)
	if ( !(AMIGAHW_PRESENT(PCMCIA)) )
		return ERR_PTR(-ENODEV);

	printk("Looking for PCMCIA ethernet card : ");
	pr_info("Looking for PCMCIA ethernet card : ");

	/* check if a card is inserted */
	if (!(PCMCIA_INSERTED)) {
		printk("NO PCMCIA card inserted\n");
		pr_cont("NO PCMCIA card inserted\n");
		return ERR_PTR(-ENODEV);
	}

@@ -148,6 +154,8 @@ struct net_device * __init apne_probe(int unit)
		sprintf(dev->name, "eth%d", unit);
		netdev_boot_setup_check(dev);
	}
	ei_local = netdev_priv(dev);
	ei_local->msg_enable = apne_msg_enable;

	/* disable pcmcia irq for readtuple */
	pcmcia_disable_irq();
@@ -155,14 +163,14 @@ struct net_device * __init apne_probe(int unit)
#ifndef MANUAL_CONFIG
	if ((pcmcia_copy_tuple(CISTPL_FUNCID, tuple, 8) < 3) ||
		(tuple[2] != CISTPL_FUNCID_NETWORK)) {
		printk("not an ethernet card\n");
		pr_cont("not an ethernet card\n");
		/* XXX: shouldn't we re-enable irq here? */
		free_netdev(dev);
		return ERR_PTR(-ENODEV);
	}
#endif

	printk("ethernet PCMCIA card inserted\n");
	pr_cont("ethernet PCMCIA card inserted\n");

	if (!init_pcmcia()) {
		/* XXX: shouldn't we re-enable irq here? */
@@ -204,11 +212,12 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
    int neX000, ctron;
#endif
    static unsigned version_printed;
    struct ei_device *ei_local = netdev_priv(dev);

    if (ei_debug  &&  version_printed++ == 0)
	printk(version);
    if ((apne_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0))
		netdev_info(dev, version);

    printk("PCMCIA NE*000 ethercard probe");
    netdev_info(dev, "PCMCIA NE*000 ethercard probe");

    /* Reset card. Who knows what dain-bramaged state it was left in. */
    {	unsigned long reset_start_time = jiffies;
@@ -217,7 +226,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)

	while ((inb(ioaddr + NE_EN0_ISR) & ENISR_RESET) == 0)
		if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
			printk(" not found (no reset ack).\n");
			pr_cont(" not found (no reset ack).\n");
			return -ENODEV;
		}

@@ -288,7 +297,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
	start_page = 0x01;
	stop_page = (wordlength == 2) ? 0x40 : 0x20;
    } else {
	printk(" not found.\n");
	pr_cont(" not found.\n");
	return -ENXIO;

    }
@@ -320,9 +329,9 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
    for (i = 0; i < ETH_ALEN; i++)
	dev->dev_addr[i] = SA_prom[i];

    printk(" %pM\n", dev->dev_addr);
    pr_cont(" %pM\n", dev->dev_addr);

    printk("%s: %s found.\n", dev->name, name);
    netdev_info(dev, "%s found.\n", name);

    ei_status.name = name;
    ei_status.tx_start_page = start_page;
@@ -352,10 +361,11 @@ static void
apne_reset_8390(struct net_device *dev)
{
    unsigned long reset_start_time = jiffies;
    struct ei_device *ei_local = netdev_priv(dev);

    init_pcmcia();

    if (ei_debug > 1) printk("resetting the 8390 t=%ld...", jiffies);
    netif_dbg(ei_local, hw, dev, "resetting the 8390 t=%ld...\n", jiffies);

    outb(inb(NE_BASE + NE_RESET), NE_BASE + NE_RESET);

@@ -365,7 +375,7 @@ apne_reset_8390(struct net_device *dev)
    /* This check _should_not_ be necessary, omit eventually. */
    while ((inb(NE_BASE+NE_EN0_ISR) & ENISR_RESET) == 0)
	if (time_after(jiffies, reset_start_time + 2*HZ/100)) {
	    printk("%s: ne_reset_8390() did not complete.\n", dev->name);
		netdev_err(dev, "ne_reset_8390() did not complete.\n");
		break;
	}
    outb(ENISR_RESET, NE_BASE + NE_EN0_ISR);	/* Ack intr. */
@@ -386,9 +396,9 @@ apne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_pa

    /* This *shouldn't* happen. If it does, it's the last thing you'll see */
    if (ei_status.dmaing) {
	printk("%s: DMAing conflict in ne_get_8390_hdr "
	netdev_err(dev, "DMAing conflict in ne_get_8390_hdr "
		   "[DMAstat:%d][irqlock:%d][intr:%d].\n",
	   dev->name, ei_status.dmaing, ei_status.irqlock, dev->irq);
		   ei_status.dmaing, ei_status.irqlock, dev->irq);
	return;
    }

@@ -433,9 +443,9 @@ apne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int rin

    /* This *shouldn't* happen. If it does, it's the last thing you'll see */
    if (ei_status.dmaing) {
	printk("%s: DMAing conflict in ne_block_input "
		netdev_err(dev, "DMAing conflict in ne_block_input "
			   "[DMAstat:%d][irqlock:%d][intr:%d].\n",
	   dev->name, ei_status.dmaing, ei_status.irqlock, dev->irq);
			   ei_status.dmaing, ei_status.irqlock, dev->irq);
	return;
    }
    ei_status.dmaing |= 0x01;
@@ -481,9 +491,9 @@ apne_block_output(struct net_device *dev, int count,

    /* This *shouldn't* happen. If it does, it's the last thing you'll see */
    if (ei_status.dmaing) {
	printk("%s: DMAing conflict in ne_block_output."
		netdev_err(dev, "DMAing conflict in ne_block_output."
			   "[DMAstat:%d][irqlock:%d][intr:%d]\n",
	   dev->name, ei_status.dmaing, ei_status.irqlock, dev->irq);
			   ei_status.dmaing, ei_status.irqlock, dev->irq);
	return;
    }
    ei_status.dmaing |= 0x01;
@@ -513,7 +523,7 @@ apne_block_output(struct net_device *dev, int count,

    while ((inb(NE_BASE + NE_EN0_ISR) & ENISR_RDC) == 0)
	if (time_after(jiffies, dma_start + 2*HZ/100)) {	/* 20ms */
		printk("%s: timeout waiting for Tx RDC.\n", dev->name);
		netdev_warn(dev, "timeout waiting for Tx RDC.\n");
		apne_reset_8390(dev);
		NS8390_init(dev,1);
		break;
@@ -536,8 +546,8 @@ static irqreturn_t apne_interrupt(int irq, void *dev_id)
        pcmcia_ack_int(pcmcia_intreq);
        return IRQ_NONE;
    }
    if (ei_debug > 3)
        printk("pcmcia intreq = %x\n", pcmcia_intreq);
    if (apne_msg_enable & NETIF_MSG_INTR)
	pr_debug("pcmcia intreq = %x\n", pcmcia_intreq);
    pcmcia_disable_irq();			/* to get rid of the sti() within ei_interrupt */
    ei_interrupt(irq, dev_id);
    pcmcia_ack_int(pcmcia_get_intreq());
+20 −2
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ static unsigned char version[] = "ax88796.c: Copyright 2005,2007 Simtec Electron

#define AX_GPOC_PPDSET	BIT(6)

static u32 ax_msg_enable;

/* device private data */

struct ax_device {
@@ -147,8 +149,7 @@ static void ax_reset_8390(struct net_device *dev)
	unsigned long reset_start_time = jiffies;
	void __iomem *addr = (void __iomem *)dev->base_addr;

	if (ei_debug > 1)
		netdev_dbg(dev, "resetting the 8390 t=%ld\n", jiffies);
	netif_dbg(ei_local, hw, dev, "resetting the 8390 t=%ld...\n", jiffies);

	ei_outb(ei_inb(addr + NE_RESET), addr + NE_RESET);

@@ -496,12 +497,28 @@ static int ax_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
	return phy_ethtool_sset(phy_dev, cmd);
}

static u32 ax_get_msglevel(struct net_device *dev)
{
	struct ei_device *ei_local = netdev_priv(dev);

	return ei_local->msg_enable;
}

static void ax_set_msglevel(struct net_device *dev, u32 v)
{
	struct ei_device *ei_local = netdev_priv(dev);

	ei_local->msg_enable = v;
}

static const struct ethtool_ops ax_ethtool_ops = {
	.get_drvinfo		= ax_get_drvinfo,
	.get_settings		= ax_get_settings,
	.set_settings		= ax_set_settings,
	.get_link		= ethtool_op_get_link,
	.get_ts_info		= ethtool_op_get_ts_info,
	.get_msglevel		= ax_get_msglevel,
	.set_msglevel		= ax_set_msglevel,
};

#ifdef CONFIG_AX88796_93CX6
@@ -763,6 +780,7 @@ static int ax_init_dev(struct net_device *dev)
	ei_local->block_output = &ax_block_output;
	ei_local->get_8390_hdr = &ax_get_8390_hdr;
	ei_local->priv = 0;
	ei_local->msg_enable = ax_msg_enable;

	dev->netdev_ops = &ax_netdev_ops;
	dev->ethtool_ops = &ax_ethtool_ops;
+57 −62
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ static void AX88190_init(struct net_device *dev, int startp);
static int ax_open(struct net_device *dev);
static int ax_close(struct net_device *dev);
static irqreturn_t ax_interrupt(int irq, void *dev_id);
static u32 axnet_msg_enable;

/*====================================================================*/

@@ -152,6 +153,7 @@ static int axnet_probe(struct pcmcia_device *link)
	return -ENOMEM;

    ei_local = netdev_priv(dev);
    ei_local->msg_enable = axnet_msg_enable;
    spin_lock_init(&ei_local->page_lock);

    info = PRIV(dev);
@@ -650,11 +652,12 @@ static void block_input(struct net_device *dev, int count,
			struct sk_buff *skb, int ring_offset)
{
    unsigned int nic_base = dev->base_addr;
    struct ei_device *ei_local = netdev_priv(dev);
    int xfer_count = count;
    char *buf = skb->data;

    if ((ei_debug > 4) && (count != 4))
	    pr_debug("%s: [bi=%d]\n", dev->name, count+4);
    if ((netif_msg_rx_status(ei_local)) && (count != 4))
	netdev_dbg(dev, "[bi=%d]\n", count+4);
    outb_p(ring_offset & 0xff, nic_base + EN0_RSARLO);
    outb_p(ring_offset >> 8, nic_base + EN0_RSARHI);
    outb_p(E8390_RREAD+E8390_START, nic_base + AXNET_CMD);
@@ -810,11 +813,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);
@@ -925,8 +923,7 @@ static void axnet_tx_timeout(struct net_device *dev)
	isr = inb(e8390_base+EN0_ISR);
	spin_unlock_irqrestore(&ei_local->page_lock, flags);

	netdev_printk(KERN_DEBUG, dev,
		      "Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d.\n",
	netdev_dbg(dev, "Tx timed out, %s TSR=%#2x, ISR=%#2x, t=%d.\n",
		   (txsr & ENTSR_ABT) ? "excess collisions." :
		   (isr) ? "lost interrupt?" : "cable problem?",
		   txsr, isr, tickssofar);
@@ -998,8 +995,9 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
	{
		output_page = ei_local->tx_start_page;
		ei_local->tx1 = send_length;
		if (ei_debug  &&  ei_local->tx2 > 0)
			netdev_printk(KERN_DEBUG, dev,
		if ((netif_msg_tx_queued(ei_local)) &&
		    ei_local->tx2 > 0)
			netdev_dbg(dev,
				   "idle transmitter tx2=%d, lasttx=%d, txing=%d\n",
				   ei_local->tx2, ei_local->lasttx,
				   ei_local->txing);
@@ -1008,16 +1006,16 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
	{
		output_page = ei_local->tx_start_page + TX_PAGES/2;
		ei_local->tx2 = send_length;
		if (ei_debug  &&  ei_local->tx1 > 0)
			netdev_printk(KERN_DEBUG, dev,
		if ((netif_msg_tx_queued(ei_local)) &&
		    ei_local->tx1 > 0)
			netdev_dbg(dev,
				   "idle transmitter, tx1=%d, lasttx=%d, txing=%d\n",
				   ei_local->tx1, ei_local->lasttx,
				   ei_local->txing);
	}
	else
	{	/* We should never get here. */
		if (ei_debug)
			netdev_printk(KERN_DEBUG, dev,
		netif_dbg(ei_local, tx_err, dev,
			  "No Tx buffers free! tx1=%d tx2=%d last=%d\n",
			  ei_local->tx1, ei_local->tx2,
			  ei_local->lasttx);
@@ -1125,8 +1123,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
		return IRQ_NONE;
	}

	if (ei_debug > 3)
		netdev_printk(KERN_DEBUG, dev, "interrupt(isr=%#2.2x)\n",
	netif_dbg(ei_local, intr, dev, "interrupt(isr=%#2.2x)\n",
		  inb_p(e8390_base + EN0_ISR));

	outb_p(0x00, e8390_base + EN0_ISR);
@@ -1137,8 +1134,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
	       ++nr_serviced < MAX_SERVICE)
	{
		if (!netif_running(dev) || (interrupts == 0xff)) {
			if (ei_debug > 1)
				netdev_warn(dev,
			netif_warn(ei_local, intr, dev,
				   "interrupt from stopped card\n");
			outb_p(interrupts, e8390_base + EN0_ISR);
			interrupts = 0;
@@ -1175,14 +1171,15 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
		}
	}
    
	if (interrupts && ei_debug > 3) 
	if (interrupts && (netif_msg_intr(ei_local)))
	{
		handled = 1;
		if (nr_serviced >= MAX_SERVICE) 
		{
			/* 0xFF is valid for a card removal */
			if (interrupts != 0xFF)
				netdev_warn(dev, "Too much work at interrupt, status %#2.2x\n",
				netdev_warn(dev,
					    "Too much work at interrupt, status %#2.2x\n",
					    interrupts);
			outb_p(ENISR_ALL, e8390_base + EN0_ISR); /* Ack. most intrs. */
		} else {
@@ -1221,8 +1218,7 @@ static void ei_tx_err(struct net_device *dev)
	unsigned char tx_was_aborted = txsr & (ENTSR_ABT+ENTSR_FU);

#ifdef VERBOSE_ERROR_DUMP
	netdev_printk(KERN_DEBUG, dev,
		      "transmitter error (%#2x):", txsr);
	netdev_dbg(dev, "transmitter error (%#2x):", txsr);
	if (txsr & ENTSR_ABT)
		pr_cont(" excess-collisions");
	if (txsr & ENTSR_ND)
@@ -1287,7 +1283,7 @@ static void ei_tx_intr(struct net_device *dev)
	else if (ei_local->tx2 < 0) 
	{
		if (ei_local->lasttx != 2  &&  ei_local->lasttx != -2)
			netdev_info(dev, "%s: bogus last_tx_buffer %d, tx2=%d\n",
			netdev_err(dev, "%s: bogus last_tx_buffer %d, tx2=%d\n",
				   ei_local->name, ei_local->lasttx,
				   ei_local->tx2);
		ei_local->tx2 = 0;
@@ -1366,7 +1362,9 @@ static void ei_receive(struct net_device *dev)
		   Keep quiet if it looks like a card removal. One problem here
		   is that some clones crash in roughly the same way.
		 */
		if (ei_debug > 0  &&  this_frame != ei_local->current_page && (this_frame!=0x0 || rxing_page!=0xFF))
		if ((netif_msg_rx_err(ei_local)) &&
		    this_frame != ei_local->current_page &&
		    (this_frame != 0x0 || rxing_page != 0xFF))
			netdev_err(dev, "mismatched read page pointers %2x vs %2x\n",
				   this_frame, ei_local->current_page);
		
@@ -1383,8 +1381,7 @@ static void ei_receive(struct net_device *dev)
		
		if (pkt_len < 60  ||  pkt_len > 1518) 
		{
			if (ei_debug)
				netdev_printk(KERN_DEBUG, dev,
			netif_err(ei_local, rx_err, dev,
				  "bogus packet size: %d, status=%#2x nxpg=%#2x\n",
				  rx_frame.count, rx_frame.status,
				  rx_frame.next);
@@ -1398,8 +1395,7 @@ static void ei_receive(struct net_device *dev)
			skb = netdev_alloc_skb(dev, pkt_len + 2);
			if (skb == NULL) 
			{
				if (ei_debug > 1)
					netdev_printk(KERN_DEBUG, dev,
				netif_err(ei_local, rx_err, dev,
					  "Couldn't allocate a sk_buff of size %d\n",
					  pkt_len);
				dev->stats.rx_dropped++;
@@ -1420,8 +1416,7 @@ static void ei_receive(struct net_device *dev)
		} 
		else 
		{
			if (ei_debug)
				netdev_printk(KERN_DEBUG, dev,
			netif_err(ei_local, rx_err, dev,
				  "bogus packet: status=%#2x nxpg=%#2x size=%d\n",
				  rx_frame.status, rx_frame.next,
				  rx_frame.count);
@@ -1461,6 +1456,7 @@ static void ei_rx_overrun(struct net_device *dev)
	axnet_dev_t *info = PRIV(dev);
	long e8390_base = dev->base_addr;
	unsigned char was_txing, must_resend = 0;
	struct ei_device *ei_local = netdev_priv(dev);
    
	/*
	 * Record whether a Tx was in progress and then issue the
@@ -1469,8 +1465,7 @@ static void ei_rx_overrun(struct net_device *dev)
	was_txing = inb_p(e8390_base+E8390_CMD) & E8390_TRANS;
	outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD);

	if (ei_debug > 1)
		netdev_printk(KERN_DEBUG, dev, "Receiver overrun\n");
	netif_dbg(ei_local, rx_err, dev, "Receiver overrun\n");
	dev->stats.rx_over_errors++;
    
	/* 
+32 −19
Original line number Diff line number Diff line
@@ -56,9 +56,6 @@
#define ei_inb_p(_p)	 readb((void __iomem *)_p)
#define ei_outb_p(_v,_p) writeb(_v,(void __iomem *)_p)

#define NET_DEBUG  0
#define DEBUG_INIT 2

#define DRV_NAME	"etherh"
#define DRV_VERSION	"1.11"

@@ -67,7 +64,7 @@ static char version[] __initdata =

#include "lib8390.c"

static unsigned int net_debug = NET_DEBUG;
static u32 etherh_msg_enable;

struct etherh_priv {
	void __iomem	*ioc_fast;
@@ -317,8 +314,8 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf
	void __iomem *dma_base, *addr;

	if (ei_local->dmaing) {
		printk(KERN_ERR "%s: DMAing conflict in etherh_block_input: "
			" DMAstat %d irqlock %d\n", dev->name,
		netdev_err(dev, "DMAing conflict in etherh_block_input: "
			   " DMAstat %d irqlock %d\n",
			   ei_local->dmaing, ei_local->irqlock);
		return;
	}
@@ -361,8 +358,7 @@ etherh_block_output (struct net_device *dev, int count, const unsigned char *buf

	while ((readb (addr + EN0_ISR) & ENISR_RDC) == 0)
		if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */
			printk(KERN_ERR "%s: timeout waiting for TX RDC\n",
				dev->name);
			netdev_warn(dev, "timeout waiting for TX RDC\n");
			etherh_reset (dev);
			__NS8390_init (dev, 1);
			break;
@@ -383,8 +379,8 @@ etherh_block_input (struct net_device *dev, int count, struct sk_buff *skb, int
	void __iomem *dma_base, *addr;

	if (ei_local->dmaing) {
		printk(KERN_ERR "%s: DMAing conflict in etherh_block_input: "
			" DMAstat %d irqlock %d\n", dev->name,
		netdev_err(dev, "DMAing conflict in etherh_block_input: "
			   " DMAstat %d irqlock %d\n",
			   ei_local->dmaing, ei_local->irqlock);
		return;
	}
@@ -423,8 +419,8 @@ etherh_get_header (struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_p
	void __iomem *dma_base, *addr;

	if (ei_local->dmaing) {
		printk(KERN_ERR "%s: DMAing conflict in etherh_get_header: "
			" DMAstat %d irqlock %d\n", dev->name,
		netdev_err(dev, "DMAing conflict in etherh_get_header: "
			   " DMAstat %d irqlock %d\n",
			   ei_local->dmaing, ei_local->irqlock);
		return;
	}
@@ -513,8 +509,8 @@ static void __init etherh_banner(void)
{
	static int version_printed;

	if (net_debug && version_printed++ == 0)
		printk(KERN_INFO "%s", version);
	if ((etherh_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0))
		pr_info("%s", version);
}

/*
@@ -625,11 +621,27 @@ static int etherh_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
	return 0;
}

static u32 etherh_get_msglevel(struct net_device *dev)
{
	struct ei_device *ei_local = netdev_priv(dev);

	return ei_local->msg_enable;
}

static void etherh_set_msglevel(struct net_device *dev, u32 v)
{
	struct ei_device *ei_local = netdev_priv(dev);

	ei_local->msg_enable = v;
}

static const struct ethtool_ops etherh_ethtool_ops = {
	.get_settings	= etherh_get_settings,
	.set_settings	= etherh_set_settings,
	.get_drvinfo	= etherh_get_drvinfo,
	.get_ts_info	= ethtool_op_get_ts_info,
	.get_msglevel	= etherh_get_msglevel,
	.set_msglevel	= etherh_set_msglevel,
};

static const struct net_device_ops etherh_netdev_ops = {
@@ -746,6 +758,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
	ei_local->block_output  = etherh_block_output;
	ei_local->get_8390_hdr  = etherh_get_header;
	ei_local->interface_num = 0;
	ei_local->msg_enable = etherh_msg_enable;

	etherh_reset(dev);
	__NS8390_init(dev, 0);
@@ -754,8 +767,8 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
	if (ret)
		goto free;

	printk(KERN_INFO "%s: %s in slot %d, %pM\n",
		dev->name, data->name, ec->slot_no, dev->dev_addr);
	netdev_info(dev, "%s in slot %d, %pM\n",
		    data->name, ec->slot_no, dev->dev_addr);

	ecard_set_drvdata(ec, dev);

Loading