From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: David Decotigny <decot@google.com>
Cc: Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
"David S. Miller" <davem@davemloft.net>,
Joe Perches <joe@perches.com>,
Stanislaw Gruszka <sgruszka@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net/stmmac: don't go through ethtool to start autonegociation
Date: Fri, 13 May 2011 08:31:01 +0200 [thread overview]
Message-ID: <4DCCD025.4090100@st.com> (raw)
In-Reply-To: <4DC941D4.8030409@st.com>
On 5/10/2011 3:47 PM, Giuseppe CAVALLARO wrote:
> On 5/10/2011 2:19 AM, David Decotigny wrote:
>> The driver used to call phy's ethtool configuration routine to start
>> autonegociation. This change has it call directly phy's routine to
>> start autonegociation.
>>
>> IMPORTANT: initial version was hiding phy_start_aneg() return value,
>> this patch returns it (<0 upon error).
>>
>> Tested: module compiles, NOT tested on real hardware.
>> Signed-off-by: David Decotigny <decot@google.com>
>
> Sorry for the delay, I'm doing some tests with the stmmac on a "real"
> HW. I'll come back asap.
Hello.
I've tested the patch and, as discussed with David, I have sent it again
plus a new fix in the stmmac_set_pauseparam I have done while testing
ethtool -A|-a on my ST box.
Best Regards,
Peppe
>
> Regards
> Peppe
>
>> ---
>> drivers/net/stmmac/stmmac_ethtool.c | 13 ++-----------
>> 1 files changed, 2 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/net/stmmac/stmmac_ethtool.c b/drivers/net/stmmac/stmmac_ethtool.c
>> index 6f5aaeb..9c05cf0 100644
>> --- a/drivers/net/stmmac/stmmac_ethtool.c
>> +++ b/drivers/net/stmmac/stmmac_ethtool.c
>> @@ -236,17 +236,8 @@ stmmac_set_pauseparam(struct net_device *netdev,
>> priv->flow_ctrl = new_pause;
>>
>> if (phy->autoneg) {
>> - if (netif_running(netdev)) {
>> - struct ethtool_cmd cmd = { .cmd = ETHTOOL_SSET };
>> - /* auto-negotiation automatically restarted */
>> - cmd.supported = phy->supported;
>> - cmd.advertising = phy->advertising;
>> - cmd.autoneg = phy->autoneg;
>> - ethtool_cmd_speed_set(&cmd, phy->speed);
>> - cmd.duplex = phy->duplex;
>> - cmd.phy_address = phy->addr;
>> - ret = phy_ethtool_sset(phy, &cmd);
>> - }
>> + if (netif_running(netdev))
>> + ret = phy_start_aneg(phy);
>> } else
>> priv->hw->mac->flow_ctrl(priv->ioaddr, phy->duplex,
>> priv->flow_ctrl, priv->pause);
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2011-05-13 6:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 0:19 [PATCH 0/2] Minor autonegociation changes, testers welcome David Decotigny
2011-05-10 0:19 ` [PATCH 1/2] net/stmmac: don't go through ethtool to start autonegociation David Decotigny
2011-05-10 13:47 ` Giuseppe CAVALLARO
2011-05-13 6:31 ` Giuseppe CAVALLARO [this message]
2011-05-10 0:19 ` [PATCH 2/2] net/dl2k: Don't reconfigure link @100Mbps when disabling autoneg @1Gbps David Decotigny
2011-05-10 18:55 ` Ben Hutchings
2011-05-10 22:14 ` David Decotigny
2011-05-11 9:47 ` Florian Weimer
2011-05-13 15:54 ` dl2k/stmmac patches (was Re: [PATCH 2/2] net/dl2k: Don't reconfigure link @100Mbps when disabling autoneg @1Gbps) David Decotigny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DCCD025.4090100@st.com \
--to=peppe.cavallaro@st.com \
--cc=davem@davemloft.net \
--cc=decot@google.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sgruszka@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).