Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2006 06:24:53 -0700 (PDT)
From:      Alok Barsode <namaskar_alok@yahoo.co.in>
To:        freebsd-new-bus@freebsd.org
Subject:   Network device driver issues.
Message-ID:  <20061026132453.48510.qmail@web8904.mail.in.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hello,
I am porting freeBSD 4.10 to a embedded board. 
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 
mapped.
Now i have 2 TSEC(Three-Speed Ethernet Controller)on
the board(say TSEC0 and TSEC1). 
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 
with the freeBSD point of view? I dont understand the
struct xxx_mii_frame. 
i am looking at the National Semiconductor
DP83820/DP83821 gigabit 
ethernet driver (i.e /dev/nge/if_nge.c)

 The frame structure is: 
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. 
Is this a generic one? how does one use it? 

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 
http://mail.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061026132453.48510.qmail>