mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] net: dm9k: show only one phy on miibus
@ 2014-09-10  7:51 Antony Pavlov
  2014-09-11  6:11 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2014-09-10  7:51 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/net/dm9k.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/dm9k.c b/drivers/net/dm9k.c
index 3a4c6aa..950bdb3 100644
--- a/drivers/net/dm9k.c
+++ b/drivers/net/dm9k.c
@@ -359,6 +359,11 @@ static int dm9k_phy_read(struct mii_bus *bus, int addr, int reg)
 	struct dm9k *priv = bus->priv;
 	struct device_d *dev = &bus->dev;
 
+	/* Show only one phy on miibus */
+	if (addr != 0) {
+		return 0xffff;
+	}
+
 	/* Fill the phyxcer register into REG_0C */
 	dm9k_iow(priv, DM9K_EPAR, DM9K_PHY | reg);
 	dm9k_iow(priv, DM9K_EPCR, 0xc);	/* Issue phyxcer read command */
@@ -378,6 +383,10 @@ static int dm9k_phy_write(struct mii_bus *bus, int addr, int reg, u16 val)
 	struct dm9k *priv = bus->priv;
 	struct device_d *dev = &bus->dev;
 
+	if (addr != 0) {
+		return 0;
+	}
+
 	/* Fill the phyxcer register into REG_0C */
 	dm9k_iow(priv, DM9K_EPAR, DM9K_PHY | reg);
 
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-11  6:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10  7:51 [PATCH] net: dm9k: show only one phy on miibus Antony Pavlov
2014-09-11  6:11 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox