提交 453ca931 编写于 作者: A Andy Shevchenko 提交者: David S. Miller

pch_gbe: convert pr_* to netdev_*

We may use nice macros to prefix our messages with proper device name.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 bd796809
...@@ -633,6 +633,8 @@ struct pch_gbe_adapter { ...@@ -633,6 +633,8 @@ struct pch_gbe_adapter {
struct pci_dev *ptp_pdev; struct pci_dev *ptp_pdev;
}; };
#define pch_gbe_hw_to_adapter(hw) container_of(hw, struct pch_gbe_adapter, hw)
extern const char pch_driver_version[]; extern const char pch_driver_version[];
/* pch_gbe_main.c */ /* pch_gbe_main.c */
......
...@@ -71,7 +71,9 @@ static s32 pch_gbe_plat_init_hw(struct pch_gbe_hw *hw) ...@@ -71,7 +71,9 @@ static s32 pch_gbe_plat_init_hw(struct pch_gbe_hw *hw)
ret_val = pch_gbe_phy_get_id(hw); ret_val = pch_gbe_phy_get_id(hw);
if (ret_val) { if (ret_val) {
pr_err("pch_gbe_phy_get_id error\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
netdev_err(adapter->netdev, "pch_gbe_phy_get_id error\n");
return ret_val; return ret_val;
} }
pch_gbe_phy_init_setting(hw); pch_gbe_phy_init_setting(hw);
...@@ -116,7 +118,9 @@ static void pch_gbe_plat_init_function_pointers(struct pch_gbe_hw *hw) ...@@ -116,7 +118,9 @@ static void pch_gbe_plat_init_function_pointers(struct pch_gbe_hw *hw)
s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw) s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw)
{ {
if (!hw->reg) { if (!hw->reg) {
pr_err("ERROR: Registers not mapped\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
netdev_err(adapter->netdev, "ERROR: Registers not mapped\n");
return -ENOSYS; return -ENOSYS;
} }
pch_gbe_plat_init_function_pointers(hw); pch_gbe_plat_init_function_pointers(hw);
...@@ -129,9 +133,12 @@ s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw) ...@@ -129,9 +133,12 @@ s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw)
*/ */
void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw) void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw)
{ {
if (!hw->func->get_bus_info) if (!hw->func->get_bus_info) {
pr_err("ERROR: configuration\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
else
netdev_err(adapter->netdev, "ERROR: configuration\n");
return;
}
hw->func->get_bus_info(hw); hw->func->get_bus_info(hw);
} }
...@@ -145,7 +152,9 @@ void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw) ...@@ -145,7 +152,9 @@ void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw)
s32 pch_gbe_hal_init_hw(struct pch_gbe_hw *hw) s32 pch_gbe_hal_init_hw(struct pch_gbe_hw *hw)
{ {
if (!hw->func->init_hw) { if (!hw->func->init_hw) {
pr_err("ERROR: configuration\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
netdev_err(adapter->netdev, "ERROR: configuration\n");
return -ENOSYS; return -ENOSYS;
} }
return hw->func->init_hw(hw); return hw->func->init_hw(hw);
...@@ -191,9 +200,12 @@ s32 pch_gbe_hal_write_phy_reg(struct pch_gbe_hw *hw, u32 offset, ...@@ -191,9 +200,12 @@ s32 pch_gbe_hal_write_phy_reg(struct pch_gbe_hw *hw, u32 offset,
*/ */
void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw) void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw)
{ {
if (!hw->func->reset_phy) if (!hw->func->reset_phy) {
pr_err("ERROR: configuration\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
else
netdev_err(adapter->netdev, "ERROR: configuration\n");
return;
}
hw->func->reset_phy(hw); hw->func->reset_phy(hw);
} }
...@@ -203,9 +215,12 @@ void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw) ...@@ -203,9 +215,12 @@ void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw)
*/ */
void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw) void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw)
{ {
if (!hw->func->sw_reset_phy) if (!hw->func->sw_reset_phy) {
pr_err("ERROR: configuration\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
else
netdev_err(adapter->netdev, "ERROR: configuration\n");
return;
}
hw->func->sw_reset_phy(hw); hw->func->sw_reset_phy(hw);
} }
...@@ -219,7 +234,9 @@ void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw) ...@@ -219,7 +234,9 @@ void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw)
s32 pch_gbe_hal_read_mac_addr(struct pch_gbe_hw *hw) s32 pch_gbe_hal_read_mac_addr(struct pch_gbe_hw *hw)
{ {
if (!hw->func->read_mac_addr) { if (!hw->func->read_mac_addr) {
pr_err("ERROR: configuration\n"); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
netdev_err(adapter->netdev, "ERROR: configuration\n");
return -ENOSYS; return -ENOSYS;
} }
return hw->func->read_mac_addr(hw); return hw->func->read_mac_addr(hw);
......
...@@ -122,7 +122,7 @@ static int pch_gbe_set_settings(struct net_device *netdev, ...@@ -122,7 +122,7 @@ static int pch_gbe_set_settings(struct net_device *netdev,
} }
ret = mii_ethtool_sset(&adapter->mii, ecmd); ret = mii_ethtool_sset(&adapter->mii, ecmd);
if (ret) { if (ret) {
pr_err("Error: mii_ethtool_sset\n"); netdev_err(netdev, "Error: mii_ethtool_sset\n");
return ret; return ret;
} }
hw->mac.link_speed = speed; hw->mac.link_speed = speed;
......
...@@ -237,16 +237,17 @@ static int pch_gbe_validate_option(int *value, ...@@ -237,16 +237,17 @@ static int pch_gbe_validate_option(int *value,
case enable_option: case enable_option:
switch (*value) { switch (*value) {
case OPTION_ENABLED: case OPTION_ENABLED:
pr_debug("%s Enabled\n", opt->name); netdev_dbg(adapter->netdev, "%s Enabled\n", opt->name);
return 0; return 0;
case OPTION_DISABLED: case OPTION_DISABLED:
pr_debug("%s Disabled\n", opt->name); netdev_dbg(adapter->netdev, "%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) {
pr_debug("%s set to %i\n", opt->name, *value); netdev_dbg(adapter->netdev, "%s set to %i\n",
opt->name, *value);
return 0; return 0;
} }
break; break;
...@@ -258,7 +259,8 @@ static int pch_gbe_validate_option(int *value, ...@@ -258,7 +259,8 @@ static int pch_gbe_validate_option(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')
pr_debug("%s\n", ent->str); netdev_dbg(adapter->netdev, "%s\n",
ent->str);
return 0; return 0;
} }
} }
...@@ -268,7 +270,7 @@ static int pch_gbe_validate_option(int *value, ...@@ -268,7 +270,7 @@ static int pch_gbe_validate_option(int *value,
BUG(); BUG();
} }
pr_debug("Invalid %s value specified (%i) %s\n", netdev_dbg(adapter->netdev, "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;
...@@ -318,7 +320,8 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -318,7 +320,8 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
.p = an_list} } .p = an_list} }
}; };
if (speed || dplx) { if (speed || dplx) {
pr_debug("AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n"); netdev_dbg(adapter->netdev,
"AutoNeg specified along with Speed or Duplex, AutoNeg parameter ignored\n");
hw->phy.autoneg_advertised = opt.def; hw->phy.autoneg_advertised = opt.def;
} else { } else {
int tmp = AutoNeg; int tmp = AutoNeg;
...@@ -332,13 +335,16 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -332,13 +335,16 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
case 0: case 0:
hw->mac.autoneg = hw->mac.fc_autoneg = 1; hw->mac.autoneg = hw->mac.fc_autoneg = 1;
if ((speed || dplx)) if ((speed || dplx))
pr_debug("Speed and duplex autonegotiation enabled\n"); netdev_dbg(adapter->netdev,
"Speed and duplex autonegotiation enabled\n");
hw->mac.link_speed = SPEED_10; hw->mac.link_speed = SPEED_10;
hw->mac.link_duplex = DUPLEX_HALF; hw->mac.link_duplex = DUPLEX_HALF;
break; break;
case HALF_DUPLEX: case HALF_DUPLEX:
pr_debug("Half Duplex specified without Speed\n"); netdev_dbg(adapter->netdev,
pr_debug("Using Autonegotiation at Half Duplex only\n"); "Half Duplex specified without Speed\n");
netdev_dbg(adapter->netdev,
"Using Autonegotiation at Half Duplex only\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 1; hw->mac.autoneg = hw->mac.fc_autoneg = 1;
hw->phy.autoneg_advertised = PHY_ADVERTISE_10_HALF | hw->phy.autoneg_advertised = PHY_ADVERTISE_10_HALF |
PHY_ADVERTISE_100_HALF; PHY_ADVERTISE_100_HALF;
...@@ -346,8 +352,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -346,8 +352,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
hw->mac.link_duplex = DUPLEX_HALF; hw->mac.link_duplex = DUPLEX_HALF;
break; break;
case FULL_DUPLEX: case FULL_DUPLEX:
pr_debug("Full Duplex specified without Speed\n"); netdev_dbg(adapter->netdev,
pr_debug("Using Autonegotiation at Full Duplex only\n"); "Full Duplex specified without Speed\n");
netdev_dbg(adapter->netdev,
"Using Autonegotiation at Full Duplex only\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 1; hw->mac.autoneg = hw->mac.fc_autoneg = 1;
hw->phy.autoneg_advertised = PHY_ADVERTISE_10_FULL | hw->phy.autoneg_advertised = PHY_ADVERTISE_10_FULL |
PHY_ADVERTISE_100_FULL | PHY_ADVERTISE_100_FULL |
...@@ -356,8 +364,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -356,8 +364,10 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
hw->mac.link_duplex = DUPLEX_FULL; hw->mac.link_duplex = DUPLEX_FULL;
break; break;
case SPEED_10: case SPEED_10:
pr_debug("10 Mbps Speed specified without Duplex\n"); netdev_dbg(adapter->netdev,
pr_debug("Using Autonegotiation at 10 Mbps only\n"); "10 Mbps Speed specified without Duplex\n");
netdev_dbg(adapter->netdev,
"Using Autonegotiation at 10 Mbps only\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 1; hw->mac.autoneg = hw->mac.fc_autoneg = 1;
hw->phy.autoneg_advertised = PHY_ADVERTISE_10_HALF | hw->phy.autoneg_advertised = PHY_ADVERTISE_10_HALF |
PHY_ADVERTISE_10_FULL; PHY_ADVERTISE_10_FULL;
...@@ -365,22 +375,24 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -365,22 +375,24 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
hw->mac.link_duplex = DUPLEX_HALF; hw->mac.link_duplex = DUPLEX_HALF;
break; break;
case SPEED_10 + HALF_DUPLEX: case SPEED_10 + HALF_DUPLEX:
pr_debug("Forcing to 10 Mbps Half Duplex\n"); netdev_dbg(adapter->netdev, "Forcing to 10 Mbps Half Duplex\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 0; hw->mac.autoneg = hw->mac.fc_autoneg = 0;
hw->phy.autoneg_advertised = 0; hw->phy.autoneg_advertised = 0;
hw->mac.link_speed = SPEED_10; hw->mac.link_speed = SPEED_10;
hw->mac.link_duplex = DUPLEX_HALF; hw->mac.link_duplex = DUPLEX_HALF;
break; break;
case SPEED_10 + FULL_DUPLEX: case SPEED_10 + FULL_DUPLEX:
pr_debug("Forcing to 10 Mbps Full Duplex\n"); netdev_dbg(adapter->netdev, "Forcing to 10 Mbps Full Duplex\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 0; hw->mac.autoneg = hw->mac.fc_autoneg = 0;
hw->phy.autoneg_advertised = 0; hw->phy.autoneg_advertised = 0;
hw->mac.link_speed = SPEED_10; hw->mac.link_speed = SPEED_10;
hw->mac.link_duplex = DUPLEX_FULL; hw->mac.link_duplex = DUPLEX_FULL;
break; break;
case SPEED_100: case SPEED_100:
pr_debug("100 Mbps Speed specified without Duplex\n"); netdev_dbg(adapter->netdev,
pr_debug("Using Autonegotiation at 100 Mbps only\n"); "100 Mbps Speed specified without Duplex\n");
netdev_dbg(adapter->netdev,
"Using Autonegotiation at 100 Mbps only\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 1; hw->mac.autoneg = hw->mac.fc_autoneg = 1;
hw->phy.autoneg_advertised = PHY_ADVERTISE_100_HALF | hw->phy.autoneg_advertised = PHY_ADVERTISE_100_HALF |
PHY_ADVERTISE_100_FULL; PHY_ADVERTISE_100_FULL;
...@@ -388,28 +400,33 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter) ...@@ -388,28 +400,33 @@ static void pch_gbe_check_copper_options(struct pch_gbe_adapter *adapter)
hw->mac.link_duplex = DUPLEX_HALF; hw->mac.link_duplex = DUPLEX_HALF;
break; break;
case SPEED_100 + HALF_DUPLEX: case SPEED_100 + HALF_DUPLEX:
pr_debug("Forcing to 100 Mbps Half Duplex\n"); netdev_dbg(adapter->netdev,
"Forcing to 100 Mbps Half Duplex\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 0; hw->mac.autoneg = hw->mac.fc_autoneg = 0;
hw->phy.autoneg_advertised = 0; hw->phy.autoneg_advertised = 0;
hw->mac.link_speed = SPEED_100; hw->mac.link_speed = SPEED_100;
hw->mac.link_duplex = DUPLEX_HALF; hw->mac.link_duplex = DUPLEX_HALF;
break; break;
case SPEED_100 + FULL_DUPLEX: case SPEED_100 + FULL_DUPLEX:
pr_debug("Forcing to 100 Mbps Full Duplex\n"); netdev_dbg(adapter->netdev,
"Forcing to 100 Mbps Full Duplex\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 0; hw->mac.autoneg = hw->mac.fc_autoneg = 0;
hw->phy.autoneg_advertised = 0; hw->phy.autoneg_advertised = 0;
hw->mac.link_speed = SPEED_100; hw->mac.link_speed = SPEED_100;
hw->mac.link_duplex = DUPLEX_FULL; hw->mac.link_duplex = DUPLEX_FULL;
break; break;
case SPEED_1000: case SPEED_1000:
pr_debug("1000 Mbps Speed specified without Duplex\n"); netdev_dbg(adapter->netdev,
"1000 Mbps Speed specified without Duplex\n");
goto full_duplex_only; goto full_duplex_only;
case SPEED_1000 + HALF_DUPLEX: case SPEED_1000 + HALF_DUPLEX:
pr_debug("Half Duplex is not supported at 1000 Mbps\n"); netdev_dbg(adapter->netdev,
"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:
pr_debug("Using Autonegotiation at 1000 Mbps Full Duplex only\n"); netdev_dbg(adapter->netdev,
"Using Autonegotiation at 1000 Mbps Full Duplex only\n");
hw->mac.autoneg = hw->mac.fc_autoneg = 1; hw->mac.autoneg = hw->mac.fc_autoneg = 1;
hw->phy.autoneg_advertised = PHY_ADVERTISE_1000_FULL; hw->phy.autoneg_advertised = PHY_ADVERTISE_1000_FULL;
hw->mac.link_speed = SPEED_1000; hw->mac.link_speed = SPEED_1000;
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
*/ */
s32 pch_gbe_phy_get_id(struct pch_gbe_hw *hw) s32 pch_gbe_phy_get_id(struct pch_gbe_hw *hw)
{ {
struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
struct pch_gbe_phy_info *phy = &hw->phy; struct pch_gbe_phy_info *phy = &hw->phy;
s32 ret; s32 ret;
u16 phy_id1; u16 phy_id1;
...@@ -115,7 +116,8 @@ s32 pch_gbe_phy_get_id(struct pch_gbe_hw *hw) ...@@ -115,7 +116,8 @@ s32 pch_gbe_phy_get_id(struct pch_gbe_hw *hw)
phy->id = (u32)phy_id1; phy->id = (u32)phy_id1;
phy->id = ((phy->id << 6) | ((phy_id2 & 0xFC00) >> 10)); phy->id = ((phy->id << 6) | ((phy_id2 & 0xFC00) >> 10));
phy->revision = (u32) (phy_id2 & 0x000F); phy->revision = (u32) (phy_id2 & 0x000F);
pr_debug("phy->id : 0x%08x phy->revision : 0x%08x\n", netdev_dbg(adapter->netdev,
"phy->id : 0x%08x phy->revision : 0x%08x\n",
phy->id, phy->revision); phy->id, phy->revision);
return 0; return 0;
} }
...@@ -134,7 +136,10 @@ s32 pch_gbe_phy_read_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 *data) ...@@ -134,7 +136,10 @@ s32 pch_gbe_phy_read_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 *data)
struct pch_gbe_phy_info *phy = &hw->phy; struct pch_gbe_phy_info *phy = &hw->phy;
if (offset > PHY_MAX_REG_ADDRESS) { if (offset > PHY_MAX_REG_ADDRESS) {
pr_err("PHY Address %d is out of range\n", offset); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
netdev_err(adapter->netdev, "PHY Address %d is out of range\n",
offset);
return -EINVAL; return -EINVAL;
} }
*data = pch_gbe_mac_ctrl_miim(hw, phy->addr, PCH_GBE_HAL_MIIM_READ, *data = pch_gbe_mac_ctrl_miim(hw, phy->addr, PCH_GBE_HAL_MIIM_READ,
...@@ -156,7 +161,10 @@ s32 pch_gbe_phy_write_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 data) ...@@ -156,7 +161,10 @@ s32 pch_gbe_phy_write_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 data)
struct pch_gbe_phy_info *phy = &hw->phy; struct pch_gbe_phy_info *phy = &hw->phy;
if (offset > PHY_MAX_REG_ADDRESS) { if (offset > PHY_MAX_REG_ADDRESS) {
pr_err("PHY Address %d is out of range\n", offset); struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
netdev_err(adapter->netdev, "PHY Address %d is out of range\n",
offset);
return -EINVAL; return -EINVAL;
} }
pch_gbe_mac_ctrl_miim(hw, phy->addr, PCH_GBE_HAL_MIIM_WRITE, pch_gbe_mac_ctrl_miim(hw, phy->addr, PCH_GBE_HAL_MIIM_WRITE,
...@@ -246,15 +254,14 @@ void pch_gbe_phy_set_rgmii(struct pch_gbe_hw *hw) ...@@ -246,15 +254,14 @@ void pch_gbe_phy_set_rgmii(struct pch_gbe_hw *hw)
*/ */
void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw) void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw)
{ {
struct pch_gbe_adapter *adapter; struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw);
struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET }; struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
int ret; int ret;
u16 mii_reg; u16 mii_reg;
adapter = container_of(hw, struct pch_gbe_adapter, hw);
ret = mii_ethtool_gset(&adapter->mii, &cmd); ret = mii_ethtool_gset(&adapter->mii, &cmd);
if (ret) if (ret)
pr_err("Error: mii_ethtool_gset\n"); netdev_err(adapter->netdev, "Error: mii_ethtool_gset\n");
ethtool_cmd_speed_set(&cmd, hw->mac.link_speed); ethtool_cmd_speed_set(&cmd, hw->mac.link_speed);
cmd.duplex = hw->mac.link_duplex; cmd.duplex = hw->mac.link_duplex;
...@@ -263,7 +270,7 @@ void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw) ...@@ -263,7 +270,7 @@ void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw)
pch_gbe_phy_write_reg_miic(hw, MII_BMCR, BMCR_RESET); pch_gbe_phy_write_reg_miic(hw, MII_BMCR, BMCR_RESET);
ret = mii_ethtool_sset(&adapter->mii, &cmd); ret = mii_ethtool_sset(&adapter->mii, &cmd);
if (ret) if (ret)
pr_err("Error: mii_ethtool_sset\n"); netdev_err(adapter->netdev, "Error: mii_ethtool_sset\n");
pch_gbe_phy_sw_reset(hw); pch_gbe_phy_sw_reset(hw);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册