lkml.org 
[lkml]   [2016]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] [v4] net: emac: emac gigabit ethernet controller driver
From
Date
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.

\
 
 \ /
  Last update: 2016-04-22 22:01    [W:0.128 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site