Re: Duplex mode

"Steve Trigero seecwriter-/[email protected] [rabbit-semi]" <[email protected]> Thu, 24 Sep 2015 16:19:44 +0000 (UTC)
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
Tom,
I saw function asix_networkmode(), and tried unsuccessfully to follow the code to see what mode was being set.
In net_defs.lib is the following define:
#define PD_NETWORK_MODE 110   // int, int (speed, duplex)
I can't figure out how to decipher the value of 110.
And in ASIX.LIB, in function asix_ioctl() is a large switch statement that uses the define in one of the cases:
#ifdef PD_NETWORK_MODE
 ;case PD_NETWORK_MODE:
  ld  hl, PD_NETWORK_MODE
  xor a
  sbc hl, de
  jp  z, .asix_ioctl_networkmode
#endif

Notice that whatever value is in register de is subtracted from the value 110, with the result placed in hl.
Then function asix_ioctl_networkmode() is called where the first statement wipes out whatever value was in hl. So now what?
#ifdef PD_NETWORK_MODE
.asix_ioctl_networkmode:
 ;case PD_NETWORK_MODE
  ;return asix_networkmode(nic, *(int *) stack, *(int *) (stack + sizeof(int)));
  ld  hl, (sp+@sp+stack)
  ld  hl, (hl+sizeof(int))
  push hl
  ld  hl, (sp+@sp+stack+2)
  ld  hl, (hl)
  push hl
  ld  hl, (sp+@sp+nic+4)
  push hl
  asix_internal_call(asix_networkmode)
  add sp, 6
  ld  (sp+@sp+retval), hl
  jr  .asix_ioctl_return
#endif

So I have no clue as to what mode is being set.
Steve

      From: "'Tom Collins' tom-lnEA/wrDJtNWk0Htik3J/[email protected] [rabbit-semi]" <[email protected]>
 To: [email protected] 
 Sent: Wednesday, September 23, 2015 11:55 AM
 Subject: RE: [rabbit-semi] Duplex mode
   
    Steve,  It looks like asix_networkmode() in tcpip/ASIX.LIB (the driver used by the RCM3900, as shown in tcpip/BOARD_DEPS.LIB) supports a parameter for setting half or full duplex.  -Tom  From: [email protected] [mailto:[email protected]] 
