aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/8390/mac8390.c
diff options
context:
space:
mode:
authorMatthew Whitehead <tedheadster@gmail.com>2013-12-11 17:00:59 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-11 17:21:02 -0500
commitc45f812f0280c13f1b7992be5e0de512312a9e8f (patch)
tree6dd1b74fedec396c1322202b634fe12eea5d4540 /drivers/net/ethernet/8390/mac8390.c
parent7e9805696428113e34625a65a30dbc62cb78acc5 (diff)
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: Matthew Whitehead <tedheadster@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390/mac8390.c')
-rw-r--r--drivers/net/ethernet/8390/mac8390.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/ethernet/8390/mac8390.c b/drivers/net/ethernet/8390/mac8390.c
index 88ccc8b14f0a..90e825e8abfe 100644
--- a/drivers/net/ethernet/8390/mac8390.c
+++ b/drivers/net/ethernet/8390/mac8390.c
@@ -167,6 +167,7 @@ static void slow_sane_block_output(struct net_device *dev, int count,
167 const unsigned char *buf, int start_page); 167 const unsigned char *buf, int start_page);
168static void word_memcpy_tocard(unsigned long tp, const void *fp, int count); 168static void word_memcpy_tocard(unsigned long tp, const void *fp, int count);
169static void word_memcpy_fromcard(void *tp, unsigned long fp, int count); 169static void word_memcpy_fromcard(void *tp, unsigned long fp, int count);
170static u32 mac8390_msg_enable;
170 171
171static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev) 172static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
172{ 173{
@@ -402,6 +403,7 @@ struct net_device * __init mac8390_probe(int unit)
402 struct net_device *dev; 403 struct net_device *dev;
403 struct nubus_dev *ndev = NULL; 404 struct nubus_dev *ndev = NULL;
404 int err = -ENODEV; 405 int err = -ENODEV;
406 struct ei_device *ei_local;
405 407
406 static unsigned int slots; 408 static unsigned int slots;
407 409
@@ -440,6 +442,10 @@ struct net_device * __init mac8390_probe(int unit)
440 442
441 if (!ndev) 443 if (!ndev)
442 goto out; 444 goto out;
445
446 ei_local = netdev_priv(dev);
447 ei_local->msg_enable = mac8390_msg_enable;
448
443 err = register_netdev(dev); 449 err = register_netdev(dev);
444 if (err) 450 if (err)
445 goto out; 451 goto out;
@@ -660,19 +666,22 @@ static int mac8390_close(struct net_device *dev)
660 666
661static void mac8390_no_reset(struct net_device *dev) 667static void mac8390_no_reset(struct net_device *dev)
662{ 668{
669 struct ei_device *ei_local = netdev_priv(dev);
670
663 ei_status.txing = 0; 671 ei_status.txing = 0;
664 if (ei_debug > 1) 672 netif_info(ei_local, hw, dev, "reset not supported\n");
665 pr_info("reset not supported\n");
666} 673}
667 674
668static void interlan_reset(struct net_device *dev) 675static void interlan_reset(struct net_device *dev)
669{ 676{
670 unsigned char *target = nubus_slot_addr(IRQ2SLOT(dev->irq)); 677 unsigned char *target = nubus_slot_addr(IRQ2SLOT(dev->irq));
671 if (ei_debug > 1) 678 struct ei_device *ei_local = netdev_priv(dev);
672 pr_info("Need to reset the NS8390 t=%lu...", jiffies); 679
680 netif_info(ei_local, hw, dev, "Need to reset the NS8390 t=%lu...",
681 jiffies);
673 ei_status.txing = 0; 682 ei_status.txing = 0;
674 target[0xC0000] = 0; 683 target[0xC0000] = 0;
675 if (ei_debug > 1) 684 if (netif_msg_hw(ei_local))
676 pr_cont("reset complete\n"); 685 pr_cont("reset complete\n");
677} 686}
678 687