TL;DR
-----
Don't use Add2ndEthernet in the initializaton code for a MOD54417; it's already used
when necessary internally. Just treat the MOD54417 as you would a MOD54415. For rev 1.1 port 0 is in
the center of the board and port 1 is on the edge; they will switch places on rev 1.2+. Port 0 will
be interface 1 in independent mode and port 1 will be interface 2 in independent mode
Overview
---------
The MOD54417 was designed first and foremost to be fully compatible with the MOD54415. This includes
not only the hardware pins, but the software application you write as well. The motivating reason
for creating the MOD54417 was the desire for a second ethernet interface for either daisy-chaining
or separate data/control or priviledged/unpriviledged communication ports/channels.
Hardware
--------
The MOD54417 is fully pin compatible with the MOD54415 for the J1 and J2 connectors. The Ethernet
jacks are a little bit of a different matter. In the initial release (rev 1.1) of the MOD54417, the
layout has the Ethernet jack for port 0 located near the center of the board and port 1 near the
edge. This fits how you would read the port numbers from left to right on a backpanel. However,
this causes a problem if a customer wants to design a single carrier board to accept either module,
since on a MOD54415 port 0 would be located on the outside edge (where port 1 is on the MOD54417).
As a result, we have modified the design of the MOD54417 to switch the Ethernet ports so that port 0
is near the outside edge, and port 1 is near the center. All modules of revision 1.2 or later will
have this configuration.
Now, why did we change this after release? We changed this after release because we had a few
different options for correcting the "flaw":
- Scrap the boards/only use internally and delay release until it has been corrected.
Unfortunately, the implications of the port swap weren't realized until the initial board run was
complete. As such, this would require waiting for an entire purchase cycle for the dual ethernet
jacks, as this is the first product we have that uses them. The lead time on the part would mean a
rather significant delay on us being able to get these to developers.
- Let it be and don't change anything. This is/was certainly an option. However, as previously
stated, we wanted 100% software compatibility between the 54415 and the 54417. If we left the jacks
swapped, then for the -200 version (headers instead of jacks) a board designed to accept both the
54415 and the 54417, the primary interface would be wrong.
- Swap it in software. Again, this was considered. It's actually pretty simple to do. The problem
is that if anyone ever creates a derivative design (aka, a custom board), the derivative would
either have to carry forward the flaw, or the driver gets really screwy. Still not a good idea.
- We release the module as is for DEVELOPMENT and notify people of the issue (what we're doing
here).
Isn't product design and release fun? XD
Software
--------
Continuing with the full compatibility thread, let's discuss the networking software. Here's where
there's likely to be the most confusion. The MOD54417's Ethernet driver is designed such that it
will configure both network interfaces according to the hardware mode (switched vs. independent)
automatically with only the single call to InitializeStack(). Moving a little further,
GetDHCPAddressIfNecessary() has been modified to support this process. Previously, the default call
to GetDHCP... would only configure the first interface in the system. Now, the default call will
perform the check and negotiation process on ALL network interfaces in existance at the time of the
call.
Going back a bit, I mentioned that InitialeStack() will configure the interfaces properly according
to the hardware mode. The question is, how is that mode set? There are three ways to do that: set it
in the monitor with the 'E' command in the Setup menu, use the 'ESwitch Enable' checkbox under 'Advanced' in
IPSetup 2.3+, or directly set the flag in the primary ConfigRecord and save it in your application.
Now, what does this mean for the actual code you need to write to work with both interfaces? Are you
simply sitting on two different LANs? Are you just running with the switch? Are you doing anything
other than targeting a specific hardware interface? If any of these are true, you don't need to do
anything. The network stack will setup the IP address according to the normal process and route
connections accordingly. Just have the normal InitializeStack() and GetDHCPAddressIfNecessary()
calls.
We'll go a little more into detail for working with different interfaces in a followup.
-Dan