From: Florian Fainelli <f.fainelli@gmail.com>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: davem@davemloft.net, zambrano@broadcom.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] b44: always set duplex mode why phy changes
Date: Sun, 02 Mar 2014 10:53:23 -0800 [thread overview]
Message-ID: <3128426.BNOxRVW2LW@lenovo> (raw)
In-Reply-To: <1393777774-7400-2-git-send-email-hauke@hauke-m.de>
Le dimanche 2 mars 2014, 17:29:34 Hauke Mehrtens a écrit :
> Without this patch b44_check_phy() was called when the phy called the
> adjust callback. This method only change the mac duplex mode when the
> carrier was off. When the phy changed the duplex mode after the carrier
> was on the mac was not changed. This happened when an external phy was
> used.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/ethernet/broadcom/b44.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/b44.c
> b/drivers/net/ethernet/broadcom/b44.c index e8046e1..8a7bf7d 100644
> --- a/drivers/net/ethernet/broadcom/b44.c
> +++ b/drivers/net/ethernet/broadcom/b44.c
> @@ -2229,7 +2229,12 @@ static void b44_adjust_link(struct net_device *dev)
> }
>
> if (status_changed) {
> - b44_check_phy(bp);
> + u32 val = br32(bp, B44_TX_CTRL);
> + if (bp->flags & B44_FLAG_FULL_DUPLEX)
> + val |= TX_CTRL_DUPLEX;
> + else
> + val &= ~TX_CTRL_DUPLEX;
> + bw32(bp, B44_TX_CTRL, val);
> phy_print_status(phydev);
> }
> }
--
Florian
next prev parent reply other threads:[~2014-03-02 18:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 16:29 [PATCH 1/2] b44: add calls to phy_{start,stop} Hauke Mehrtens
2014-03-02 16:29 ` [PATCH 2/2] b44: always set duplex mode why phy changes Hauke Mehrtens
2014-03-02 18:53 ` Florian Fainelli [this message]
2014-03-03 0:06 ` David Miller
2014-03-02 18:53 ` [PATCH 1/2] b44: add calls to phy_{start,stop} Florian Fainelli
2014-03-03 0:05 ` David Miller
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=3128426.BNOxRVW2LW@lenovo \
--to=f.fainelli@gmail.com \
--cc=davem@davemloft.net \
--cc=hauke@hauke-m.de \
--cc=netdev@vger.kernel.org \
--cc=zambrano@broadcom.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