Sonic ethernet driver

Joel Sherrill joel.sherrill at OARcorp.com
Fri Oct 27 15:04:01 UTC 2000


Antonio da Silva Fariña wrote:
> 
> I'm trying to use networking rtems4.5 aplications on a
> THARSYS VME SPARC RT SBC Board.
> 
> Is the sonic driver in the .../libchip/network/ directory the
> lattest version ?. The attach_driver function doesn´t match
> with the prototype in rtems_bsdnet.h

There is a misunderstanding  :) and a mismatch. :(  

Misunderstanding.

The libchip sonic driver must be wrapped with some configuration
informaton.  See powerpc/dmv177/sonic/dmvsonic.c for an example.
I assume Jiri has provided you with the equivalent code for
the Tharsys since it is not in the main tree and I know he wrote some.

The libchip/sonic.c code does not have to match the stack/driver
interface
because the "wrapper" hides this. So onto the ..

Mismatch:

The 2nd parameter to "attach" is an int which is
used to indicate attaching/detaching.  It was added fairly
recently.  This fragment from gen68360/network/network.c gives
an idea.

        /*
         * Make sure we're really being attached
         */
        if (!attaching) {
                printf ("SCC1 driver can not be detached.\n");
                return 0;
        }

The dmv177/sonic instantiation does not have the 2nd parameter either.
Some drivers use it, some have it to avoid warnings and ignore it.


> Regards
> --
> _______________________________________________________________________
> 
>  Antonio da Silva Fariña
>  DIATEL-UPM                URL:    http://www.diatel.upm.es/~adasilva/
>  EUIT Telecomunicación     mailto: adasilva at diatel.upm.es
>  Ctra. Valencia, Km. 7  Tel: +34 91 3367812   Fax: +34 91 3367817
>  28031 Madrid, SPAIN
> _________________________________________________________________________

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list