Network device driver issues.

Alok Barsode <[email protected]> Thu, 26 Oct 2006 06:24:53 -0700 (PDT)
Newsgroups gmane.os.freebsd.devel.new-bus
Message-ID <[email protected]>
Hello,
I am porting freeBSD 4.10 to a embedded board.=20
The board has 2 Three speed Ethernet Controller and a
Cicada PHY.
I have implemented a pseudo-bus (called mpcbus) which
attaches itself to nexus.
i plan to attach all the devices to the mpcbus. (i
will be calling the IDENTIFY function for each
device-driver).All the devices are memory=20
mapped.
Now i have 2 TSEC(Three-Speed Ethernet Controller)on
the board(say TSEC0 and TSEC1).=20
During the IDENTIFY routine, should the function
BUS_ADD_CHILD() called twice ,once for each TSEC?

I also dont what the PHY to be configured sepatately.
(I right now dont want any "mii" stuff) I will
configure the PHY manually. is this fine=20
with the freeBSD point of view? I dont understand the
struct xxx_mii_frame.=20
i am looking at the National Semiconductor
DP83820/DP83821 gigabit=20
ethernet driver (i.e /dev/nge/if_nge.c)

 The frame structure is:=20
struct nge_mii_frame {
         u_int8_t                mii_stdelim;
         u_int8_t                mii_opcode;
         u_int8_t                mii_phyaddr;
         u_int8_t                mii_regaddr;
         u_int8_t                mii_turnaround;
         u_int16_t               mii_data;
 };All the drivers use this kind of frame structure.=20
Is this a generic one? how does one use it?=20

is there a simple driver i can look at? or a simple
tutorial on network drivers?
the National Semiconductor driver is a bit complex.

Thanks,
alok.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-new-bus
To unsubscribe, send any mail to "[email protected]=
"