linux-mips
[Top] [All Lists]

[PATCH] staging/octeon: Fix PHY binding in octeon-ethernet driver.

To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] staging/octeon: Fix PHY binding in octeon-ethernet driver.
From: David Daney <ddaney.cavm@gmail.com>
Date: Thu, 23 Feb 2012 11:19:31 -0800
Authentication-results: mr.google.com; spf=pass (google.com: domain of ddaney.cavm@gmail.com designates 10.236.80.4 as permitted sender) smtp.mail=ddaney.cavm@gmail.com; dkim=pass header.i=ddaney.cavm@gmail.com
Cc: linux-mips@linux-mips.org, devel@driverdev.osuosl.org, David Daney <david.daney@cavium.com>, Florian Fainelli <florian@openwrt.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=MvXCEvX6QBI/PM9ko/YHmn0LRck0OPAF5usErf6rxrM=; b=PtIXRwltOu1FL4lEZhlY9mgKC+b09CKhgxGh8Hxnf2922fwfjQ7wzSiU3sZeFmZm+M hSbc/7rtSdhyt2BDKAu1Uw/mdJu74me4f0feme4rwWDrPEE8MndwZ8ut94W2UG5iiROZ 2sOL5m6/MR0ytIpfYIO1Dq53yuK0Rl8TrI9iM=
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the
names used to refer to MDIO buses.  The ethernet driver must be
changed to match, so that the PHY drivers can be attached.

Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David Daney <david.daney@cavium.com>
---
 drivers/staging/octeon/ethernet-mdio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mdio.c 
b/drivers/staging/octeon/ethernet-mdio.c
index 63800ba..e31949c 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -164,9 +164,9 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
 
        int phy_addr = cvmx_helper_board_get_mii_address(priv->port);
        if (phy_addr != -1) {
-               char phy_id[20];
+               char phy_id[MII_BUS_ID_SIZE + 3];
 
-               snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", phy_addr);
+               snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0", 
phy_addr);
 
                priv->phydev = phy_connect(dev, phy_id, cvm_oct_adjust_link, 0,
                                        PHY_INTERFACE_MODE_GMII);
-- 
1.7.2.3


<Prev in Thread] Current Thread [Next in Thread>