[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <571A7F3D.1070609@codeaurora.org>
Date: Fri, 22 Apr 2016 14:45:01 -0500
From: Timur Tabi <timur@...eaurora.org>
To: Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-msm@...r.kernel.org, sdharia@...eaurora.org,
Shanker Donthineni <shankerd@...eaurora.org>,
Greg Kroah-Hartman <greg@...ah.com>, vikrams@...eaurora.org,
cov@...eaurora.org, gavidov@...eaurora.org,
Rob Herring <robh+dt@...nel.org>, andrew@...n.ch,
bjorn.andersson@...aro.org, Mark Langsdorf <mlangsdo@...hat.com>,
Jon Masters <jcm@...hat.com>,
Andy Gross <agross@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 1/2] [v4] net: emac: emac gigabit ethernet controller
driver
Timur Tabi wrote:
>>
>
> So I've done some more research, and I believe that the internal phy is
> not a candidate for phylib, but the external phy (which is a real phy)
> might be. There's no MDIO bus to the internal phy.
>
> Does this mean that I will need to enable a PHY driver, and that driver
> will control the external phy? If so, then does that mean that I would
> delete all to code in my driver that calls emac_phy_read() and
> emac_phy_write()? For example, I wouldn't need emac_phy_link_check()
> any more?
So I think I have it partially working, but I'm not sure if I'm doing
things correctly, and I'd like some help.
The external phy is an Atheros 8031, so I load the at803x driver. I
added this code to my driver:
mii_bus = devm_mdiobus_alloc(&pdev->dev);
mii_bus->phy_mask = ~(1 << adpt->hw.phy_addr);
mii_bus->read = emac_mdio_read;
mii_bus->write = emac_mdio_write;
mii_bus->reset = emac_mdio_reset;
mii_bus->parent = &pdev->dev;
mii_bus->priv = hw;
mdiobus_register(mii_bus);
When I call mdiobus_register, I can see that the at803x_probe() probe
function is called, so a connection is made.
The problem is that after that point, it appears that the at803x driver
is never called again. I tried bring the interface up and down, and
connecting and disconnecting an Ethernet cable, but that didn't trigger
anything. I would expect the PHY driver to do more than just probe.
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum, a Linux Foundation collaborative project.
Powered by blists - more mailing lists