how to read mac address from eeprom

hi ,

i’m a student and doing project on device driver. i’m new to the device
driver field. I am trying to write a NDIS miniport driver by modelling the
e100bex sample of the DDK sample. i’m trying to do it on RTL 8139(A) based
NIC.

please answer me how to

  1. how to design a miniport adapter structure for a particular NIC

  2. how to read the configuration space of eeprom(i want to read
    configuration details mainly mac address).

also i am not getting the RTL 8139(A) datasheet , can anybody send it to
me?.i could download RTL 8139(C) nd (D). will it be the same for my
purpose?.

Please tel me how i can read mac address from the PROM. Or if there is
another way to do this (reading from pci space or like that), please tel me
how to do it.

regards,
swetha

I generally build structures like this by adding elements to them as
I find that I need them. Your particular driver architecture will
dictate what needs to be stored on a per-adapter basis.

In general, nothing should be global, so essentially everything you
need to reference outside of locals will need to be in the adapter
struct.

There are exceptions, of course; I find that it’s often better to
share things like lookaside lists across multiple adapters.

As far as reading the configuration from your NIC, that is NIC-
dependent, and instructions will be in the data sheet. I haven’t ever
coded an 8139 driver, but I expect it exposes its MAC address through
standard port I/O. I think the DDK sample driver has an illustration
of how to do this.

As for the datasheet version, you should obviously search Google, but
if you can’t find it, try using the one you have. I can’t imagine
that, for your research purposes, you’re going to find too much
difference between the chips. Just a guess, of course.

Good luck.

-Steve

On Oct 13, 2006, at 7:30 AM, Swetha Goel wrote:

hi ,

i’m a student and doing project on device driver. i’m new to the
device driver field. I am trying to write a NDIS miniport driver by
modelling the e100bex sample of the DDK sample. i’m trying to do it
on RTL 8139(A) based NIC.

please answer me how to

  1. how to design a miniport adapter structure for a particular NIC

  2. how to read the configuration space of eeprom(i want to read
    configuration details mainly mac address).

also i am not getting the RTL 8139(A) datasheet , can anybody send
it to me?.i could download RTL 8139(C) nd (D). will it be the same
for my purpose?.

Please tel me how i can read mac address from the PROM. Or if there
is another way to do this (reading from pci space or like that),
please tel me how to do it.

regards,
swetha

— Questions? First check the Kernel Driver FAQ at http://
www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at http://www.osronline.com/page.cfm?
name=ListServer