EmbeddedRelated.com
Forums
Memfault Beyond the Launch

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

Started by "Tom...@tomlogic.com [rabbit-semi]" May 20, 2016
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
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 t...@tomlogic.com [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
>
>
How do you download the file?

From: "Tom Collins t...@tomlogic.com [rabbit-semi]"
To: r...
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 t...@tomlogic.com [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
You can download the updated ASIX.LIB with this link:

https://raw.githubusercontent.com/digidotcom/DCRabbit_10/740114c8e0c1f988f121fccd50ff0079da6634b2/Lib/Rabbit4000/tcpip/ASIX.LIB

-Tom
On May 25, 2016, at 2:50 PM, Steve Trigero s...@yahoo.com [rabbit-semi] wrote:

> How do you download the file?
> From: "Tom Collins t...@tomlogic.com [rabbit-semi]"
> To: r...
> 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
Thanks. Is this the same file used in DC 9.62? If not, can you send a link for that file as well?
Steve

From: "Tom Collins t...@tomlogic.com [rabbit-semi]"
To: r...
Sent: Wednesday, May 25, 2016 4:00 PM
Subject: Re: [rabbit-semi] Updated ASIX.LIB with improved link recovery for Dynamic C 9

  You can download the updated ASIX.LIB with this link:
https://raw.githubusercontent.com/digidotcom/DCRabbit_10/740114c8e0c1f988f121fccd50ff0079da6634b2/Lib/Rabbit4000/tcpip/ASIX.LIB
-Tom

On May 25, 2016, at 2:50 PM, Steve Trigero s...@yahoo.com [rabbit-semi] wrote:

How do you download the file?
From: "Tom Collins t...@tomlogic.com [rabbit-semi]"
To: r... 
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
#yiv6084774424 #yiv6084774424 -- #yiv6084774424ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv6084774424 #yiv6084774424ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv6084774424 #yiv6084774424ygrp-mkp #yiv6084774424hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv6084774424 #yiv6084774424ygrp-mkp #yiv6084774424ads {margin-bottom:10px;}#yiv6084774424 #yiv6084774424ygrp-mkp .yiv6084774424ad {padding:0 0;}#yiv6084774424 #yiv6084774424ygrp-mkp .yiv6084774424ad p {margin:0;}#yiv6084774424 #yiv6084774424ygrp-mkp .yiv6084774424ad a {color:#0000ff;text-decoration:none;}#yiv6084774424 #yiv6084774424ygrp-sponsor #yiv6084774424ygrp-lc {font-family:Arial;}#yiv6084774424 #yiv6084774424ygrp-sponsor #yiv6084774424ygrp-lc #yiv6084774424hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv6084774424 #yiv6084774424ygrp-sponsor #yiv6084774424ygrp-lc .yiv6084774424ad {margin-bottom:10px;padding:0 0;}#yiv6084774424 #yiv6084774424actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv6084774424 #yiv6084774424activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv6084774424 #yiv6084774424activity span {font-weight:700;}#yiv6084774424 #yiv6084774424activity span:first-child {text-transform:uppercase;}#yiv6084774424 #yiv6084774424activity span a {color:#5085b6;text-decoration:none;}#yiv6084774424 #yiv6084774424activity span span {color:#ff7900;}#yiv6084774424 #yiv6084774424activity span .yiv6084774424underline {text-decoration:underline;}#yiv6084774424 .yiv6084774424attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv6084774424 .yiv6084774424attach div a {text-decoration:none;}#yiv6084774424 .yiv6084774424attach img {border:none;padding-right:5px;}#yiv6084774424 .yiv6084774424attach label {display:block;margin-bottom:5px;}#yiv6084774424 .yiv6084774424attach label a {text-decoration:none;}#yiv6084774424 blockquote {margin:0 0 0 4px;}#yiv6084774424 .yiv6084774424bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv6084774424 .yiv6084774424bold a {text-decoration:none;}#yiv6084774424 dd.yiv6084774424last p a {font-family:Verdana;font-weight:700;}#yiv6084774424 dd.yiv6084774424last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv6084774424 dd.yiv6084774424last p span.yiv6084774424yshortcuts {margin-right:0;}#yiv6084774424 div.yiv6084774424attach-table div div a {text-decoration:none;}#yiv6084774424 div.yiv6084774424attach-table {width:400px;}#yiv6084774424 div.yiv6084774424file-title a, #yiv6084774424 div.yiv6084774424file-title a:active, #yiv6084774424 div.yiv6084774424file-title a:hover, #yiv6084774424 div.yiv6084774424file-title a:visited {text-decoration:none;}#yiv6084774424 div.yiv6084774424photo-title a, #yiv6084774424 div.yiv6084774424photo-title a:active, #yiv6084774424 div.yiv6084774424photo-title a:hover, #yiv6084774424 div.yiv6084774424photo-title a:visited {text-decoration:none;}#yiv6084774424 div#yiv6084774424ygrp-mlmsg #yiv6084774424ygrp-msg p a span.yiv6084774424yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv6084774424 .yiv6084774424green {color:#628c2a;}#yiv6084774424 .yiv6084774424MsoNormal {margin:0 0 0 0;}#yiv6084774424 o {font-size:0;}#yiv6084774424 #yiv6084774424photos div {float:left;width:72px;}#yiv6084774424 #yiv6084774424photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv6084774424 #yiv6084774424photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv6084774424 #yiv6084774424reco-category {font-size:77%;}#yiv6084774424 #yiv6084774424reco-desc {font-size:77%;}#yiv6084774424 .yiv6084774424replbq {margin:4px;}#yiv6084774424 #yiv6084774424ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv6084774424 #yiv6084774424ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv6084774424 #yiv6084774424ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv6084774424 #yiv6084774424ygrp-mlmsg select, #yiv6084774424 input, #yiv6084774424 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv6084774424 #yiv6084774424ygrp-mlmsg pre, #yiv6084774424 code {font:115% monospace;}#yiv6084774424 #yiv6084774424ygrp-mlmsg * {line-height:1.22em;}#yiv6084774424 #yiv6084774424ygrp-mlmsg #yiv6084774424logo {padding-bottom:10px;}#yiv6084774424 #yiv6084774424ygrp-msg p a {font-family:Verdana;}#yiv6084774424 #yiv6084774424ygrp-msg p#yiv6084774424attach-count span {color:#1E66AE;font-weight:700;}#yiv6084774424 #yiv6084774424ygrp-reco #yiv6084774424reco-head {color:#ff7900;font-weight:700;}#yiv6084774424 #yiv6084774424ygrp-reco {margin-bottom:20px;padding:0px;}#yiv6084774424 #yiv6084774424ygrp-sponsor #yiv6084774424ov li a {font-size:130%;text-decoration:none;}#yiv6084774424 #yiv6084774424ygrp-sponsor #yiv6084774424ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv6084774424 #yiv6084774424ygrp-sponsor #yiv6084774424ov ul {margin:0;padding:0 0 0 8px;}#yiv6084774424 #yiv6084774424ygrp-text {font-family:Georgia;}#yiv6084774424 #yiv6084774424ygrp-text p {margin:0 0 1em 0;}#yiv6084774424 #yiv6084774424ygrp-text tt {font-size:120%;}#yiv6084774424 #yiv6084774424ygrp-vital ul li:last-child {border-right:none !important;}#yiv6084774424
And here's the latest ASIX.LIB for DC9:

https://raw.githubusercontent.com/digidotcom/DCRabbit_9/16126a371635a7c70b0587958e0873ee05cfca6b/Lib/tcpip/ASIX.LIB

-Tom
On May 26, 2016, at 9:08 AM, Steve Trigero s...@yahoo.com [rabbit-semi] wrote:

>
> Thanks. Is this the same file used in DC 9.62? If not, can you send a link
> for that file as well?
>
> Steve
>
> From: "Tom Collins t...@tomlogic.com [rabbit-semi]"
> To: r...
> Sent: Wednesday, May 25, 2016 4:00 PM
> Subject: Re: [rabbit-semi] Updated ASIX.LIB with improved link recovery for Dynamic C 9
>
>
> You can download the updated ASIX.LIB with this link:
>
> https://raw.githubusercontent.com/digidotcom/DCRabbit_10/740114c8e0c1f988f121fccd50ff0079da6634b2/Lib/Rabbit4000/tcpip/ASIX.LIB
>
> -Tom
> On May 25, 2016, at 2:50 PM, Steve Trigero s...@yahoo.com [rabbit-semi] wrote:
>
>> How do you download the file?
>> From: "Tom Collins t...@tomlogic.com [rabbit-semi]"
>> To: r...
>> 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
>>
>

Memfault Beyond the Launch