C H A P T E R 4 |
Setting Parameters |
This chapter describes three methods to configure the qfe driver parameters. This chapter contains the following sections:
You can set the qfe device driver parameters in three ways ( ndd , /etc/system , and qfe.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. 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 configure the qfe 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.. Setting Parameters in the /etc/system File describes this option.
To set the parameters for a particular device in the system, set the parameters in the qfe.conf file in the /kernel/drv directory. The parameters set in the qfe.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 qfe.conf are always in effect (even after rebooting the system). Setting Parameters Using the qfe.conf File describes this option.
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 qfe driver and the ndd utility to modify (with the -set option) or display (without the -set option) the parameters for each SUNW,qfe device.
Before you use the ndd utility to get or set a parameter for the qfe device, you must specify the device instance for the utility if there is more than one SUNW,qfe device.
Note - If there is only one SUNW,qfe device, the device is automatically chosen by the ndd utility. |
1. Check the /etc/path_to_inst file to identify the instance associated with a particular device.
You should see the full path names of the qfe devices, similar to the following examples:
For Sun Quad FastEthernet PCI adapter:
/pci@1f,2000/pci@2/SUNW,qfe@0,1 /pci@1f,2000/pci@2/SUNW,qfe@1,1 /pci@1f,2000/pci@2/SUNW,qfe@2,1 /pci@1f,2000/pci@2/SUNW,qfe@3,1 |
For Sun Quad FastEthernet SBus adapter:
/sbus@1f,0/SUNW,qfe@1,8c30000 /sbus@1f,0/SUNW,qfe@1,8c20000 /sbus@1f,0/SUNW,qfe@1,8c10000 /sbus@1f,0/SUNW,qfe@1,8c00000 |
2. Use that instance number to select the device as follows:
The device remains selected until you change the selection.
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.)
This section describes how to modify a parameter value and how to display a parameter value.
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/qfe driver instance, and assigns it to the parameter:
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:
1. To modify a parameter value in interactive mode, specify ndd /dev/qfe , as shown below.
The ndd utility then prompts you for the name of the parameter:
After you enter the parameter name, the ndd utility prompts you for the parameter value (see TABLE 3-2 through TABLE 3-9 ).
2. To list all the parameters supported by the qfe driver, type ndd /dev/qfe \? .
(See TABLE 3-2 through TABLE 3-9 for parameter descriptions.)
The following procedure describes how to set forced mode. When the SUNW,qfe device is in forced mode it is not capable of auto-negotiation.
t To Select One Local Transceiver Capability and Setting Forced Mode |
1. Select one of the transceiver capabilities 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. The permitted values are as follows:
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 Non-Interactive Mode in this chapter.
1. Select at least one of the five transceiver capabilities 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.
To configure the qfe driver parameters for all SUNW,qfe 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 qfe module in the operating system kernel.
TABLE 4-1 lists the variables you need to set in the /etc/system file.
These parameter values, described in Chapter 3 , are applicable to all SUNW,qfe devices on the system. See TABLE 3-2 through TABLE 3-9 for parameter descriptions. An example follows.
1. As superuser, add the following lines to the /etc/system file:
3. Save all files and exit all programs. Exit the windowing system.
4. Reboot the system by typing init 6 at the superuser prompt.
The system is halted and then rebooted.
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 qfe.conf file in the /kernel/drv directory. The properties set in the qfe.conf file will override the parameters set in the /etc/system file. Use qfe.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 Driver Parameter Values and Definitions .
The man pages for prtconf (1M), system (4) and driver.conf (4) include additional details. An example follows:
1. Invoke the
prtconf -v
command and pipe the output to the
more
command
(
prtconf -v | more
) or redirect the output of the command to a file name
(
prtconf -v >
filename
) and print the redirected file.
2. Find the section in the
prtconf -v
output for
SUNW,qfe,instance #0
,
or
SUNW,qfe,instance #1,
and so on.
The output for SUNW,qfe,instance #0 for a Sun Ultra 1 Creator Series system follows:
3. As superuser, create the qfe.conf file in the /kernel/drv directory using a text editor and add lines similar to the following to the file:
a. Specify name="qfe" and class="sbus . "
b. Use the reg property to specify the device, 0xe in this case. Use the value following Bus Type in the prtconf -v output.
c. Type the addresses followed by the specified sizes. Precede each size with 0x and leading zeros, as indicated in the following screen.
d. Set ipg1 and ipg2 . Type a semicolon ( ; ) after the last value.
These parameters are set to 20 and 10, respectively, in this example. The ipg parameters are defined in Driver Parameter Values and Definitions ..
name="qfe" class="sbus" reg=0xe,0x8c00000,0x00000108,0xe,0x8c02000,0x00002000,0xe, 0x8c04000,0x00002000,0xe,0x8c06000,0x00002000,0xe,0x8c07000, 0x00000020 ipg1=20 ipg2=10; |
5. Save and close all files and exit all programs; exit the windowing system.
6. Halt and reboot the system by typing the init 6 command at the superuser prompt.
To Configure Driver Parameters on a Sun Quad FastEthernet PCI Adapter |
1. Obtain the hardware path name for the qfe devices 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 Ultra 30 UPA/PCI system in which one Sun Quad FastEthernet Device Driver PCI card is installed, the
/etc/path_to_inst
file will have the following entries (in addition to entries for other devices)
"/pci@1f,2000/network@1,1" 0 "qfe" "/pci@1f,2000/pci@2/SUNW,qfe@0,1" 4 "qfe""/pci@1f,2000/pci@2/SUNW,qfe@1,1" 5 "qfe""/pci@1f,2000/pci@2/SUNW,qfe@2,1" 6 "qfe""/pci@1f,2000/pci@2/SUNW,qfe@3,1" 7 "qfe" |
The first entry corresponds to the qfe device on the motherboard. The second entry corresponds to the qfe device on the Sun Quad FastEthernet Device Driver PCI card.
In the device path name, the last component after the last / character and before the @ character is the device name.
The comma-separated numbers after the @ character at the end represent the device and function numbers, which are together referred to as unit-address.
To identify a PCI device unambiguously in the qfe.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 the PCI device specification.
In the first line of the previous example:
In the second line in the previous example:
2. Set the
ipg1
and
ipg2
parameters for the above two devices in the
/kernel/drv/qfe.conf
file:
Note that for the motherboard device, the SUNW,qfe device is used even though the path name uses the name network . The SUNW,qfe device name is the value of the compatible property for this device.
3. Save the /kernel/drv/qfe.conf file.
4. Save and close all programs, and exit the windowing system.
5. As superuser, halt and reboot the system by typing init 6.
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.