RTL8169: Difference between revisions

m
Slight grammar correction; code slightly reformatted to make what's happening clearer
[unchecked revision][unchecked revision]
(→‎Full Reset Example: no discussions inside an article, please)
m (Slight grammar correction; code slightly reformatted to make what's happening clearer)
Line 9:
=== Get the MAC Address ===
 
First thing'sthings first, we need to get the NIC's physical MAC address. Normally we should go through the EEPROM to access the MAC address, but in this case we will take a shortcut and obtain the address from the MAC0-6 registers. The MAC registers start at offset 0x00 and should be accessed in 8-bit segments.
 
ex:
char i;
for (i = 0; i < 6; i++)
{
{ mac_address[i] = inportb(ioaddr + i);} /*ioaddr is the base address obtainable from the PCI device configuration space.*/
}
 
=== Reset the Chip ===
Anonymous user