Commit 675ad473 authored by Emil Tantilov's avatar Emil Tantilov Committed by David S. Miller

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: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 709b9326
...@@ -81,23 +81,6 @@ struct e1000_adapter; ...@@ -81,23 +81,6 @@ struct e1000_adapter;
#include "e1000_hw.h" #include "e1000_hw.h"
#ifdef DBG
#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args)
#else
#define E1000_DBG(args...)
#endif
#define E1000_ERR(args...) printk(KERN_ERR "e1000: " args)
#define PFX "e1000: "
#define DPRINTK(nlevel, klevel, fmt, args...) \
do { \
if (NETIF_MSG_##nlevel & adapter->msg_enable) \
printk(KERN_##klevel PFX "%s: %s: " fmt, \
adapter->netdev->name, __func__, ##args); \
} while (0)
#define E1000_MAX_INTR 10 #define E1000_MAX_INTR 10
/* TX/RX descriptor defines */ /* TX/RX descriptor defines */
...@@ -335,6 +318,25 @@ enum e1000_state_t { ...@@ -335,6 +318,25 @@ enum e1000_state_t {
__E1000_DOWN __E1000_DOWN
}; };
#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
extern struct net_device *e1000_get_hw_dev(struct e1000_hw *hw);
#define e_dbg(format, arg...) \
netdev_dbg(e1000_get_hw_dev(hw), format, ## arg)
#define e_err(format, arg...) \
netdev_err(adapter->netdev, format, ## arg)
#define e_info(format, arg...) \
netdev_info(adapter->netdev, format, ## arg)
#define e_warn(format, arg...) \
netdev_warn(adapter->netdev, format, ## arg)
#define e_notice(format, arg...) \
netdev_notice(adapter->netdev, format, ## arg)
#define e_dev_info(format, arg...) \
dev_info(&adapter->pdev->dev, format, ## arg)
#define e_dev_warn(format, arg...) \
dev_warn(&adapter->pdev->dev, format, ## arg)
extern char e1000_driver_name[]; extern char e1000_driver_name[];
extern const char e1000_driver_version[]; extern const char e1000_driver_version[];
...@@ -352,5 +354,6 @@ extern bool e1000_has_link(struct e1000_adapter *adapter); ...@@ -352,5 +354,6 @@ extern bool e1000_has_link(struct e1000_adapter *adapter);
extern void e1000_power_up_phy(struct e1000_adapter *); extern void e1000_power_up_phy(struct e1000_adapter *);
extern void e1000_set_ethtool_ops(struct net_device *netdev); extern void e1000_set_ethtool_ops(struct net_device *netdev);
extern void e1000_check_options(struct e1000_adapter *adapter); extern void e1000_check_options(struct e1000_adapter *adapter);
extern char *e1000_get_hw_dev_name(struct e1000_hw *hw);
#endif /* _E1000_H_ */ #endif /* _E1000_H_ */
...@@ -346,7 +346,7 @@ static int e1000_set_tso(struct net_device *netdev, u32 data) ...@@ -346,7 +346,7 @@ static int e1000_set_tso(struct net_device *netdev, u32 data)
netdev->features &= ~NETIF_F_TSO6; netdev->features &= ~NETIF_F_TSO6;
DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled"); e_info("TSO is %s\n", data ? "Enabled" : "Disabled");
adapter->tso_force = true; adapter->tso_force = true;
return 0; return 0;
} }
...@@ -714,9 +714,9 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, int reg, ...@@ -714,9 +714,9 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, int reg,
writel(write & test[i], address); writel(write & test[i], address);
read = readl(address); read = readl(address);
if (read != (write & test[i] & mask)) { if (read != (write & test[i] & mask)) {
DPRINTK(DRV, ERR, "pattern test reg %04X failed: " e_info("pattern test reg %04X failed: "
"got 0x%08X expected 0x%08X\n", "got 0x%08X expected 0x%08X\n",
reg, read, (write & test[i] & mask)); reg, read, (write & test[i] & mask));
*data = reg; *data = reg;
return true; return true;
} }
...@@ -734,9 +734,9 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, int reg, ...@@ -734,9 +734,9 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, int reg,
writel(write & mask, address); writel(write & mask, address);
read = readl(address); read = readl(address);
if ((read & mask) != (write & mask)) { if ((read & mask) != (write & mask)) {
DPRINTK(DRV, ERR, "set/check reg %04X test failed: " e_err("set/check reg %04X test failed: "
"got 0x%08X expected 0x%08X\n", "got 0x%08X expected 0x%08X\n",
reg, (read & mask), (write & mask)); reg, (read & mask), (write & mask));
*data = reg; *data = reg;
return true; return true;
} }
...@@ -779,8 +779,8 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) ...@@ -779,8 +779,8 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
ew32(STATUS, toggle); ew32(STATUS, toggle);
after = er32(STATUS) & toggle; after = er32(STATUS) & toggle;
if (value != after) { if (value != after) {
DPRINTK(DRV, ERR, "failed STATUS register test got: " e_err("failed STATUS register test got: "
"0x%08X expected: 0x%08X\n", after, value); "0x%08X expected: 0x%08X\n", after, value);
*data = 1; *data = 1;
return 1; return 1;
} }
...@@ -894,8 +894,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) ...@@ -894,8 +894,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
*data = 1; *data = 1;
return -1; return -1;
} }
DPRINTK(HW, INFO, "testing %s interrupt\n", e_info("testing %s interrupt\n", (shared_int ? "shared" : "unshared"));
(shared_int ? "shared" : "unshared"));
/* Disable all the interrupts */ /* Disable all the interrupts */
ew32(IMC, 0xFFFFFFFF); ew32(IMC, 0xFFFFFFFF);
...@@ -1564,7 +1563,7 @@ static void e1000_diag_test(struct net_device *netdev, ...@@ -1564,7 +1563,7 @@ static void e1000_diag_test(struct net_device *netdev,
u8 forced_speed_duplex = hw->forced_speed_duplex; u8 forced_speed_duplex = hw->forced_speed_duplex;
u8 autoneg = hw->autoneg; u8 autoneg = hw->autoneg;
DPRINTK(HW, INFO, "offline testing starting\n"); e_info("offline testing starting\n");
/* Link test performed before hardware reset so autoneg doesn't /* Link test performed before hardware reset so autoneg doesn't
* interfere with test result */ * interfere with test result */
...@@ -1604,7 +1603,7 @@ static void e1000_diag_test(struct net_device *netdev, ...@@ -1604,7 +1603,7 @@ static void e1000_diag_test(struct net_device *netdev,
if (if_running) if (if_running)
dev_open(netdev); dev_open(netdev);
} else { } else {
DPRINTK(HW, INFO, "online testing starting\n"); e_info("online testing starting\n");
/* Online tests */ /* Online tests */
if (e1000_link_test(adapter, &data[4])) if (e1000_link_test(adapter, &data[4]))
eth_test->flags |= ETH_TEST_FL_FAILED; eth_test->flags |= ETH_TEST_FL_FAILED;
...@@ -1697,7 +1696,7 @@ static void e1000_get_wol(struct net_device *netdev, ...@@ -1697,7 +1696,7 @@ static void e1000_get_wol(struct net_device *netdev,
wol->supported &= ~WAKE_UCAST; wol->supported &= ~WAKE_UCAST;
if (adapter->wol & E1000_WUFC_EX) if (adapter->wol & E1000_WUFC_EX)
DPRINTK(DRV, ERR, "Interface does not support " e_err("Interface does not support "
"directed (unicast) frame wake-up packets\n"); "directed (unicast) frame wake-up packets\n");
break; break;
default: default:
...@@ -1731,8 +1730,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) ...@@ -1731,8 +1730,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
switch (hw->device_id) { switch (hw->device_id) {
case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
if (wol->wolopts & WAKE_UCAST) { if (wol->wolopts & WAKE_UCAST) {
DPRINTK(DRV, ERR, "Interface does not support " e_err("Interface does not support "
"directed (unicast) frame wake-up packets\n"); "directed (unicast) frame wake-up packets\n");
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
break; break;
......
This diff is collapsed.
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "e1000_osdep.h" #include "e1000_osdep.h"
/* Forward declarations of structures used by the shared code */ /* Forward declarations of structures used by the shared code */
struct e1000_hw; struct e1000_hw;
struct e1000_hw_stats; struct e1000_hw_stats;
......
This diff is collapsed.
...@@ -41,20 +41,6 @@ ...@@ -41,20 +41,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/sched.h> #include <linux/sched.h>
#ifdef DBG
#define DEBUGOUT(S) printk(KERN_DEBUG S "\n")
#define DEBUGOUT1(S, A...) printk(KERN_DEBUG S "\n", A)
#else
#define DEBUGOUT(S)
#define DEBUGOUT1(S, A...)
#endif
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define DEBUGOUT2 DEBUGOUT1
#define DEBUGOUT3 DEBUGOUT2
#define DEBUGOUT7 DEBUGOUT3
#define er32(reg) \ #define er32(reg) \
(readl(hw->hw_addr + ((hw->mac_type >= e1000_82543) \ (readl(hw->hw_addr + ((hw->mac_type >= e1000_82543) \
? E1000_##reg : E1000_82542_##reg))) ? E1000_##reg : E1000_82542_##reg)))
......
...@@ -226,17 +226,16 @@ static int __devinit e1000_validate_option(unsigned int *value, ...@@ -226,17 +226,16 @@ static int __devinit e1000_validate_option(unsigned int *value,
case enable_option: case enable_option:
switch (*value) { switch (*value) {
case OPTION_ENABLED: case OPTION_ENABLED:
DPRINTK(PROBE, INFO, "%s Enabled\n", opt->name); e_dev_info("%s Enabled\n", opt->name);
return 0; return 0;
case OPTION_DISABLED: case OPTION_DISABLED:
DPRINTK(PROBE, INFO, "%s Disabled\n", opt->name); e_dev_info("%s Disabled\n", opt->name);
return 0; return 0;
} }
break; break;
case range_option: case range_option:
if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) {
DPRINTK(PROBE, INFO, e_dev_info("%s set to %i\n", opt->name, *value);
"%s set to %i\n", opt->name, *value);
return 0; return 0;
} }
break; break;
...@@ -248,7 +247,7 @@ static int __devinit e1000_validate_option(unsigned int *value, ...@@ -248,7 +247,7 @@ static int __devinit e1000_validate_option(unsigned int *value,
ent = &opt->arg.l.p[i]; ent = &opt->arg.l.p[i];
if (*value == ent->i) { if (*value == ent->i) {
if (ent->str[0] != '\0') if (ent->str[0] != '\0')
DPRINTK(PROBE, INFO, "%s\n", ent->str); e_dev_info("%s\n", ent->str);
return 0; return 0;
} }
} }
...@@ -258,7 +257,7 @@ static int __devinit e1000_validate_option(unsigned int *value, ...@@ -258,7 +257,7 @@ static int __devinit e1000_validate_option(unsigned int *value,
BUG(); BUG();
} }
DPRINTK(PROBE, INFO, "Invalid %s value specified (%i) %s\n", e_dev_info("Invalid %s value specified (%i) %s\n",
opt->name, *value, opt->err); opt->name, *value, opt->err);
*value = opt->def; *value = opt->def;
return -1; return -1;
...@@ -283,9 +282,8 @@ void __devinit e1000_check_options(struct e1000_adapter *adapter) ...@@ -283,9 +282,8 @@ void __devinit e1000_check_options(struct e1000_adapter *adapter)
int bd = adapter->bd_number; int bd = adapter->bd_number;
if (bd >= E1000_MAX_NIC) { if (bd >= E1000_MAX_NIC) {
DPRINTK(PROBE, NOTICE, e_dev_warn("Warning: no configuration for board #%i "
"Warning: no configuration for board #%i\n", bd); "using defaults for all values\n", bd);
DPRINTK(PROBE, NOTICE, "Using defaults for all values\n");
} }
{ /* Transmit Descriptor Count */ { /* Transmit Descriptor Count */
...@@ -472,19 +470,17 @@ void __devinit e1000_check_options(struct e1000_adapter *adapter) ...@@ -472,19 +470,17 @@ void __devinit e1000_check_options(struct e1000_adapter *adapter)
adapter->itr = InterruptThrottleRate[bd]; adapter->itr = InterruptThrottleRate[bd];
switch (adapter->itr) { switch (adapter->itr) {
case 0: case 0:
DPRINTK(PROBE, INFO, "%s turned off\n", e_dev_info("%s turned off\n", opt.name);
opt.name);
break; break;
case 1: case 1:
DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", e_dev_info("%s set to dynamic mode\n",
opt.name); opt.name);
adapter->itr_setting = adapter->itr; adapter->itr_setting = adapter->itr;
adapter->itr = 20000; adapter->itr = 20000;
break; break;
case 3: case 3:
DPRINTK(PROBE, INFO, e_dev_info("%s set to dynamic conservative "
"%s set to dynamic conservative mode\n", "mode\n", opt.name);
opt.name);
adapter->itr_setting = adapter->itr; adapter->itr_setting = adapter->itr;
adapter->itr = 20000; adapter->itr = 20000;
break; break;
...@@ -543,19 +539,18 @@ static void __devinit e1000_check_fiber_options(struct e1000_adapter *adapter) ...@@ -543,19 +539,18 @@ static void __devinit e1000_check_fiber_options(struct e1000_adapter *adapter)
{ {
int bd = adapter->bd_number; int bd = adapter->bd_number;
if (num_Speed > bd) { if (num_Speed > bd) {
DPRINTK(PROBE, INFO, "Speed not valid for fiber adapters, " e_dev_info("Speed not valid for fiber adapters, parameter "
"parameter ignored\n"); "ignored\n");
} }
if (num_Duplex > bd) { if (num_Duplex > bd) {
DPRINTK(PROBE, INFO, "Duplex not valid for fiber adapters, " e_dev_info("Duplex not valid for fiber adapters, parameter "
"parameter ignored\n"); "ignored\n");
} }
if ((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) { if ((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) {
DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is " e_dev_info("AutoNeg other than 1000/Full is not valid for fiber"
"not valid for fiber adapters, " "adapters, parameter ignored\n");
"parameter ignored\n");
} }
} }
...@@ -619,9 +614,8 @@ static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -619,9 +614,8 @@ static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter)
} }
if ((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) { if ((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) {
DPRINTK(PROBE, INFO, e_dev_info("AutoNeg specified along with Speed or Duplex, "
"AutoNeg specified along with Speed or Duplex, " "parameter ignored\n");
"parameter ignored\n");
adapter->hw.autoneg_advertised = AUTONEG_ADV_DEFAULT; adapter->hw.autoneg_advertised = AUTONEG_ADV_DEFAULT;
} else { /* Autoneg */ } else { /* Autoneg */
static const struct e1000_opt_list an_list[] = static const struct e1000_opt_list an_list[] =
...@@ -680,79 +674,72 @@ static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -680,79 +674,72 @@ static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter)
case 0: case 0:
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
if ((num_Speed > bd) && (speed != 0 || dplx != 0)) if ((num_Speed > bd) && (speed != 0 || dplx != 0))
DPRINTK(PROBE, INFO, e_dev_info("Speed and duplex autonegotiation "
"Speed and duplex autonegotiation enabled\n"); "enabled\n");
break; break;
case HALF_DUPLEX: case HALF_DUPLEX:
DPRINTK(PROBE, INFO, "Half Duplex specified without Speed\n"); e_dev_info("Half Duplex specified without Speed\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at " e_dev_info("Using Autonegotiation at Half Duplex only\n");
"Half Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
ADVERTISE_100_HALF; ADVERTISE_100_HALF;
break; break;
case FULL_DUPLEX: case FULL_DUPLEX:
DPRINTK(PROBE, INFO, "Full Duplex specified without Speed\n"); e_dev_info("Full Duplex specified without Speed\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at " e_dev_info("Using Autonegotiation at Full Duplex only\n");
"Full Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_FULL | adapter->hw.autoneg_advertised = ADVERTISE_10_FULL |
ADVERTISE_100_FULL | ADVERTISE_100_FULL |
ADVERTISE_1000_FULL; ADVERTISE_1000_FULL;
break; break;
case SPEED_10: case SPEED_10:
DPRINTK(PROBE, INFO, "10 Mbps Speed specified " e_dev_info("10 Mbps Speed specified without Duplex\n");
"without Duplex\n"); e_dev_info("Using Autonegotiation at 10 Mbps only\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at 10 Mbps only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
ADVERTISE_10_FULL; ADVERTISE_10_FULL;
break; break;
case SPEED_10 + HALF_DUPLEX: case SPEED_10 + HALF_DUPLEX:
DPRINTK(PROBE, INFO, "Forcing to 10 Mbps Half Duplex\n"); e_dev_info("Forcing to 10 Mbps Half Duplex\n");
adapter->hw.autoneg = adapter->fc_autoneg = 0; adapter->hw.autoneg = adapter->fc_autoneg = 0;
adapter->hw.forced_speed_duplex = e1000_10_half; adapter->hw.forced_speed_duplex = e1000_10_half;
adapter->hw.autoneg_advertised = 0; adapter->hw.autoneg_advertised = 0;
break; break;
case SPEED_10 + FULL_DUPLEX: case SPEED_10 + FULL_DUPLEX:
DPRINTK(PROBE, INFO, "Forcing to 10 Mbps Full Duplex\n"); e_dev_info("Forcing to 10 Mbps Full Duplex\n");
adapter->hw.autoneg = adapter->fc_autoneg = 0; adapter->hw.autoneg = adapter->fc_autoneg = 0;
adapter->hw.forced_speed_duplex = e1000_10_full; adapter->hw.forced_speed_duplex = e1000_10_full;
adapter->hw.autoneg_advertised = 0; adapter->hw.autoneg_advertised = 0;
break; break;
case SPEED_100: case SPEED_100:
DPRINTK(PROBE, INFO, "100 Mbps Speed specified " e_dev_info("100 Mbps Speed specified without Duplex\n");
"without Duplex\n"); e_dev_info("Using Autonegotiation at 100 Mbps only\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"100 Mbps only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_100_HALF | adapter->hw.autoneg_advertised = ADVERTISE_100_HALF |
ADVERTISE_100_FULL; ADVERTISE_100_FULL;
break; break;
case SPEED_100 + HALF_DUPLEX: case SPEED_100 + HALF_DUPLEX:
DPRINTK(PROBE, INFO, "Forcing to 100 Mbps Half Duplex\n"); e_dev_info("Forcing to 100 Mbps Half Duplex\n");
adapter->hw.autoneg = adapter->fc_autoneg = 0; adapter->hw.autoneg = adapter->fc_autoneg = 0;
adapter->hw.forced_speed_duplex = e1000_100_half; adapter->hw.forced_speed_duplex = e1000_100_half;
adapter->hw.autoneg_advertised = 0; adapter->hw.autoneg_advertised = 0;
break; break;
case SPEED_100 + FULL_DUPLEX: case SPEED_100 + FULL_DUPLEX:
DPRINTK(PROBE, INFO, "Forcing to 100 Mbps Full Duplex\n"); e_dev_info("Forcing to 100 Mbps Full Duplex\n");
adapter->hw.autoneg = adapter->fc_autoneg = 0; adapter->hw.autoneg = adapter->fc_autoneg = 0;
adapter->hw.forced_speed_duplex = e1000_100_full; adapter->hw.forced_speed_duplex = e1000_100_full;
adapter->hw.autoneg_advertised = 0; adapter->hw.autoneg_advertised = 0;
break; break;
case SPEED_1000: case SPEED_1000:
DPRINTK(PROBE, INFO, "1000 Mbps Speed specified without " e_dev_info("1000 Mbps Speed specified without Duplex\n");
"Duplex\n");
goto full_duplex_only; goto full_duplex_only;
case SPEED_1000 + HALF_DUPLEX: case SPEED_1000 + HALF_DUPLEX:
DPRINTK(PROBE, INFO, e_dev_info("Half Duplex is not supported at 1000 Mbps\n");
"Half Duplex is not supported at 1000 Mbps\n");
/* fall through */ /* fall through */
case SPEED_1000 + FULL_DUPLEX: case SPEED_1000 + FULL_DUPLEX:
full_duplex_only: full_duplex_only:
DPRINTK(PROBE, INFO, e_dev_info("Using Autonegotiation at 1000 Mbps Full Duplex "
"Using Autonegotiation at 1000 Mbps Full Duplex only\n"); "only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL; adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL;
break; break;
...@@ -762,9 +749,8 @@ static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -762,9 +749,8 @@ static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter)
/* Speed, AutoNeg and MDI/MDI-X must all play nice */ /* Speed, AutoNeg and MDI/MDI-X must all play nice */
if (e1000_validate_mdi_setting(&(adapter->hw)) < 0) { if (e1000_validate_mdi_setting(&(adapter->hw)) < 0) {
DPRINTK(PROBE, INFO, e_dev_info("Speed, AutoNeg and MDI-X specs are incompatible. "
"Speed, AutoNeg and MDI-X specifications are " "Setting MDI-X to a compatible value.\n");
"incompatible. Setting MDI-X to a compatible value.\n");
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment