Friday, September 02, 2005

hme Troubleshooting

hme Troubleshooting

To examine or set a specific hme interface (hme#), specify it as follows:

ndd -set /dev/hme instance #

To examine parameter values, use a ndd -get command. In particular,
link_speed reveals whether the interface is operating on 10Mbs or
100Mbs mode (settings of 0 and 1, repectively), and link_mode reveals
whether it is running at half or full duplex (0 and 1, respectively).

ndd -get /dev/hme link_speed
ndd -get /dev/hme link_mode

To perform a hard set of the link_speed and link_mode parameters for
hme#, several other parameters must be set with the ndd -set command.
In these parameter names, 10 or 100 refers to link_speed, fdx or hdx
refers to link_mode, and autoneg refers to autonegotiation capability.
The setting corresponding to the desired mode should be set to "1" and
all other parameters should be set to "0." (adv_autoneg_cap=1 is the
default.) For example, to set hme# to 100/full duplex:

ndd -set /dev/hme instance #
ndd -set /dev/hme adv_100T4_cap 0
ndd -set /dev/hme adv_100fdx_cap 1
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_10fdx_cap 0
ndd -set /dev/hme adv_10hdx_cap 0
ndd -set /dev/hme adv_autoneg_cap 0

ndd -set commands can be used in the /etc/rc2.d/S69inet initialization
script to set the interface mode during boot rather than allowing
autonegotiation. This can be useful if one of the interfaces is
connected to an older switch that is not autonegotiating the line
speed or mode correctly.

The line speed and mode can also be set for all hme interfaces on the
system by setting the following in the /etc/system file and rebooting.
(Note: The following are Sun's official recommendations. It may not be
necessary to set every parameter to either 0 or 1, but it is easiest
to get support when following instructions to the letter.):

* 100 Mb, full duplex:

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100fdx_cap=1

* 100 Mb, half duplex:

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100fdx_cap=0
set hme:hme_adv_100hdx_cap=1

* 10 Mb, full duplex:

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100fdx_cap=0
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=1
set hme:hme_adv_10hdx_cap=0

* 10 Mb, half duplex:

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100fdx_cap=0
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=0
set hme:hme_adv_10hdx_cap=1

Hardware Testing
One elementary test for the ethernet hardware is to invoke the
watch-net-all command from the ok> PROM monitor prompt. This performs
some simple diagnostics and listens on the ethernet port. Since this
is at a much lower level than the driver level, it can be used to
distinguish between hardware and software problems.

Debug Mode
The hme, qfe and be ethernet drivers can be switched into debug mode.
This can be done in the /etc/system file by adding:

set hme:hmedebug=1

Alternatively, this can be done on a live system using adb:

adb -kw /dev/ksyms /dev/mem
hmedebug/D (to display current value)
hmedebug/W 1 (be careful to use uppercase "W")

Debug mode permits the driver to display messages to the console. Some
of the messages are informational, others are error messages. When
examining the messages, remember that you are seeing one system's view
of the network, and that this bias needs to be taken into account.


Post a Comment

<< Home