lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120124092648.GA26380@mail.gnudd.com>
Date:	Tue, 24 Jan 2012 10:26:48 +0100
From:	Alessandro Rubini <rubini@...dd.com>
To:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc:	giancarlo.asnaghi@...com, peppe.cavallaro@...com,
	florian@...nwrt.org
Subject: stmmac: fix phy naming inconsistency

After commit "db8857b stmmac: use an unique MDIO bus name" my
device stopped being probed because two different names were being
used in different places. This fixes the inconsistency.

Signed-off-by: Alessandro Rubini <rubini@...dd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@...com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>
Cc: Florian Fainelli <florian@...nwrt.org>
---

Before the commit, the phy was identified like this and stuff worked:

     PHY ID 20005c90 at 1 IRQ 0 (506:01) active

After that commit, I get 

     PHY ID 20005c90 at 1 IRQ 0 (STMMAC MII Bus-1:01) active
     PHY stmmac-1:01 not found

In one place, "stmmac" is a static string, on the other the commit
used the name field of the bus that was "STMMAC MII Bus", so I changed
this older string to be nicer -- without spaces.

Maybe the name is available where "stmmac" is spelled out, but I
didn't check.

Now it works for me:

    eth1: PHY ID 20005c90 at 1 IRQ 0 (stmmac-1:01) active
    PHY: stmmac-1:01 - Link is Up - 100/Full


 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 6e712c5..819606e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -154,7 +154,7 @@ int stmmac_mdio_register(struct net_device *ndev)
 	else
 		irqlist = priv->mii_irq;
 
-	new_bus->name = "STMMAC MII Bus";
+	new_bus->name = "stmmac";
 	new_bus->read = &stmmac_mdio_read;
 	new_bus->write = &stmmac_mdio_write;
 	new_bus->reset = &stmmac_mdio_reset;
-- 
1.7.7.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