#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"
#include "lib8390.c"
-static u32 etherh_msg_enable;
+static unsigned int net_debug = NET_DEBUG;
struct etherh_priv {
void __iomem *ioc_fast;
void __iomem *dma_base, *addr;
if (ei_local->dmaing) {
- netdev_err(dev, "DMAing conflict in etherh_block_input: "
- " DMAstat %d irqlock %d\n",
- ei_local->dmaing, ei_local->irqlock);
+ printk(KERN_ERR "%s: DMAing conflict in etherh_block_input: "
+ " DMAstat %d irqlock %d\n", dev->name,
+ ei_local->dmaing, ei_local->irqlock);
return;
}
while ((readb (addr + EN0_ISR) & ENISR_RDC) == 0)
if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */
- netdev_warn(dev, "timeout waiting for TX RDC\n");
+ printk(KERN_ERR "%s: timeout waiting for TX RDC\n",
+ dev->name);
etherh_reset (dev);
__NS8390_init (dev, 1);
break;
void __iomem *dma_base, *addr;
if (ei_local->dmaing) {
- netdev_err(dev, "DMAing conflict in etherh_block_input: "
- " DMAstat %d irqlock %d\n",
- ei_local->dmaing, ei_local->irqlock);
+ printk(KERN_ERR "%s: DMAing conflict in etherh_block_input: "
+ " DMAstat %d irqlock %d\n", dev->name,
+ ei_local->dmaing, ei_local->irqlock);
return;
}
void __iomem *dma_base, *addr;
if (ei_local->dmaing) {
- netdev_err(dev, "DMAing conflict in etherh_get_header: "
- " DMAstat %d irqlock %d\n",
- ei_local->dmaing, ei_local->irqlock);
+ printk(KERN_ERR "%s: DMAing conflict in etherh_get_header: "
+ " DMAstat %d irqlock %d\n", dev->name,
+ ei_local->dmaing, ei_local->irqlock);
return;
}
{
static int version_printed;
- if ((etherh_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0))
- pr_info("%s", version);
+ if (net_debug && version_printed++ == 0)
+ printk(KERN_INFO "%s", version);
}
/*
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 = {
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);
if (ret)
goto free;
- netdev_info(dev, "%s in slot %d, %pM\n",
- data->name, ec->slot_no, dev->dev_addr);
+ printk(KERN_INFO "%s: %s in slot %d, %pM\n",
+ dev->name, data->name, ec->slot_no, dev->dev_addr);
ecard_set_drvdata(ec, dev);