aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_ethtool.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2010-04-27 10:02:58 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-27 20:05:03 -0400
commit675ad47375c76a7c3be4ace9554d92cd55518ced (patch)
tree54acb7e8aa4db5e93b960d565b1cc2dce45988b9 /drivers/net/e1000/e1000_ethtool.c
parent709b9326ef6fc1b7e379d47d5f39ebc27dad3f4d (diff)
e1000: Use netdev_<level>, pr_<level> and dev_<level>
This patch is an alternative to similar patch provided by Joe Perches. Substitute DPRINTK macro for e_<level> that uses netdev_<level> and dev_<level> similar to e1000e. - Convert printk to pr_<level> where applicable. - Use common #define pr_fmt for the driver. - Use dev_<level> for displaying text in parts of the driver where the interface name is not assigned (like e1000_param.c). - Better align test with the new macros. CC: Joe Perches <joe@perches.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 616b405a1cb1..d6931cabe421 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -346,7 +346,7 @@ static int e1000_set_tso(struct net_device *netdev, u32 data)
346 346
347 netdev->features &= ~NETIF_F_TSO6; 347 netdev->features &= ~NETIF_F_TSO6;
348 348
349 DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled"); 349 e_info("TSO is %s\n", data ? "Enabled" : "Disabled");
350 adapter->tso_force = true; 350 adapter->tso_force = true;
351 return 0; 351 return 0;
352} 352}
@@ -714,9 +714,9 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, int reg,
714 writel(write & test[i], address); 714 writel(write & test[i], address);
715 read = readl(address); 715 read = readl(address);
716 if (read != (write & test[i] & mask)) { 716 if (read != (write & test[i] & mask)) {
717 DPRINTK(DRV, ERR, "pattern test reg %04X failed: " 717 e_info("pattern test reg %04X failed: "
718 "got 0x%08X expected 0x%08X\n", 718 "got 0x%08X expected 0x%08X\n",
719 reg, read, (write & test[i] & mask)); 719 reg, read, (write & test[i] & mask));
720 *data = reg; 720 *data = reg;
721 return true; 721 return true;
722 } 722 }
@@ -734,9 +734,9 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, int reg,
734 writel(write & mask, address); 734 writel(write & mask, address);
735 read = readl(address); 735 read = readl(address);
736 if ((read & mask) != (write & mask)) { 736 if ((read & mask) != (write & mask)) {
737 DPRINTK(DRV, ERR, "set/check reg %04X test failed: " 737 e_err("set/check reg %04X test failed: "
738 "got 0x%08X expected 0x%08X\n", 738 "got 0x%08X expected 0x%08X\n",
739 reg, (read & mask), (write & mask)); 739 reg, (read & mask), (write & mask));
740 *data = reg; 740 *data = reg;
741 return true; 741 return true;
742 } 742 }
@@ -779,8 +779,8 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
779 ew32(STATUS, toggle); 779 ew32(STATUS, toggle);
780 after = er32(STATUS) & toggle; 780 after = er32(STATUS) & toggle;
781 if (value != after) { 781 if (value != after) {
782 DPRINTK(DRV, ERR, "failed STATUS register test got: " 782 e_err("failed STATUS register test got: "
783 "0x%08X expected: 0x%08X\n", after, value); 783 "0x%08X expected: 0x%08X\n", after, value);
784 *data = 1; 784 *data = 1;
785 return 1; 785 return 1;
786 } 786 }
@@ -894,8 +894,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
894 *data = 1; 894 *data = 1;
895 return -1; 895 return -1;
896 } 896 }
897 DPRINTK(HW, INFO, "testing %s interrupt\n", 897 e_info("testing %s interrupt\n", (shared_int ? "shared" : "unshared"));
898 (shared_int ? "shared" : "unshared"));
899 898
900 /* Disable all the interrupts */ 899 /* Disable all the interrupts */
901 ew32(IMC, 0xFFFFFFFF); 900 ew32(IMC, 0xFFFFFFFF);
@@ -1564,7 +1563,7 @@ static void e1000_diag_test(struct net_device *netdev,
1564 u8 forced_speed_duplex = hw->forced_speed_duplex; 1563 u8 forced_speed_duplex = hw->forced_speed_duplex;
1565 u8 autoneg = hw->autoneg; 1564 u8 autoneg = hw->autoneg;
1566 1565
1567 DPRINTK(HW, INFO, "offline testing starting\n"); 1566 e_info("offline testing starting\n");
1568 1567
1569 /* Link test performed before hardware reset so autoneg doesn't 1568 /* Link test performed before hardware reset so autoneg doesn't
1570 * interfere with test result */ 1569 * interfere with test result */
@@ -1604,7 +1603,7 @@ static void e1000_diag_test(struct net_device *netdev,
1604 if (if_running) 1603 if (if_running)
1605 dev_open(netdev); 1604 dev_open(netdev);
1606 } else { 1605 } else {
1607 DPRINTK(HW, INFO, "online testing starting\n"); 1606 e_info("online testing starting\n");
1608 /* Online tests */ 1607 /* Online tests */
1609 if (e1000_link_test(adapter, &data[4])) 1608 if (e1000_link_test(adapter, &data[4]))
1610 eth_test->flags |= ETH_TEST_FL_FAILED; 1609 eth_test->flags |= ETH_TEST_FL_FAILED;
@@ -1697,7 +1696,7 @@ static void e1000_get_wol(struct net_device *netdev,
1697 wol->supported &= ~WAKE_UCAST; 1696 wol->supported &= ~WAKE_UCAST;
1698 1697
1699 if (adapter->wol & E1000_WUFC_EX) 1698 if (adapter->wol & E1000_WUFC_EX)
1700 DPRINTK(DRV, ERR, "Interface does not support " 1699 e_err("Interface does not support "
1701 "directed (unicast) frame wake-up packets\n"); 1700 "directed (unicast) frame wake-up packets\n");
1702 break; 1701 break;
1703 default: 1702 default:
@@ -1731,8 +1730,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1731 switch (hw->device_id) { 1730 switch (hw->device_id) {
1732 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: 1731 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
1733 if (wol->wolopts & WAKE_UCAST) { 1732 if (wol->wolopts & WAKE_UCAST) {
1734 DPRINTK(DRV, ERR, "Interface does not support " 1733 e_err("Interface does not support "
1735 "directed (unicast) frame wake-up packets\n"); 1734 "directed (unicast) frame wake-up packets\n");
1736 return -EOPNOTSUPP; 1735 return -EOPNOTSUPP;
1737 } 1736 }
1738 break; 1737 break;