* [PATCH net] tg3: 5715 does not link up when autoneg off
@ 2013-03-13 1:32 Nithin Nayak Sujir
2013-03-13 14:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nithin Nayak Sujir @ 2013-03-13 1:32 UTC (permalink / raw)
To: davem; +Cc: netdev, marcinmiotk81, Nithin Sujir, Michael Chan
From: Nithin Sujir <nsujir@broadcom.com>
Commit d13ba512cbba7de5d55d7a3b2aae7d83c8921457 cleaned up the autoneg
advertisement by removing some dead code. One effect of this change was that
the advertisement register would not be updated if autoneg is turned off.
This exposed a bug on the 5715 device w.r.t linking. The 5715 defaults
to advertise only 10Mb Full duplex. But with autoneg disabled, it needs
the configured speed enabled in the advertisement register to link up.
This patch adds the work around to advertise all speeds on the 5715 when
autoneg is disabled.
Reported-by: Marcin Miotk <marcinmiotk81@gmail.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/ethernet/broadcom/tg3.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 93729f9..67d2663 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -4130,6 +4130,14 @@ static void tg3_phy_copper_begin(struct tg3 *tp)
tp->link_config.active_speed = tp->link_config.speed;
tp->link_config.active_duplex = tp->link_config.duplex;
+ if (tg3_asic_rev(tp) == ASIC_REV_5714) {
+ /* With autoneg disabled, 5715 only links up when the
+ * advertisement register has the configured speed
+ * enabled.
+ */
+ tg3_writephy(tp, MII_ADVERTISE, ADVERTISE_ALL);
+ }
+
bmcr = 0;
switch (tp->link_config.speed) {
default:
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] tg3: 5715 does not link up when autoneg off
2013-03-13 1:32 [PATCH net] tg3: 5715 does not link up when autoneg off Nithin Nayak Sujir
@ 2013-03-13 14:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-13 14:00 UTC (permalink / raw)
To: nsujir; +Cc: netdev, marcinmiotk81, mchan
From: "Nithin Nayak Sujir" <nsujir@broadcom.com>
Date: Tue, 12 Mar 2013 18:32:48 -0700
> From: Nithin Sujir <nsujir@broadcom.com>
>
> Commit d13ba512cbba7de5d55d7a3b2aae7d83c8921457 cleaned up the autoneg
> advertisement by removing some dead code. One effect of this change was that
> the advertisement register would not be updated if autoneg is turned off.
>
> This exposed a bug on the 5715 device w.r.t linking. The 5715 defaults
> to advertise only 10Mb Full duplex. But with autoneg disabled, it needs
> the configured speed enabled in the advertisement register to link up.
>
> This patch adds the work around to advertise all speeds on the 5715 when
> autoneg is disabled.
>
> Reported-by: Marcin Miotk <marcinmiotk81@gmail.com>
> Reviewed-by: Benjamin Li <benli@broadcom.com>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-13 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 1:32 [PATCH net] tg3: 5715 does not link up when autoneg off Nithin Nayak Sujir
2013-03-13 14:00 ` David Miller
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).