https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162017-08-10T00:02:17ZpfSense bugtrackerpfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=334312017-08-10T00:02:17ZLuiz Souzaluiz@netgate.com
<ul><li><strong>Target version</strong> changed from <i>2.4.0</i> to <i>2.4.1</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=342112017-10-12T09:47:16ZJim Pingle
<ul><li><strong>Target version</strong> changed from <i>2.4.1</i> to <i>2.4.2</i></li></ul><p>Moving target to 2.4.2 as we need 2.4.1 sooner than anticipated.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=344512017-10-19T02:45:46ZConstantine Kormashev
<ul><li><strong>File</strong> <a href="/attachments/2203">test.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2203/test.txt">test.txt</a> added</li></ul>During investigation 27001 found some important things:
<ol>
<li>Looks like the issue affects 100BaseTX</li>
<li>Changing from auto to manual (100BaseTX) does not make real connection changes until cable is unpluged/pluged, although I can see a proper information in ifconfig output (like media manual select etc)</li>
</ol>
<p>Test details in attach.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=346422017-10-23T12:21:18ZJim Pingle
<ul><li><strong>Target version</strong> changed from <i>2.4.2</i> to <i>2.4.3</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=352402017-11-27T07:35:27ZConstantine Kormashev
<ul></ul><p>10FD still does not work.<br />Steve found that 100FD works with crossover. I checked manual 100FD on both sides with crossover, all works fine. That means something wrong with AutoMDIX when autonegotiaition disabled.<br />10FD shows links in up state, but IP does not work <code>ping: sendto: Host is down</code>, no DHCP, etc, after changing back on 100FD IP works without issues.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=359552018-02-28T09:35:58ZDmitry Vakhrushev
<ul><li><strong>Assignee</strong> changed from <i>Luiz Souza</i> to <i>Dmitry Vakhrushev</i></li><li><strong>Affected Version</strong> changed from <i>2.4</i> to <i>2.4.x</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=360912018-03-16T10:27:42ZJim Pingle
<ul><li><strong>Target version</strong> changed from <i>2.4.3</i> to <i>2.4.4</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=368452018-07-05T02:53:45ZDmitry Vakhrushev
<ul></ul><p>Expected solution is not appropriate.<br />I thought that part of errata KSZ9031 (1G PHY chip which used in SG-1000) help us on this issue.<br />But these changes were present in the driver code.</p>
<p>I'll test with (MDI/MDI-X) with cross pairs of wires on cable.<br />I haven't looked before, I'll look at Register 1Ch bit 6 in driver code, which is responsible for Auto MDI/MID-X.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=368482018-07-05T03:41:59ZDmitry Vakhrushev
<ul></ul><p>Looked at <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/00002117F.pdf" class="external">datasheet</a><br />p.33 in the description of bit 12 of Register 0h – Basic Control, found that:<br /><pre>
1 = Enable auto-negotiation process
0 = Disable auto-negotiation process
If enabled, auto-negotiation result overrides settings
in Reg. 0.13, 0.8 and 0.6.
>> If disabled, Auto MDI-X is also automatically disabled.
>> Use Register 1Ch to set MDI/MDI-X.
</pre></p>
<p>seems we need switch on this bit after turn on and off the auto-negotiation process.</p>
<p>I'll look at this at home later.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=370622018-07-16T17:43:41ZSteve Wheeler
<ul></ul><p>Testing this further I found that with the SG-1000 port set to auto it establishes a link to a switch port set to 10Mbps but always at half duplex. This is confirmed by the output of both ifconfig and etherswitchcfg as well as the link switch.</p>
<p>Running a packet capture on the SG-1000 interface shows it can see traffic arriving and is attempting to send traffic. However a pcap on a switch mirror port shows nothing it sends ever reaches the wire.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=373012018-07-27T12:09:43ZAnonymous
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>13</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=373052018-07-27T12:18:12ZAnonymous
<ul><li><strong>Status</strong> changed from <i>13</i> to <i>New</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=377962018-08-17T05:48:44ZDmitry Vakhrushev
<ul></ul><p>I checked the clocks on PHY.<br />GTX_CLK (which output from AM3358)</p>
<blockquote>
<p>when 1Gb is set = 125MHz, <br />when 100Mb ~ 25MHz</p>
<blockquote>
<p>when 10Mb ~ 25MHz. << Wrong value according to KSZ9031RNX datasheet. Mast be 2.5MHz</p>
</blockquote></blockquote>
<p>RX_CLK</p>
<blockquote>
<p>when 1Gb is set = 125MHz, <br />when 100Mb ~ 25MHz<br />when 10Mb ~ 2.5MHz</p>
</blockquote>
<p>So this is the issue which needed to resolve. <br />Checking the clock signal generated from <abbr title="on the switch">MAC</abbr> on AM335x.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=377972018-08-17T05:50:04ZDmitry Vakhrushev
<ul></ul><p>Therefore receiving by SG-1000 is working on 10Mb and transmitting isn't working.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=377992018-08-17T06:54:20ZDmitry Vakhrushev
<ul></ul><blockquote><blockquote>
<p>in this doc: <a class="external" href="https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf">https://www.ti.com/lit/ug/spruh73p/spruh73p.pdf</a><br />AM335x TRM</p>
</blockquote></blockquote>
<blockquote>
<p>14.3.6 RGMII Interface</p>
<blockquote>
<p>The CPRGMII peripheral shall be compliant to the RGMII specification document.<br />Features:<br />• Supports 1000/100/10 Mbps Speed.<br />• MII mode is not supported.<br />If RGMII is used, and a 10Mbit operation is desired, in-band mode must be used and an Ethernet PHY<br />that supports <strong>in-band status signaling must be selected</strong>.</p>
</blockquote></blockquote>
<p>I did this changes and will check later.<br /><pre>
diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c
index a887561c0b9..f89112babf7 100644
--- a/sys/arm/ti/cpsw/if_cpsw.c
+++ b/sys/arm/ti/cpsw/if_cpsw.c
@@ -1546,6 +1546,10 @@ cpswp_miibus_statchg(device_t dev)
case IFM_100_TX:
mac_control |= CPSW_SL_MACTL_IFCTL_A;
break;
+ /* in band mode only works in 10Mbps RGMII mode */
+ case IFM_10_T:
+ /* In Band mode */
+ mac_control |= CPSW_SL_MACTL_EXT_EN;
}
if (sc->mii->mii_media_active & IFM_FDX)
mac_control |= CPSW_SL_MACTL_FULLDUPLEX;
diff --git a/sys/arm/ti/cpsw/if_cpswreg.h b/sys/arm/ti/cpsw/if_cpswreg.h
index c0ee3586fc4..dac3bf1b6ae 100644
--- a/sys/arm/ti/cpsw/if_cpswreg.h
+++ b/sys/arm/ti/cpsw/if_cpswreg.h
@@ -118,6 +118,8 @@
/* SL1 is at 0x0D80, SL2 is at 0x0DC0 */
#define CPSW_SL_OFFSET 0x0D80
#define CPSW_SL_MACCONTROL(p) (CPSW_SL_OFFSET + (0x40 * (p)) + 0x04)
+#define CPSW_SL_MACTL_EXT_EN (1 << 18) /* In Band mode */
+#define CPSW_SL_MACTL_GIG_FORCE (1 << 17)
#define CPSW_SL_MACTL_IFCTL_B (1 << 16)
#define CPSW_SL_MACTL_IFCTL_A (1 << 15)
#define CPSW_SL_MACTL_GIG (1 << 7)
</pre></p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378312018-08-18T06:07:25ZDmitry Vakhrushev
<ul></ul><p>Steve Wheeler, thank you for the idea with switch issue.<br />This solution resolve issue with transmit (TX) clocking (instead of 25MHz used 2.5MHz).<br />And now with 10Mb configuration on ports, they work both for receive and transmits traffic.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378322018-08-18T06:11:54ZDmitry Vakhrushev
<ul><li><strong>Assignee</strong> changed from <i>Dmitry Vakhrushev</i> to <i>Luiz Souza</i></li></ul><p>Hi Luiz!</p>
<p>Would you provide instruction to upload the commit?<br />devel-11 branch?</p>
<p>Thanks,<br />-Dmitry</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378332018-08-18T06:12:12ZDmitry Vakhrushev
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li></ul> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378392018-08-18T11:28:18ZLuiz Souzaluiz@netgate.com
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Thanks Dmitry!</p>
<p>The fix is committed, I'll send the instructions.</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378502018-08-19T11:13:08ZConstantine Kormashev
<ul></ul><p>FreeBSD pf1k.lab 11.2-RELEASE-p2 FreeBSD 11.2-RELEASE-p2 <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: Firewall rules edit -> DiffServ Code Point (Resolved)" href="https://redmine.pfsense.org/issues/60">#60</a> da8baa0ffd8(factory-RELENG_2_4_4): Sun Aug 19 01:19:48 EDT 2018<br />which is 2.4.4.a.20180818.1321 still shows the issue<br />Dmitry suggested to try pfSense-netgate-uFW-recover-2.4.4-DEVELOPMENT-armv6-20180819-0052 I could not not try one due my OTG was broken</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378542018-08-19T12:44:34ZChris Macmahon
<ul></ul><p>This looks fixed on image Current Base System 2.4.4.a.20180819.0052:</p>
<p>2.4.4-DEVELOPMENT][<a class="email" href="mailto:root@pfSense.localdomain">root@pfSense.localdomain</a>]/root: ifconfig -a<br />cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500<br /> options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE><br /> ether 68:9e:19:8b:56:5d<br /> hwaddr 68:9e:19:8b:56:5d<br /> inet6 fe80::6a9e:19ff:fe8b:565d%cpsw0 prefixlen 64 scopeid 0x1 <br /> inet 172.21.25.195 netmask 0xffffff00 broadcast 172.21.25.255 <br /> media: Ethernet 10baseT/UTP <full-duplex><br /> status: active</p>
<p>ping 1.1.1.1<br />PING 1.1.1.1 (1.1.1.1): 56 data bytes<br />64 bytes from 1.1.1.1: icmp_seq=0 ttl=55 time=49.872 ms<br />64 bytes from 1.1.1.1: icmp_seq=1 ttl=55 time=48.941 ms</p>
<p>and different device:</p>
<p>ifconfig -a<br />cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500<br /> options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE><br /> ether 0c:b2:b7:af:3e:4f<br /> hwaddr 0c:b2:b7:af:3e:4f<br /> inet6 fe80::eb2:b7ff:feaf:3e4f%cpsw0 prefixlen 64 scopeid 0x1 <br /> inet 172.21.25.196 netmask 0xffffff00 broadcast 172.21.25.255 <br /> media: Ethernet autoselect (10baseT/UTP <half-duplex>)<br /> status: active<br /> nd6 options=23<P</p>
<p>ping 1.1.1.1<br />PING 1.1.1.1 (1.1.1.1): 56 data bytes<br />64 bytes from 1.1.1.1: icmp_seq=0 ttl=55 time=51.135 ms<br />^C</p> pfSense - Bug #7532: SG-1000 autonegotiation 10baseT speed and duplexhttps://redmine.pfsense.org/issues/7532?journal_id=378552018-08-19T12:44:48ZChris Macmahon
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul>