C H A P T E R  4

Setting Parameters

This chapter describes how to configure the eri driver parameters. Use the ndd utility to configure parameters that are valid until you reboot the system.

To configure the eri driver parameters for all devices in the system so that the parameter values are always in effect (even after rebooting the system), enter the parameter values in the /etc/system file. When the system is rebooted, it reads the /etc/system file and sets the parameter values in that file.

To set the parameters for a particular device in the system, set the parameters in the eri.conf file in the /kernel/drv directory. The parameters set in the eri.conf file have precedence over the parameters set in the /etc/system file and override the parameters set in the /etc/system file. The parameters values set in eri.conf are always in effect (even after rebooting the system).


Parameter Options

You can set the eri device driver parameters in three ways ( ndd , /etc/system , and eri.conf ), depending on your needs. To set parameters that are valid until you reboot the system, use the ndd utility. Using ndd is a good way to test parameter settings.

To set parameters so they remain in effect after you reboot the system:

If you want to test parameter settings, use the ndd utility described in Setting Parameters Using ndd . With ndd, the parameters are effective until you reboot the system. To make the parameter settings permanent, enter the values in /etc/system or eri.conf as described in this chapter.


Setting Parameters Using ndd

Use the ndd utility to configure parameters that are valid until you reboot the system. The ndd utility supports any networking driver, which implements the Data Link Provider Interface ( DLPI).

The following sections describe how you can use the eri driver and the ndd utility to modify (with the -set option) or display (without the -set option) the parameters for each SUNW,eri device.

Identifying Device Instances

Before you use the ndd utility to get or set a parameter for the eri device, you must specify the device instance for the utility if there is more than one SUNW,eri device.



Note - If there is only one SUNW,eri device, the device is automatically chosen by the ndd utility.




procedure icon  To Specify the Device Instance for the ndd Utility

1. Check the /etc/path_to_inst file to identify the instance associated with a particular device.

2. Use that instance number to select the device as follows:

% ndd -set /dev/eri instance instance number

The device remains selected until you change the selection.

Non-Interactive and Interactive Modes

You can use the ndd utility in two modes:

In non-interactive mode, you invoke the utility to execute a specific command. Once the command is executed, you exit the utility. In interactive mode, you can use the utility to get or set more than one parameter value. (Refer to the ndd (1M) man page for more information.)

Using the ndd Utility in Non-Interactive Mode

1. To modify a parameter value, use the -set option.

If you invoke the ndd utility with the -set option, the utility passes value , which must be specified down to the named /dev/eri driver instance, and assigns it to the parameter:

% ndd -set /dev/eri parameter value

2. To display the value of a parameter, specify the parameter name (and omit the value).

When you omit the -set option, a query operation is assumed and the utility queries the named driver instance, retrieves the value associated with the specified parameter, and prints it:

% ndd /dev/eri parameter

Using the ndd Utility in Interactive Mode

1. To modify a parameter value in interactive mode, specify ndd eri , as shown below.

The ndd utility then prompts you for the name of the parameter:

% ndd /dev/eri
name to get/set? (Enter the parameter name or ? to view all parameters)

After you enter the parameter name, the ndd utility prompts you for the parameter value (see Driver Parameter Values and Definitions for parameter descriptions).

2. To list all the parameters supported by the eri driver, type:

% ndd /dev/eri \?

(See Driver Parameter Values and Definitions for parameter descriptions.)

CODE EXAMPLE 4-1 Example of Listing All Parameters Supported by the eri Driver
example # ndd /dev/eri \? 
?                             (read only)
transceiver_inuse             (read only)
link_status                   (read only)
link_speed                    (read only)
link_mode                     (read only)
ipg1                          (read and write)
ipg2                          (read and write)
use_int_xcvr                  (read and write)
pace_size                     (read and write)
adv_autoneg_cap               (read and write)
adv_100fdx_cap                (read and write)
adv_100hdx_cap                (read and write)
adv_10fdx_cap                 (read and write)
adv_10hdx_cap                 (read and write)
autoneg_cap                   (read only)
100T4_cap                     (read only)
100fdx_cap                    (read only)
100hdx_cap                    (read only)
10fdx_cap                     (read only)
10hdx_cap                     (read only)
lp_autoneg_cap                (read only)
lp_100fdx_cap                 (read only)
lp_100hdx_cap                 (read only)
lp_10fdx_cap                  (read only)
lp_10hdx_cap                  (read only)
instance                      (read and write)
lance_mode                    (read and write)
ipg0                          (read and write)
example # 

Setting Forced Mode

The procedure that follows describes how to set forced mode (not capable of auto-negotiation).


procedure icon  To Select a Transceiver Capability and Set Forced Mode

