diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2011-11-21 10:01:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:01:33 -0500 |
commit | f3791cdf33e7d21515de25f5ead0eca38f85ca11 (patch) | |
tree | f2f8268280e30a65eef9f1a4531bd4b14decda51 /drivers/net/ethernet/broadcom/tg3.c | |
parent | c796984f2f1c528ac21220808525440d49413f8c (diff) |
tg3: Make 1000Base-X FC resolution look like 1000T
This patch changes tg3's 1000Base-X flow control resolution to look like
the 1000Base-T flow control resolution code.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index ff3c48a5e959..2497cc4ca89d 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -1706,18 +1706,12 @@ static u8 tg3_resolve_flowctrl_1000X(u16 lcladv, u16 rmtadv) | |||
1706 | { | 1706 | { |
1707 | u8 cap = 0; | 1707 | u8 cap = 0; |
1708 | 1708 | ||
1709 | if (lcladv & ADVERTISE_1000XPAUSE) { | 1709 | if (lcladv & rmtadv & ADVERTISE_1000XPAUSE) { |
1710 | if (lcladv & ADVERTISE_1000XPSE_ASYM) { | 1710 | cap = FLOW_CTRL_TX | FLOW_CTRL_RX; |
1711 | if (rmtadv & LPA_1000XPAUSE) | 1711 | } else if (lcladv & rmtadv & ADVERTISE_1000XPSE_ASYM) { |
1712 | cap = FLOW_CTRL_TX | FLOW_CTRL_RX; | 1712 | if (lcladv & ADVERTISE_1000XPAUSE) |
1713 | else if (rmtadv & LPA_1000XPAUSE_ASYM) | 1713 | cap = FLOW_CTRL_RX; |
1714 | cap = FLOW_CTRL_RX; | 1714 | if (rmtadv & ADVERTISE_1000XPAUSE) |
1715 | } else { | ||
1716 | if (rmtadv & LPA_1000XPAUSE) | ||
1717 | cap = FLOW_CTRL_TX | FLOW_CTRL_RX; | ||
1718 | } | ||
1719 | } else if (lcladv & ADVERTISE_1000XPSE_ASYM) { | ||
1720 | if ((rmtadv & LPA_1000XPAUSE) && (rmtadv & LPA_1000XPAUSE_ASYM)) | ||
1721 | cap = FLOW_CTRL_TX; | 1715 | cap = FLOW_CTRL_TX; |
1722 | } | 1716 | } |
1723 | 1717 | ||