Sent: Wednesday, September 16, 2015 2:08 PM
To: [email protected]
Subject: [rabbit-semi] Duplex mode    The RCM3900 is capable of both half and full duplex mode for Ethernet.  I believe that configuration is done during network negotiation. I don't need to set some #define or the like to get full duplex mode to work do I?  Steve,_._,___  #yiv3984947364 #yiv3984947364 -- #yiv3984947364ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv3984947364 #yiv3984947364ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv3984947364 #yiv3984947364ygrp-mkp #yiv3984947364hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv3984947364 #yiv3984947364ygrp-mkp #yiv3984947364ads {margin-bottom:10px;}#yiv3984947364 #yiv3984947364ygrp-mkp .yiv3984947364ad {padding:0 0;}#yiv3984947364 #yiv3984947364ygrp-mkp .yiv3984947364ad p {margin:0;}#yiv3984947364 #yiv3984947364ygrp-mkp .yiv3984947364ad a {color:#0000ff;text-decoration:none;}#yiv3984947364 #yiv3984947364ygrp-sponsor #yiv3984947364ygrp-lc {font-family:Arial;}#yiv3984947364 #yiv3984947364ygrp-sponsor #yiv3984947364ygrp-lc #yiv3984947364hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv3984947364 #yiv3984947364ygrp-sponsor #yiv3984947364ygrp-lc .yiv3984947364ad {margin-bottom:10px;padding:0 0;}#yiv3984947364 #yiv3984947364actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv3984947364 #yiv3984947364activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv3984947364 #yiv3984947364activity span {font-weight:700;}#yiv3984947364 #yiv3984947364activity span:first-child {text-transform:uppercase;}#yiv3984947364 #yiv3984947364activity span a {color:#5085b6;text-decoration:none;}#yiv3984947364 #yiv3984947364activity span span {color:#ff7900;}#yiv3984947364 #yiv3984947364activity span .yiv3984947364underline {text-decoration:underline;}#yiv3984947364 .yiv3984947364attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv3984947364 .yiv3984947364attach div a {text-decoration:none;}#yiv3984947364 .yiv3984947364attach img {border:none;padding-right:5px;}#yiv3984947364 .yiv3984947364attach label {display:block;margin-bottom:5px;}#yiv3984947364 .yiv3984947364attach label a {text-decoration:none;}#yiv3984947364 blockquote {margin:0 0 0 4px;}#yiv3984947364 .yiv3984947364bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv3984947364 .yiv3984947364bold a {text-decoration:none;}#yiv3984947364 dd.yiv3984947364last p a {font-family:Verdana;font-weight:700;}#yiv3984947364 dd.yiv3984947364last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv3984947364 dd.yiv3984947364last p span.yiv3984947364yshortcuts {margin-right:0;}#yiv3984947364 div.yiv3984947364attach-table div div a {text-decoration:none;}#yiv3984947364 div.yiv3984947364attach-table {width:400px;}#yiv3984947364 div.yiv3984947364file-title a, #yiv3984947364 div.yiv3984947364file-title a:active, #yiv3984947364 div.yiv3984947364file-title a:hover, #yiv3984947364 div.yiv3984947364file-title a:visited {text-decoration:none;}#yiv3984947364 div.yiv3984947364photo-title a, #yiv3984947364 div.yiv3984947364photo-title a:active, #yiv3984947364 div.yiv3984947364photo-title a:hover, #yiv3984947364 div.yiv3984947364photo-title a:visited {text-decoration:none;}#yiv3984947364 div#yiv3984947364ygrp-mlmsg #yiv3984947364ygrp-msg p a span.yiv3984947364yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv3984947364 .yiv3984947364green {color:#628c2a;}#yiv3984947364 .yiv3984947364MsoNormal {margin:0 0 0 0;}#yiv3984947364 o {font-size:0;}#yiv3984947364 #yiv3984947364photos div {float:left;width:72px;}#yiv3984947364 #yiv3984947364photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv3984947364 #yiv3984947364photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv3984947364 #yiv3984947364reco-category {font-size:77%;}#yiv3984947364 #yiv3984947364reco-desc {font-size:77%;}#yiv3984947364 .yiv3984947364replbq {margin:4px;}#yiv3984947364 #yiv3984947364ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv3984947364 #yiv3984947364ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv3984947364 #yiv3984947364ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv3984947364 #yiv3984947364ygrp-mlmsg select, #yiv3984947364 input, #yiv3984947364 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv3984947364 #yiv3984947364ygrp-mlmsg pre, #yiv3984947364 code {font:115% monospace;}#yiv3984947364 #yiv3984947364ygrp-mlmsg * {line-height:1.22em;}#yiv3984947364 #yiv3984947364ygrp-mlmsg #yiv3984947364logo {padding-bottom:10px;}#yiv3984947364 #yiv3984947364ygrp-msg p a {font-family:Verdana;}#yiv3984947364 #yiv3984947364ygrp-msg p#yiv3984947364attach-count span {color:#1E66AE;font-weight:700;}#yiv3984947364 #yiv3984947364ygrp-reco #yiv3984947364reco-head {color:#ff7900;font-weight:700;}#yiv3984947364 #yiv3984947364ygrp-reco {margin-bottom:20px;padding:0px;}#yiv3984947364 #yiv3984947364ygrp-sponsor #yiv3984947364ov li a {font-size:130%;text-decoration:none;}#yiv3984947364 #yiv3984947364ygrp-sponsor #yiv3984947364ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv3984947364 #yiv3984947364ygrp-sponsor #yiv3984947364ov ul {margin:0;padding:0 0 0 8px;}#yiv3984947364 #yiv3984947364ygrp-text {font-family:Georgia;}#yiv3984947364 #yiv3984947364ygrp-text p {margin:0 0 1em 0;}#yiv3984947364 #yiv3984947364ygrp-text tt {font-size:120%;}#yiv3984947364 #yiv3984947364ygrp-vital ul li:last-child {border-right:none !important;}#yiv3984947364