Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59d0f749 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net-phy-remove-genphy_config_init'



Heiner Kallweit says:

====================
net: phy: remove genphy_config_init

Supported PHY features are either auto-detected or explicitly set.
In both cases calling genphy_config_init isn't needed. All that
genphy_config_init does is removing features that are set as
supported but can't be auto-detected. Basically it duplicates the
code in genphy_read_abilities. Therefore remove genphy_config_init.

v2:
- remove call also from new adin driver
v3:
- pass NULL as config_init function pointer for dp83848
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a4d2113e 4b9cb2a5
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -356,10 +356,6 @@ static int adin_config_init(struct phy_device *phydev)

	phydev->mdix_ctrl = ETH_TP_MDI_AUTO;

	rc = genphy_config_init(phydev);
	if (rc < 0)
		return rc;

	rc = adin_config_rgmii_mode(phydev);
	if (rc < 0)
		return rc;
+0 −4
Original line number Diff line number Diff line
@@ -249,10 +249,6 @@ static int at803x_config_init(struct phy_device *phydev)
{
	int ret;

	ret = genphy_config_init(phydev);
	if (ret < 0)
		return ret;

	/* The RX and TX delay default is:
	 *   after HW reset: RX delay enabled and TX delay disabled
	 *   after SW reset: RX delay enabled, while TX delay retains the
+0 −5
Original line number Diff line number Diff line
@@ -254,13 +254,8 @@ static int dp83822_config_intr(struct phy_device *phydev)

static int dp83822_config_init(struct phy_device *phydev)
{
	int err;
	int value;

	err = genphy_config_init(phydev);
	if (err < 0)
		return err;

	value = DP83822_WOL_MAGIC_EN | DP83822_WOL_SECURE_ON | DP83822_WOL_EN;

	return phy_write_mmd(phydev, DP83822_DEVADDR, MII_DP83822_WOL_CFG,
+3 −8
Original line number Diff line number Diff line
@@ -68,13 +68,8 @@ static int dp83848_config_intr(struct phy_device *phydev)

static int dp83848_config_init(struct phy_device *phydev)
{
	int err;
	int val;

	err = genphy_config_init(phydev);
	if (err < 0)
		return err;

	/* DP83620 always reports Auto Negotiation Ability on BMSR. Instead,
	 * we check initial value of BMCR Auto negotiation enable bit
	 */
@@ -113,13 +108,13 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);

static struct phy_driver dp83848_driver[] = {
	DP83848_PHY_DRIVER(TI_DP83848C_PHY_ID, "TI DP83848C 10/100 Mbps PHY",
			   genphy_config_init),
			   NULL),
	DP83848_PHY_DRIVER(NS_DP83848C_PHY_ID, "NS DP83848C 10/100 Mbps PHY",
			   genphy_config_init),
			   NULL),
	DP83848_PHY_DRIVER(TI_DP83620_PHY_ID, "TI DP83620 10/100 Mbps PHY",
			   dp83848_config_init),
	DP83848_PHY_DRIVER(TLK10X_PHY_ID, "TI TLK10X 10/100 Mbps PHY",
			   genphy_config_init),
			   NULL),
};
module_phy_driver(dp83848_driver);

+0 −4
Original line number Diff line number Diff line
@@ -277,10 +277,6 @@ static int dp83811_config_init(struct phy_device *phydev)
{
	int value, err;

	err = genphy_config_init(phydev);
	if (err < 0)
		return err;

	value = phy_read(phydev, MII_DP83811_SGMII_CTRL);
	if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
		err = phy_write(phydev, MII_DP83811_SGMII_CTRL,
Loading