1. Select one of the following capabilities: adv_100fdx_cap , adv_100hdx_cap , adv_10fdx_cap , or adv_10hdx_cap , and set its value to 1 .

If you select more than one of the local transceiver capabilities, the driver selects the one that is highest in the priority order.

2. Set the local transceiver capabilities advertised by the hardware to forced mode = 0, which is not capable of auto-negotiation: adv_autoneg_cap 0

Use the ndd utility as described in Using the ndd Utility in Interactive Mode in this chapter.

Auto-Negotiation Mode


procedure icon  To Set the Mode to Auto-Negotiation

1. Select at least one of the four capabilities ( adv_100fdx_cap , adv_100hdx_cap , adv_10fdx_cap , adv_10hdx_cap ) that you want to advertise to the remote system, and set its value to 1.

2. Set the local transceiver capabilities advertised by the hardware to 1, the auto-negotiation setting: adv_autoneg_cap 1

Use the ndd utility as described in Using the ndd Utility in Interactive Mode in this chapter.


Setting Parameters in the /etc/system File

To configure the eri driver parameters for all SUNW,eri devices in the system so that the parameter variables are always effective (even after rebooting the system), enter the parameter variables in the /etc/system file. When you reboot the system, the system reads the /etc/system file and sets these parameter variables in the eri module in the operating system kernel.

The following table lists the variables you need to set in the /etc/system file.

TABLE 4-1 Setting Variables in the /etc/system File

Parameter

Values

Description

ipg1

0, 255

ipg1 = 8 (default at initialization)

ipg2

0, 255

ipg2 = 4 (default at initialization)

pace_size

1-255

0

Number of back-to-back packets transmitted at one time

No limit to the number of back-to-back packets that can be transmitted (default)

adv_autoneg_cap

Local transceiver capability advertised by the hardware

0 = Forced mode

1 = Auto-negotiation (default)

adv_100fdx_cap

Local transceiver capability advertised by the hardware;

read/write parameter

0 = Not 100 Mbit/sec full-duplex capable

1 = 100 Mbit/sec full-duplex capable (default)

adv_100hdx_cap

Local transceiver capability advertised by the hardware;

read/write parameter

0 = Not 100 Mbit/sec half-duplex capable

1 = 100 Mbit/sec half-duplex capable (default)

adv_10fdx_cap

Local transceiver capability advertised by the hardware;

read/write parameter

0 = Not 10 Mbit/sec full-duplex capable

1 = 10 Mbit/sec full-duplex capable (default)

adv_10hdx_cap

Local transceiver capability advertised by the hardware;

read/write parameter

0 = Not 10 Mbit/sec half-duplex capable

1 = 10 Mbit/sec half-duplex capable (default)

lance_mode

0

1

lance_mode disabled

lance_mode enabled (default)

ipg0

0-31 -- Note: The default value is 16 nibble-times, which is 6.4 microseconds for 10 Mbps and 0.64 microseconds for 100 Mbps

Additional IPG before transmitting a packet (after receiving a packet)


These parameter values, described in Chapter 3 , are applicable to all SUNW,eri devices on the system. See TABLE 3-2 through TABLE 3-9 for parameter descriptions. An example follows.


procedure icon  To Set ipg1 to 10 and ipg2 to 5 When Rebooting

1. Become superuser.

2. Add the following lines to the /etc/system file:

set eri:ipg1 = 10
set eri:ipg2 = 5

3. Save the /etc/system file.

4. Save all files and exit all programs. Exit the windowing system.

5. Reboot the system by typing init 6 at the superuser prompt.

The system is halted and then rebooted.


Setting Parameters Using the eri.conf File

You can also specify the properties described in the section, Setting Parameters in the /etc/system File ," in this chapter on a per-device basis by creating the eri.conf file in the /kernel/drv directory. The properties set in the eri.conf file will override the parameters set in the /etc/system file. Use eri.conf when you need to set a particular parameter for a device in the system. The parameters you set are read and write parameters that are listed in Chapter 3 .

The man pages for prtconf (1M), system (4) and driver.conf (4) include additional details. An example follows:


procedure icon  To Configure Driver Parameters Using eri.conf

1. Obtain the hardware path name for the device in the device tree.

Typically this path name and the associated instance number will be present in the
/etc/path_to_inst file. For example, on a Sun Blade 1000 PCI system, the /etc/path_to_inst file will have the following entry:

"/pci@8,700000/network@5,1" 0 "eri" 

To identify a PCI device unambiguously in the eri.conf file, use the name, parent name, and the unit-address for the device. Refer to the pci (4) man page for more information about PCI device specification.

In the first line of the previous example:

2. Set the ipg1 and ipg2 parameters for the above device in the
/kernel/drv/eri.conf file:

name = "eri" parent = "/pci@8,700000" unit-address = "5,1" ipg1=10 ipg2=5;