Re: Updated ASIX.LIB with improved link recovery for Dynamic C 9

"Steve Trigero seecwriter-/[email protected] [rabbit-semi]" <[email protected]> Wed, 25 May 2016 21:50:03 +0000 (UTC)
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
How do you download the file?

 
      From: "Tom Collins tom-lnEA/wrDJtNWk0Htik3J/[email protected] [rabbit-semi]" <[email protected]>
 To: [email protected] 
 Sent: Wednesday, May 25, 2016 2:02 PM
 Subject: Re: [rabbit-semi] Updated ASIX.LIB with improved link recovery for Dynamic C 9
   
    I've now ported the ASIX fix to Dynamic C 10.  If you're using RCM42xx or RCM43xx boards, I would highly recommend using this version of ASIX.LIB instead of what shipped with Dynamic C 10.72 and 10.72A.  Barring any new discoveries, this will ship out in Dynamic C 10.72B (currently unscheduled).
https://github.com/digidotcom/DCRabbit_10/commit/740114c8e0c1f988f121fccd50ff0079da6634b2

-Tom

On May 20, 2016, at 1:16 PM, Tom Collins tom-lnEA/wrDJtNWk0Htik3J/[email protected] [rabbit-semi] wrote:

   
I believe I've finally resolved the multiple link recovery errors people have seen with ASIX.LIB in Dynamic C 9.  I will be porting my changes to Dynamic C 10 soon, but would appreciate hearing feedback from DC 9 users.
You can see the changes here, and download just ASIX.LIB if you want to do any testing:https://github.com/digidotcom/DCRabbit_9/commit/16126a371635a7c70b0587958e0873ee05cfca6b
The gist of the fix is as follows:
The ASIX chip has a PHY bug that requires resetting the PHY to re-initiate link recovery.  The ASIX library in Dynamic C would check link every two seconds, and if link was down it would power the PHY off, wait two seconds, and power it back on.
The problem is that it would check link again after just two seconds and repeat the cycle.  There are likely many situations where the PHY would require more than 2 seconds to negotiate a link.
So the updated code adds a third state to the link recovery process where it skips the link checks for some period of time (currently 8 seconds) after the PHY has been turned back on.  It also configures the driver to be in that state at startup, to avoid power cycling the PHY immediately after startup.
Complicating matters is that there were various patches to DC 9 that broke the link recovery behavior in different ways, such that it would work for some but not others.  In addition, I didn't clearly follow commits in Digi's internal revision control system, and reverted a bug-fixing change that I mistook to be an unintended code change during a wider documentation/code cleanup.
One customer has tested this version of ASIX.LIB and it's worked in all of their link-recovery scenarios.  Please let me know if there are situations where it fails for you so I can re-review the functionality.  I'll make a followup announcement once I've ported the changes to Dynamic C 10.
-Tom

  
 
  #yiv3768365760 #yiv3768365760 -- #yiv3768365760ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv3768365760 #yiv3768365760ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv3768365760 #yiv3768365760ygrp-mkp #yiv3768365760hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv3768365760 #yiv3768365760ygrp-mkp #yiv3768365760ads {margin-bottom:10px;}#yiv3768365760 #yiv3768365760ygrp-mkp .yiv3768365760ad {padding:0 0;}#yiv3768365760 #yiv3768365760ygrp-mkp .yiv3768365760ad p {margin:0;}#yiv3768365760 #yiv3768365760ygrp-mkp .yiv3768365760ad a {color:#0000ff;text-decoration:none;}#yiv3768365760 #yiv3768365760ygrp-sponsor #yiv3768365760ygrp-lc {font-family:Arial;}#yiv3768365760 #yiv3768365760ygrp-sponsor #yiv3768365760ygrp-lc #yiv3768365760hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv3768365760 #yiv3768365760ygrp-sponsor #yiv3768365760ygrp-lc .yiv3768365760ad {margin-bottom:10px;padding:0 0;}#yiv3768365760 #yiv3768365760actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv3768365760 #yiv3768365760activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv3768365760 #yiv3768365760activity span {font-weight:700;}#yiv3768365760 #yiv3768365760activity span:first-child {text-transform:uppercase;}#yiv3768365760 #yiv3768365760activity span a {color:#5085b6;text-decoration:none;}#yiv3768365760 #yiv3768365760activity span span {color:#ff7900;}#yiv3768365760 #yiv3768365760activity span .yiv3768365760underline {text-decoration:underline;}#yiv3768365760 .yiv3768365760attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv3768365760 .yiv3768365760attach div a {text-decoration:none;}#yiv3768365760 .yiv3768365760attach img {border:none;padding-right:5px;}#yiv3768365760 .yiv3768365760attach label {display:block;margin-bottom:5px;}#yiv3768365760 .yiv3768365760attach label a {text-decoration:none;}#yiv3768365760 blockquote {margin:0 0 0 4px;}#yiv3768365760 .yiv3768365760bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv3768365760 .yiv3768365760bold a {text-decoration:none;}#yiv3768365760 dd.yiv3768365760last p a {font-family:Verdana;font-weight:700;}#yiv3768365760 dd.yiv3768365760last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv3768365760 dd.yiv3768365760last p span.yiv3768365760yshortcuts {margin-right:0;}#yiv3768365760 div.yiv3768365760attach-table div div a {text-decoration:none;}#yiv3768365760 div.yiv3768365760attach-table {width:400px;}#yiv3768365760 div.yiv3768365760file-title a, #yiv3768365760 div.yiv3768365760file-title a:active, #yiv3768365760 div.yiv3768365760file-title a:hover, #yiv3768365760 div.yiv3768365760file-title a:visited {text-decoration:none;}#yiv3768365760 div.yiv3768365760photo-title a, #yiv3768365760 div.yiv3768365760photo-title a:active, #yiv3768365760 div.yiv3768365760photo-title a:hover, #yiv3768365760 div.yiv3768365760photo-title a:visited {text-decoration:none;}#yiv3768365760 div#yiv3768365760ygrp-mlmsg #yiv3768365760ygrp-msg p a span.yiv3768365760yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv3768365760 .yiv3768365760green {color:#628c2a;}#yiv3768365760 .yiv3768365760MsoNormal {margin:0 0 0 0;}#yiv3768365760 o {font-size:0;}#yiv3768365760 #yiv3768365760photos div {float:left;width:72px;}#yiv3768365760 #yiv3768365760photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv3768365760 #yiv3768365760photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv3768365760 #yiv3768365760reco-category {font-size:77%;}#yiv3768365760 #yiv3768365760reco-desc {font-size:77%;}#yiv3768365760 .yiv3768365760replbq {margin:4px;}#yiv3768365760 #yiv3768365760ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv3768365760 #yiv3768365760ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv3768365760 #yiv3768365760ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv3768365760 #yiv3768365760ygrp-mlmsg select, #yiv3768365760 input, #yiv3768365760 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv3768365760 #yiv3768365760ygrp-mlmsg pre, #yiv3768365760 code {font:115% monospace;}#yiv3768365760 #yiv3768365760ygrp-mlmsg * {line-height:1.22em;}#yiv3768365760 #yiv3768365760ygrp-mlmsg #yiv3768365760logo {padding-bottom:10px;}#yiv3768365760 #yiv3768365760ygrp-msg p a {font-family:Verdana;}#yiv3768365760 #yiv3768365760ygrp-msg p#yiv3768365760attach-count span {color:#1E66AE;font-weight:700;}#yiv3768365760 #yiv3768365760ygrp-reco #yiv3768365760reco-head {color:#ff7900;font-weight:700;}#yiv3768365760 #yiv3768365760ygrp-reco {margin-bottom:20px;padding:0px;}#yiv3768365760 #yiv3768365760ygrp-sponsor #yiv3768365760ov li a {font-size:130%;text-decoration:none;}#yiv3768365760 #yiv3768365760ygrp-sponsor #yiv3768365760ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv3768365760 #yiv3768365760ygrp-sponsor #yiv3768365760ov ul {margin:0;padding:0 0 0 8px;}#yiv3768365760 #yiv3768365760ygrp-text {font-family:Georgia;}#yiv3768365760 #yiv3768365760ygrp-text p {margin:0 0 1em 0;}#yiv3768365760 #yiv3768365760ygrp-text tt {font-size:120%;}#yiv3768365760 #yiv3768365760ygrp-vital ul li:last-child {border-right:none !important;}#yiv3768365760