Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2014 14:49:46 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268094 - head/sys/dev/etherswitch/rtl8366
Message-ID:  <201407011449.s61EnkDX016540@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Tue Jul  1 14:49:46 2014
New Revision: 268094
URL: http://svnweb.freebsd.org/changeset/base/268094

Log:
  Fix the reported status for the switch CPU port which was (wrongly)
  reporting half-duplex link.
  
  Tested on TP-Link WR1043ND.

Modified:
  head/sys/dev/etherswitch/rtl8366/rtl8366rb.c
  head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h

Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c
==============================================================================
--- head/sys/dev/etherswitch/rtl8366/rtl8366rb.c	Tue Jul  1 14:33:48 2014	(r268093)
+++ head/sys/dev/etherswitch/rtl8366/rtl8366rb.c	Tue Jul  1 14:49:46 2014	(r268094)
@@ -268,7 +268,7 @@ rtl8366rb_update_ifmedia(int portstatus,
 		*media_active |= IFM_1000_T;
 		break;
 	}
-	if ((portstatus & RTL8366RB_PLSR_FULLDUPLEX) == 0)
+	if ((portstatus & RTL8366RB_PLSR_FULLDUPLEX) != 0)
 		*media_active |= IFM_FDX;
 	else
 		*media_active |= IFM_HDX;

Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h
==============================================================================
--- head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h	Tue Jul  1 14:33:48 2014	(r268093)
+++ head/sys/dev/etherswitch/rtl8366/rtl8366rbvar.h	Tue Jul  1 14:49:46 2014	(r268094)
@@ -70,7 +70,7 @@
 #define RTL8366RB_PLSR_SPEED_10		0x00
 #define RTL8366RB_PLSR_SPEED_100	0x01
 #define RTL8366RB_PLSR_SPEED_1000	0x02
-#define RTL8366RB_PLSR_FULLDUPLEX	0x08
+#define RTL8366RB_PLSR_FULLDUPLEX	0x04
 #define RTL8366RB_PLSR_LINK		0x10
 #define RTL8366RB_PLSR_TXPAUSE		0x20
 #define RTL8366RB_PLSR_RXPAUSE		0x40



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407011449.s61EnkDX016540>