Platform Notes: The hme FastEthernet Device Driver

Setting Parameters Using the hme.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 hme.conf file in the /kernel/drv directory. The properties set in the hme.conf file will override the parameters set in the /etc/system file. Use hme.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:

To Set ipg1 to 20 and ipg2 in SBus Slot 0xe
  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,hme,instance #0, or SUNW,hme,instance #1, and so on.

    The output for SUNW,hme,instance #0 for a Sun Ultra 1 Creator Series system follows:


    SUNW,hme, instance #0
                Driver software properties:
                    name <pm_norm_pwr> length <4>
                        value <0x00000001>.
                    name <pm_timestamp> length <4>
                        value <0x30743b26>.
                Register Specifications:
                    Bus Type=0xe, Address=0x8c00000, Size=108
                    Bus Type=0xe, Address=0x8c02000, Size=2000
                    Bus Type=0xe, Address=0x8c04000, Size=2000
                    Bus Type=0xe, Address=0x8c06000, Size=2000
                    Bus Type=0xe, Address=0x8c07000, Size=20

  3. Become superuser.

  4. Create the hme.conf file in the /kernel/drv directory using a text editor and add lines similar to the following to the file:

    1. Specify name="hme" and class="sbus."

    2. Use the reg property to specify the device, 0xe in this case. Use the value following Bus Type in the prtconf -v output.

    3. Type the addresses followed by the specified sizes. Precede each size with 0x and leading zeros, as indicated in the following screen.

    4. 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 Chapter 3.


      name="hme" class="sbus"
      reg=0xe,0x8c00000,0x00000108,0xe,0x8c02000,0x00002000,0xe,
      0x8c04000,0x00002000,0xe,0x8c06000,0x00002000,0xe,0x8c07000,
      0x00000020
      ipg1=20 ipg2=10;

  5. Save the hme.conf file.

  6. Save and close all files and exit all programs; exit the windowing system.

  7. Halt and reboot the system by typing the init 6 command at the # prompt.

Setting Driver Parameters for PCI-Bus hme Interfaces Using hme.conf

To Configure Driver Parameters With PCI-bus Based Systems
  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 Ultra 30 UPA/PCI system in which one SunSwift-PCI card is plugged in, the /etc/path_to_inst file will have the following two entries (in addition to entries for other devices):

    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 Ultra 30 UPA/PCI system in which one SunSwift-PCI card is plugged in, the /etc/path_to_inst file will have the following two entries (in addition to entries for other devices):


    "/pci@1f,4000/network@1,1" 0 "hme" 
    "/pci@1f,4000/pci@4/SUNW,hme@0,1" 1 "hme"

    • The first entry corresponds to the hme device on the motherboard. The second entry corresponds to the hme device on the SunSwift-PCI card.

    • In the previous lines:

      • The first part within the double quotes specifies the hardware node name in the device tree.

      • The second number is the instance number.

      • The last part in double quotes is the driver name.

    • In the device path name, the last component after the last / character and before the @ character is the device name.

    • The path name before the last component is the parent 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 hme.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:

    • Name = network

    • Parent = /pci@1f,4000

    • Unit-address = 1,1

    In the second line in the previous example:

    • Name = SUNW,hme

    • Parent = /pci@1f,4000/pci@4

    • Unit-address = 0,1

  2. Set the ipg1 and ipg2 parameters for the above two devices in the /kernel/drv/hme.conf file:


name = "SUNW,hme" parent = "/pci@1f,4000" unit-address = "1,1" ipg1=10 ipg2=5; 
name = "SUNW,hme" parent = "/pci@1f,4000/pci@4" unit-address = "0,1" ipg1=20 ipg2=10;

Note that for the motherboard device, the SUNW,hme device is used even though the path name uses the name network. The SUNW,hme device name is the value of the compatible property for this device.