Network device driver issues.
Alok Barsode
namaskar_alok at yahoo.co.in
Thu Oct 26 13:24:56 UTC 2006
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
More information about the freebsd-new-bus
mailing list