Intel 82558 Switch User Manual


 
10/100 Mbps Ethernet Controller Family Open Source Software Developer Manual 135
Programming Recommendations 8
8.1 Adapter Initialization
The initialization code can be broadly split in the following code modules:
8255x initialization
PHY detection and initialization
NOS specific initialization
The sample source code provides specific coding examples. A list of programming issues to
consider is listed in the following subsections by code module.
8.1.1 8255x Initialization
The device is internally fully reset on power up. However, the adapter and the 8255x are not
fully reset after a warm reboot. Thus, it is recommended that the software issues a Port
Software Reset command before accessing the device.
Note: All Port commands cause a complete internal reset requiring software to re-
initialize the device.
The interrupt mask bit (SCB Command word, Mask bit) is set to 0 after a complete reset,
implying that interrupts are enabled. It is software responsibility to ensure that this bit is set to
disable interrupts after a Port command is issued and before polled mode commands are
executed.
If promiscuous mode is enabled, the following Configure command bits are also affected:
SAVE BAD FRAMES. This feature should be enabled.
DISCARD SHORT FRAMES. This feature should be disabled.
PADDING. This feature should be disabled.
STRIPPING. This feature should be disabled.
It is recommended that all non-transmit action commands are executed in polled mode.
Software should maintain a single list of transmit CBs and modify a CB to a non-transmit CB
when required. The 8255x supports dynamic CU Resume commands on non-transmit
commands; therefore, no checks are required before such a command is issued.
8.1.2 PHY Detection and Initialization
It is recommended that drivers support the Intel
®
82503 and 82555 and the National
Semiconductor* DP83840 devices as well as the integrated PHY units of the 82558, 82559, 82550,
and 82551. In addition, a vendor specific routine should be executed immediately after PHY
detection to initialize specific registers in other third party PHYs (for example, the DP83840).