diff options
Diffstat (limited to 'drivers/net/ethernet/8390/ax88796.c')
-rw-r--r-- | drivers/net/ethernet/8390/ax88796.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index 36fa577970bb..8ed5b34d7553 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c | |||
@@ -78,6 +78,8 @@ static unsigned char version[] = "ax88796.c: Copyright 2005,2007 Simtec Electron | |||
78 | 78 | ||
79 | #define AX_GPOC_PPDSET BIT(6) | 79 | #define AX_GPOC_PPDSET BIT(6) |
80 | 80 | ||
81 | static u32 ax_msg_enable; | ||
82 | |||
81 | /* device private data */ | 83 | /* device private data */ |
82 | 84 | ||
83 | struct ax_device { | 85 | struct ax_device { |
@@ -147,8 +149,7 @@ static void ax_reset_8390(struct net_device *dev) | |||
147 | unsigned long reset_start_time = jiffies; | 149 | unsigned long reset_start_time = jiffies; |
148 | void __iomem *addr = (void __iomem *)dev->base_addr; | 150 | void __iomem *addr = (void __iomem *)dev->base_addr; |
149 | 151 | ||
150 | if (ei_debug > 1) | 152 | netif_dbg(ei_local, hw, dev, "resetting the 8390 t=%ld...\n", jiffies); |
151 | netdev_dbg(dev, "resetting the 8390 t=%ld\n", jiffies); | ||
152 | 153 | ||
153 | ei_outb(ei_inb(addr + NE_RESET), addr + NE_RESET); | 154 | ei_outb(ei_inb(addr + NE_RESET), addr + NE_RESET); |
154 | 155 | ||
@@ -496,12 +497,28 @@ static int ax_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
496 | return phy_ethtool_sset(phy_dev, cmd); | 497 | return phy_ethtool_sset(phy_dev, cmd); |
497 | } | 498 | } |
498 | 499 | ||
500 | static u32 ax_get_msglevel(struct net_device *dev) | ||
501 | { | ||
502 | struct ei_device *ei_local = netdev_priv(dev); | ||
503 | |||
504 | return ei_local->msg_enable; | ||
505 | } | ||
506 | |||
507 | static void ax_set_msglevel(struct net_device *dev, u32 v) | ||
508 | { | ||
509 | struct ei_device *ei_local = netdev_priv(dev); | ||
510 | |||
511 | ei_local->msg_enable = v; | ||
512 | } | ||
513 | |||
499 | static const struct ethtool_ops ax_ethtool_ops = { | 514 | static const struct ethtool_ops ax_ethtool_ops = { |
500 | .get_drvinfo = ax_get_drvinfo, | 515 | .get_drvinfo = ax_get_drvinfo, |
501 | .get_settings = ax_get_settings, | 516 | .get_settings = ax_get_settings, |
502 | .set_settings = ax_set_settings, | 517 | .set_settings = ax_set_settings, |
503 | .get_link = ethtool_op_get_link, | 518 | .get_link = ethtool_op_get_link, |
504 | .get_ts_info = ethtool_op_get_ts_info, | 519 | .get_ts_info = ethtool_op_get_ts_info, |
520 | .get_msglevel = ax_get_msglevel, | ||
521 | .set_msglevel = ax_set_msglevel, | ||
505 | }; | 522 | }; |
506 | 523 | ||
507 | #ifdef CONFIG_AX88796_93CX6 | 524 | #ifdef CONFIG_AX88796_93CX6 |
@@ -763,6 +780,7 @@ static int ax_init_dev(struct net_device *dev) | |||
763 | ei_local->block_output = &ax_block_output; | 780 | ei_local->block_output = &ax_block_output; |
764 | ei_local->get_8390_hdr = &ax_get_8390_hdr; | 781 | ei_local->get_8390_hdr = &ax_get_8390_hdr; |
765 | ei_local->priv = 0; | 782 | ei_local->priv = 0; |
783 | ei_local->msg_enable = ax_msg_enable; | ||
766 | 784 | ||
767 | dev->netdev_ops = &ax_netdev_ops; | 785 | dev->netdev_ops = &ax_netdev_ops; |
768 | dev->ethtool_ops = &ax_ethtool_ops; | 786 | dev->ethtool_ops = &ax_ethtool_ops; |