Gary N Spiess wrote:
The existing driver code was already written to reference the "current PHY"
with address 1. To select a different address to represent the current PHY would have
required me to touch more lines of source.
Then touch more lines of source - the patch as it is is unreadable.
- The partial reset fix (again, to the best of my knowledge) is only needed when the
internal PHY being used has reset, but the MAC has not. The dspcfg != np->dspcfg
test identifies an internal PHY that has been reset, and triggers the driver to do a
a complete MAC/PHY reset. When using an external PHY, the test continually causes
unneeded resets. The change to set np->dspcfg to 0 prevents it. This was the
minimal change to get the desired results.
Again, miminal change doesn't matter. Add a
+ if (dev->if_port != PORT_TP) return;
into {do,undo}_cable_magic() and netdev_timer(). Perhaps with a comment
that the following block is specific to the internal PHY.
--
Manfred
|