[En-Nut-Discussion] Network drivers

Thiago A. Corrêa thiago.correa at gmail.com
Fri Mar 5 13:25:14 CET 2010


Hi,

   Yesterday Ole, Michael and I talked briefly about some of the
problems we have with the network drivers. First there is no way for
the lower driver to notify the upper stacks about fatal errors that it
encounters, such as a cable disconnect. Also it would be nice if the
driver could give out information about the link speed, so it could be
shown in a display for example.

    One suggestion that came up was add a new callback (IFNET struct perhaps?).
    In addition to that, I notice that all drivers seams to send just
about the same thing to the phy's, except that its duplicated in
several drivers in several archs. Perhaps we could implement a simple
phy lib. Not actually a lib but a few generic routines for all archs.
We could either add 2 function pointers at the IFNET with the MAC
driver read/write routines or to save a few bytes at the expense of
runtime, just send to the mii_bus functions the callbacks on each
call. I can think of a phy_init and an phy_reset. I'm not yet sure how
the PHY notifies cable disconnects. It looks like the National phy
that we are using has an int signal to it that we are connecting to
the MCU in our board. If that's a "standard" way of doing that, then I
think the MAC driver should handle that and it simplifies the phy
routines.

   Michael: I couldn't find the SMC implementation that we have that
handles cable disconnect, could you point me to the right file?

Kind Regards,
    Thiago A. Correa



More information about the En-Nut-Discussion mailing list