svn commit: r268094 - head/sys/dev/etherswitch/rtl8366
Luiz Otavio O Souza
loos at FreeBSD.org
Tue Jul 1 14:49:47 UTC 2014
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
More information about the svn-src-head
mailing list