[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57326C44.8020906@codeaurora.org>
Date: Tue, 10 May 2016 18:18:28 -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
Florian Fainelli wrote:
> Are you utilizing the PHYLIB APIs properly? You need at least a
> phy_start() to start the PHY state machine, and an adjust_link callback
> to be provided to phy_connect() (or of_phy_connect()) to manage link
> state changes. And that's the very basic minimum here, there could be
> additional APIs that you may end up using.
>
> There are tons of example in tree of drivers doing this, bcmgenet,
> bcmsysport, tg3 etc.
Thank you. I think I finally got phylib working, more or less.
Unfortunately, it seems I have some kind of race condition. The driver
has a lot that's wrong with it, and I'm trying to fix it all. One crazy
the driver does is it create a workqueue to handle a lot of the tasks
that would normally be handled in the interrupt handler itself.
With phylib support, I know my driver can call phy_mac_interrupt() when
it gets a link status change interrupt. I then have an .adjust_link
callback which starts or stops the mac accordingly.
My problem is that I'm not really sure what adjust_link is supposed to
be doing. In addition, it seems that I need to keep the workqueue
running, otherwise the interface will not function. I bring the
interface up, and the driver reports success, but pings do not work.
I'm getting really frustrated. The sample code isn't really helping a
whole lot, because I lack a fundamental understanding of what needs to
be done. None of the documentation I've read is helpful, and I don't
know how to debug it.
Can you give me some advice on how to debug this?
--
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