Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v3.16]r8169:  Add support for half duplex on MDI
@ 2016-03-25 14:29 Corcodel Marian
  2016-03-25 15:50 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Corcodel Marian @ 2016-03-25 14:29 UTC (permalink / raw)
  To: netdev; +Cc: Francois Romieu, Corcodel Marian

 This patch add support for half duplex on MDI chips.

Signed-off-by: Corcodel Marian <asd@marian1000.go.ro>
---
 drivers/net/ethernet/realtek/r8169.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 77c5efb..7f6fb1f 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1713,8 +1713,13 @@ static int rtl8169_set_speed_xmii(struct net_device *dev,
 		else
 			goto out;
 
-		if (duplex == DUPLEX_FULL)
+		if (duplex == DUPLEX_FULL) {
 			bmcr |= BMCR_FULLDPLX;
+		} else if (duplex == DUPLEX_HALF) {
+				bmcr |= ~BMCR_FULLDPLX;
+		} else {
+			goto out;
+		 }
 	}
 
 	rtl_writephy(tp, MII_BMCR, bmcr);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-25 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-25 14:29 [PATCH net-next v3.16]r8169: Add support for half duplex on MDI Corcodel Marian
2016-03-25 15:50 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox