summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog53
-rw-r--r--doc/spec/hal-spec.html1532
-rw-r--r--doc/spec/hal-spec.xml.in693
-rw-r--r--hald/linux2/blockdev.c9
-rw-r--r--hald/linux2/classdev.c86
-rw-r--r--hald/linux2/osspec.c22
-rw-r--r--hald/linux2/osspec_linux.h2
-rw-r--r--hald/linux2/physdev.c386
-rw-r--r--hald/util.c1
9 files changed, 2740 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c18eb57..160625a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,58 @@
2005-06-27 David Zeuthen <davidz@redhat.com>
+ Patch-set from Cornelia Huck <cohuck@de.ibm.com>. I've been
+ working on support for Linux on S/390 specific devices in HAL. The
+ following patchset includes some non-s390 specific patches and
+ support for the S/390 bus types.
+
+ * doc/spec/hal-spec.xml.in: Document the properties of ccw,
+ ccwgroup, iucv, and tape devices.
+
+ * hald/linux2/classdev.c (tape_add, tape_compute_udi): This
+ comprises support for both the generic tape class and the tape390
+ class, as the two don't differ in anything but name.
+
+ * hald/linux2/blockdev.c (hotplug_event_begin_add_blockdev): ccw
+ devices need to be considered for block devices.
+
+ * hald/linux2/physdev.c (iucv_add_netiucv_properties)
+ (iucv_add, iucv_compute_udi): The iucv bus is for virtual devices
+ under z/VM - currently only netiucv is implemented.
+
+ * hald/linux2/physdev.c (ccwgroup_add_qeth_properties)
+ (ccwgroup_add_ctc_properties, ccwgroup_add_lcs_properties)
+ (ccwgroup_add_claw_properties, ccwgroup_add)
+ (ccwgroup_compute_udi): The ccwgroup on S/390 contains devices
+ consisting of grouped ccw devices - usually networking devices. As
+ with the ccw bus, there are some common properties and lots of
+ device specific ones.
+
+ * hald/linux2/physdev.c (ccw_add_dasd_properties)
+ (ccw_add_zfcp_properties, ccw_add_tape_properties)
+ (ccw_add_3270_properties, ccw_add, ccw_compute_udi): The ccw bus
+ on s390 contains all classic channel-attached devices. They all
+ have a few common properties, but also driver-specific ones.
+
+ * hald/linux2/osspec_linux.h: Export hal_util_get_driver_name ()
+
+ * hald/linux2/osspec.c (hal_util_get_driver_name): New function
+ (hal_util_set_driver): Refactor to use hal_util_get_driver_name
+
+ * hald/linux2/classdev.c (net_add): Set MAC-address to zero's
+ if we can't read it.
+ (net_compute_udi): Use some other unique ID if MAC address is
+ missing or set to all zero's.
+
+ * hald/linux2/blockdev.c (blockdev_compute_udi): Generate a
+ sensible name for block devices for which the model is an
+ empty string.
+
+ * hald/util.c: This patch adds a needed include for some
+ interfaces, or gcc 4.0 will make incorrect assumptions on the
+ format of some functions.
+
+2005-06-27 David Zeuthen <davidz@redhat.com>
+
* volume_id/util.h: Include stdint.h to get uint8_t and friends so
we compile on Linux.
diff --git a/doc/spec/hal-spec.html b/doc/spec/hal-spec.html
index bd59a4ea..d1ebc6e4 100644
--- a/doc/spec/hal-spec.html
+++ b/doc/spec/hal-spec.html
@@ -239,6 +239,30 @@ CLASS="literal"
></DT
><DT
><A
+HREF="#device-properties-ccw"
+><TT
+CLASS="literal"
+>ccw</TT
+> namespace</A
+></DT
+><DT
+><A
+HREF="#device-properties-ccwgroup"
+><TT
+CLASS="literal"
+>ccwgroup</TT
+> namespace</A
+></DT
+><DT
+><A
+HREF="#device-properties-iucv"
+><TT
+CLASS="literal"
+>iucv</TT
+> namespace</A
+></DT
+><DT
+><A
HREF="#device-properties-block"
><TT
CLASS="literal"
@@ -414,6 +438,14 @@ CLASS="literal"
>sensor</TT
> namespace</A
></DT
+><DT
+><A
+HREF="#device-properties-tape"
+><TT
+CLASS="literal"
+>tape</TT
+> namespace</A
+></DT
></DL
></DD
><DT
@@ -512,21 +544,21 @@ HREF="#dbus-api"
><DL
><DT
><A
-HREF="#AEN2606"
+HREF="#AEN3138"
>Interface org.freedesktop.Hal.Manager</A
></DT
><DD
><DL
><DT
><A
-HREF="#AEN2617"
+HREF="#AEN3149"
>Example</A
></DT
></DL
></DD
><DT
><A
-HREF="#AEN2625"
+HREF="#AEN3157"
>Interface org.freedesktop.Hal.Device</A
></DT
></DL
@@ -3286,6 +3318,1362 @@ CLASS="sect2"
><HR><H3
CLASS="sect2"
><A
+NAME="device-properties-ccw"
+><TT
+CLASS="literal"
+>ccw</TT
+> namespace</A
+></H3
+><P
+>&#13;
+ Device objects that represent s390 ccw devices (when <TT
+CLASS="literal"
+>info.bus
+ </TT
+> is set to <TT
+CLASS="literal"
+>ccw</TT
+>) are represented by the
+ properties below.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN876"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.devtype</TT
+> (string)</TD
+><TD
+>example: 1732/01</TD
+><TD
+>Yes</TD
+><TD
+>Device type/model or n/a</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.cutype</TT
+> (string)</TD
+><TD
+>example: 1731/01</TD
+><TD
+>Yes</TD
+><TD
+>Control unit type/model</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.cmb_enable</TT
+> (int)</TD
+><TD
+>example: 1</TD
+><TD
+>Yes</TD
+><TD
+>If channel measurements are enabled</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.availability</TT
+> (string)</TD
+><TD
+>example: good</TD
+><TD
+>Yes</TD
+><TD
+>Can be one of 'good', 'boxed', 'no path',
+ or 'no device'</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.online</TT
+> (int)</TD
+><TD
+>example: 1</TD
+><TD
+>Yes</TD
+><TD
+>Online status</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.bus_id</TT
+> (string)</TD
+><TD
+>example: 0.0.f588</TD
+><TD
+>Yes</TD
+><TD
+>The device's bus id in sysfs</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.subchannel.pim</TT
+> (int)</TD
+><TD
+>example: 0x80</TD
+><TD
+>No</TD
+><TD
+>path installed mask</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.subchannel.pam</TT
+> (int)</TD
+><TD
+>example: 0x80</TD
+><TD
+>No</TD
+><TD
+>path available mask</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.subchannel.pom</TT
+> (int)</TD
+><TD
+>example: 0xff</TD
+><TD
+>No</TD
+><TD
+>path operational mask</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.subchannel.chpid0..7</TT
+> (int)</TD
+><TD
+>example: 0x40</TD
+><TD
+>No</TD
+><TD
+>channel path ids</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccw</TT
+> devices where
+ <TT
+CLASS="literal"
+>linux.driver</TT
+> is either <TT
+CLASS="literal"
+>dasd-eckd</TT
+>
+ or <TT
+CLASS="literal"
+>dasd-fba</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN950"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.dasd.use_diag</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>If the device driver shall use diagnose calls to access
+ the device</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.dasd.readonly</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>If the device can only be accessed readonly</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.dasd.discipline</TT
+> (string)</TD
+><TD
+>example: ECKD</TD
+><TD
+>No</TD
+><TD
+>The dasd discipline used to access the device</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccw</TT
+> devices where
+ <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>zfcp</TT
+>. They are
+ only present when <TT
+CLASS="literal"
+>ccw.online = 1</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN982"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.zfcp.in_recovery</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>Shows whether the adapter is currently in recovery</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.zfcp.failed</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>Shows whether the adapter is in failed state</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccw</TT
+> devices where
+ <TT
+CLASS="literal"
+>linux.driver</TT
+> is of the form <TT
+CLASS="literal"
+>tape_3xxx
+ </TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1007"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.tape.state</TT
+> (string)</TD
+><TD
+>example: IN_USE</TD
+><TD
+>Yes</TD
+><TD
+>The current status of the tape</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.tape.operation</TT
+> (string)</TD
+><TD
+>example: REW</TD
+><TD
+>Yes</TD
+><TD
+>A three-letter mnemonic of the current tape operation
+ </TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.tape.mediumstate</TT
+> (string)</TD
+><TD
+>example: no medium</TD
+><TD
+>No</TD
+><TD
+>If <TT
+CLASS="literal"
+>ccw.online = 1</TT
+>, shows whether a tape
+ is loaded</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.tape.blocksize</TT
+> (int)</TD
+><TD
+>example: 512</TD
+><TD
+>No</TD
+><TD
+>If <TT
+CLASS="literal"
+>ccw.online = 1</TT
+>, shows the blocksize
+ used for reads and writes to the tape</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccw</TT
+> devices where
+ <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>3270</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1046"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.3270.model</TT
+> (int)</TD
+><TD
+>example: 3</TD
+><TD
+>Yes</TD
+><TD
+>The model of the device, determining rows and columns
+ </TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.3270.rows</TT
+> (int)</TD
+><TD
+>example: 32</TD
+><TD
+>Yes</TD
+><TD
+>The number of rows</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccw.3270.columns</TT
+> (int)</TD
+><TD
+>example: 80</TD
+><TD
+>Yes</TD
+><TD
+>The number of columns</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="sect2"
+><HR><H3
+CLASS="sect2"
+><A
+NAME="device-properties-ccwgroup"
+><TT
+CLASS="literal"
+>ccwgroup</TT
+> namespace</A
+></H3
+><P
+>&#13;
+ Device objects that represent groups of <TT
+CLASS="literal"
+>ccw</TT
+> devices
+ (when <TT
+CLASS="literal"
+>info.bus</TT
+> is set to <TT
+CLASS="literal"
+>ccwgroup</TT
+>
+ have the properties specified below.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1080"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.online</TT
+> (int)</TD
+><TD
+>example: 1</TD
+><TD
+>Yes</TD
+><TD
+>Online status</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.bus_id</TT
+> (string)</TD
+><TD
+>example: 0.0.f588</TD
+><TD
+>Yes</TD
+><TD
+>The device's bus id in sysfs</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccwgroup</TT
+> devices
+ where <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>qeth</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1105"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.large_send</TT
+> (string)
+ </TD
+><TD
+>example: TSO</TD
+><TD
+>No</TD
+><TD
+>Whether large send is provided. Can be "no", "EDDP"
+ (software) or "TSO" (hardware).</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.card_type</TT
+> (string)</TD
+><TD
+>example: OSD_1000</TD
+><TD
+>Yes</TD
+><TD
+>Type of the card</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.checksumming</TT
+> (string)
+ </TD
+><TD
+>example: sw checksumming</TD
+><TD
+>No</TD
+><TD
+>The method used to checksum incoming packets</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.canonical_macaddr</TT
+> (int)
+ </TD
+><TD
+>example: 0</TD
+><TD
+>No</TD
+><TD
+>Specifies the token ring macaddress format. Not valid in
+ layer2 mode and for ethernet devices.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.broadcast_mode</TT
+> (string)
+ </TD
+><TD
+>example: broadcast_allrings</TD
+><TD
+>No</TD
+><TD
+>The scope of token ring broadcasts. Not valid in layer2
+ mode and for ethernet devices.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.fake_broadcast</TT
+> (int)
+ </TD
+><TD
+>example: 0</TD
+><TD
+>No</TD
+><TD
+>Whether to fake broadcast capability. Not valid in layer2
+ mode.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.fake_ll</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>No</TD
+><TD
+>Whether to add a faked link level header to packets.
+ Not valid in layer2 mode.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.layer2</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>No</TD
+><TD
+>Whether the card operates in layer 2 mode</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.portname</TT
+> (string)</TD
+><TD
+>example: OSAPORT</TD
+><TD
+>No</TD
+><TD
+>The port name which has been specified for the card</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.portno</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>No</TD
+><TD
+>The relative port number on the card</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.buffer_count</TT
+> (int)</TD
+><TD
+>example: 16</TD
+><TD
+>Yes</TD
+><TD
+>Number of inbound buffers used</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.add_hhlen</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>No</TD
+><TD
+>How much additional space is provided in the hardware
+ header in skbs in front of packets</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.priority_queueing</TT
+>
+ (string)</TD
+><TD
+>example: always queue 2</TD
+><TD
+>No</TD
+><TD
+>Which priority queueing algorithm is to be used</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.route4</TT
+> (string)</TD
+><TD
+>example: no</TD
+><TD
+>No</TD
+><TD
+>Whether the card has a routing functionality for ipv4.
+ Not valid in layer2 mode.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.route6</TT
+> (string)</TD
+><TD
+>example: no</TD
+><TD
+>No</TD
+><TD
+>Whether the card has a routing functionality for ipv6.
+ Not valid in layer2 mode.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.qeth.state</TT
+> (string)</TD
+><TD
+>example: UP (LAN ONLINE)</TD
+><TD
+>Yes</TD
+><TD
+>The device's current state</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccwgroup</TT
+> devices
+ where <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>ctc</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1214"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.ctc.protocol</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>The protocol/method used by the connection</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.ctc.type</TT
+> (string)</TD
+><TD
+>example: CTC/A</TD
+><TD
+>Yes</TD
+><TD
+>The device/connection type</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.ctc.buffer</TT
+> (int) </TD
+><TD
+>example: 32768</TD
+><TD
+>No</TD
+><TD
+>The maximum buffer size of the connection</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccwgroup</TT
+> devices
+ where <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>lcs</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1245"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.lcs.portnumber</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>The port on the card that is used</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.lcs.type</TT
+> (string)</TD
+><TD
+>example: OSA LCS card</TD
+><TD
+>Yes</TD
+><TD
+>The type of the card</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.lcs.lancmd_timeout</TT
+> (int)
+ </TD
+><TD
+>example: 5</TD
+><TD
+>Yes</TD
+><TD
+>The timeout value for LAN commands in seconds</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>ccwgroup</TT
+> devices
+ where <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>claw</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1276"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.claw.api_type</TT
+> (string)</TD
+><TD
+>&nbsp;</TD
+><TD
+>Yes</TD
+><TD
+>Determines the packing algorithm for outgoing pakets
+ (matching the remote peer)
+ </TD
+></TR
+><TR
+><TD
+>&nbsp;</TD
+><TD
+>IP</TD
+><TD
+>&nbsp;</TD
+><TD
+>Using the IP protocol</TD
+></TR
+><TR
+><TD
+>&nbsp;</TD
+><TD
+>PACKED</TD
+><TD
+>&nbsp;</TD
+><TD
+>Using an enhanced packing algorithm</TD
+></TR
+><TR
+><TD
+>&nbsp;</TD
+><TD
+>TCPIP</TD
+><TD
+>&nbsp;</TD
+><TD
+>Using the TCP/IP protocol</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.claw.adapter_name</TT
+> (string)
+ </TD
+><TD
+>example: RS1</TD
+><TD
+>Yes</TD
+><TD
+>The host name of the remote communication peer.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.claw.host_name</TT
+> (string)</TD
+><TD
+>example: LNX1</TD
+><TD
+>Yes</TD
+><TD
+>The host name of the local adapter.</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.claw.read_buffer</TT
+> (int)</TD
+><TD
+>example: 4</TD
+><TD
+>Yes</TD
+><TD
+>The number of read buffers allocated</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>ccwgroup.claw.write_buffer</TT
+> (int)</TD
+><TD
+>example: 5</TD
+><TD
+>Yes</TD
+><TD
+>The number of write buffers allocated</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="sect2"
+><HR><H3
+CLASS="sect2"
+><A
+NAME="device-properties-iucv"
+><TT
+CLASS="literal"
+>iucv</TT
+> namespace</A
+></H3
+><P
+>&#13;
+ Device objects with <TT
+CLASS="literal"
+>info.bus</TT
+> set to <TT
+CLASS="literal"
+>iucv
+ </TT
+> are using the "Intra-User Comminication Vehicle" and are
+ described by the following properties.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1336"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>iucv.bus_id</TT
+> (string)</TD
+><TD
+>example: netiucv0</TD
+><TD
+>Yes</TD
+><TD
+>The device's bus id in sysfs</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+>&#13;
+ The following properties describe <TT
+CLASS="literal"
+>iucv</TT
+> devices
+ where <TT
+CLASS="literal"
+>linux.driver</TT
+> is <TT
+CLASS="literal"
+>netiucv</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1355"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>iucv.netiucv.user</TT
+> (string) </TD
+><TD
+>example: linux12</TD
+><TD
+>Yes</TD
+><TD
+>The guest name of the connection's target</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>iucv.netiucv.buffer</TT
+> (int) </TD
+><TD
+>example: 32768</TD
+><TD
+>Yes</TD
+><TD
+>The maximum buffer size of the connection</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><DIV
+CLASS="sect2"
+><HR><H3
+CLASS="sect2"
+><A
NAME="device-properties-block"
><TT
CLASS="literal"
@@ -3314,7 +4702,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN877"
+NAME="AEN1383"
></A
><TABLE
BORDER="1"
@@ -3511,7 +4899,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN937"
+NAME="AEN1443"
></A
><TABLE
BORDER="1"
@@ -3804,7 +5192,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1060"
+NAME="AEN1566"
></A
><TABLE
BORDER="1"
@@ -3942,7 +5330,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1103"
+NAME="AEN1609"
></A
><TABLE
BORDER="1"
@@ -4053,7 +5441,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1139"
+NAME="AEN1645"
></A
><TABLE
BORDER="1"
@@ -4315,7 +5703,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1246"
+NAME="AEN1752"
></A
><TABLE
BORDER="1"
@@ -4803,7 +6191,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1440"
+NAME="AEN1946"
></A
><TABLE
BORDER="1"
@@ -5002,7 +6390,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1520"
+NAME="AEN2026"
></A
><TABLE
BORDER="1"
@@ -5156,7 +6544,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1578"
+NAME="AEN2084"
></A
><TABLE
BORDER="1"
@@ -5287,7 +6675,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1620"
+NAME="AEN2126"
></A
><TABLE
BORDER="1"
@@ -5360,7 +6748,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1642"
+NAME="AEN2148"
></A
><TABLE
BORDER="1"
@@ -5427,7 +6815,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1662"
+NAME="AEN2168"
></A
><TABLE
BORDER="1"
@@ -5492,7 +6880,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1682"
+NAME="AEN2188"
></A
><TABLE
BORDER="1"
@@ -5619,7 +7007,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1726"
+NAME="AEN2232"
></A
><TABLE
BORDER="1"
@@ -5756,7 +7144,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1774"
+NAME="AEN2280"
></A
><TABLE
BORDER="1"
@@ -5969,7 +7357,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1851"
+NAME="AEN2357"
></A
><TABLE
BORDER="1"
@@ -6090,7 +7478,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1893"
+NAME="AEN2399"
></A
><TABLE
BORDER="1"
@@ -6158,7 +7546,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN1913"
+NAME="AEN2419"
></A
><TABLE
BORDER="1"
@@ -6605,7 +7993,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2080"
+NAME="AEN2586"
></A
><TABLE
BORDER="1"
@@ -6719,7 +8107,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2124"
+NAME="AEN2630"
></A
><TABLE
BORDER="1"
@@ -6787,7 +8175,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2145"
+NAME="AEN2651"
></A
><TABLE
BORDER="1"
@@ -6881,7 +8269,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2177"
+NAME="AEN2683"
></A
><TABLE
BORDER="1"
@@ -6992,7 +8380,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2219"
+NAME="AEN2725"
></A
><TABLE
BORDER="1"
@@ -7105,6 +8493,84 @@ CLASS="literal"
></P
></DIV
></DIV
+><DIV
+CLASS="sect2"
+><HR><H3
+CLASS="sect2"
+><A
+NAME="device-properties-tape"
+><TT
+CLASS="literal"
+>tape</TT
+> namespace</A
+></H3
+><P
+>&#13;
+ Device objects with the capability <TT
+CLASS="literal"
+>tape</TT
+>
+ represent tape devices.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN2781"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>tape.major</TT
+> (int)</TD
+><TD
+>example: 254</TD
+><TD
+>Yes</TD
+><TD
+>The device's major number</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>tape.minor</TT
+> (int)</TD
+><TD
+>example: 0</TD
+><TD
+>Yes</TD
+><TD
+>The device's minor number</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
></DIV
><DIV
CLASS="sect1"
@@ -7144,7 +8610,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2277"
+NAME="AEN2809"
></A
><TABLE
BORDER="1"
@@ -7303,7 +8769,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2329"
+NAME="AEN2861"
></A
><TABLE
BORDER="1"
@@ -7432,7 +8898,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2370"
+NAME="AEN2902"
></A
><TABLE
BORDER="1"
@@ -8500,7 +9966,7 @@ CLASS="informaltable"
><P
></P
><A
-NAME="AEN2564"
+NAME="AEN3096"
></A
><TABLE
BORDER="1"
@@ -8660,7 +10126,7 @@ CLASS="sect1"
><HR><H2
CLASS="sect1"
><A
-NAME="AEN2606"
+NAME="AEN3138"
>Interface org.freedesktop.Hal.Manager</A
></H2
><P
@@ -8776,7 +10242,7 @@ CLASS="sect2"
><HR><H3
CLASS="sect2"
><A
-NAME="AEN2617"
+NAME="AEN3149"
>Example</A
></H3
><P
@@ -8894,7 +10360,7 @@ CLASS="sect1"
><HR><H2
CLASS="sect1"
><A
-NAME="AEN2625"
+NAME="AEN3157"
>Interface org.freedesktop.Hal.Device</A
></H2
><P
diff --git a/doc/spec/hal-spec.xml.in b/doc/spec/hal-spec.xml.in
index 294b7a7e..bc990ee4 100644
--- a/doc/spec/hal-spec.xml.in
+++ b/doc/spec/hal-spec.xml.in
@@ -1496,7 +1496,664 @@
</informaltable>
</sect2>
+ <sect2 id="device-properties-ccw">
+ <title><literal>ccw</literal> namespace</title>
+ <para>
+
+ Device objects that represent s390 ccw devices (when <literal>info.bus
+ </literal> is set to <literal>ccw</literal>) are represented by the
+ properties below.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>ccw.devtype</literal> (string)</entry>
+ <entry>example: 1732/01</entry>
+ <entry>Yes</entry>
+ <entry>Device type/model or n/a</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.cutype</literal> (string)</entry>
+ <entry>example: 1731/01</entry>
+ <entry>Yes</entry>
+ <entry>Control unit type/model</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.cmb_enable</literal> (int)</entry>
+ <entry>example: 1</entry>
+ <entry>Yes</entry>
+ <entry>If channel measurements are enabled</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.availability</literal> (string)</entry>
+ <entry>example: good</entry>
+ <entry>Yes</entry>
+ <entry>Can be one of 'good', 'boxed', 'no path',
+ or 'no device'</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.online</literal> (int)</entry>
+ <entry>example: 1</entry>
+ <entry>Yes</entry>
+ <entry>Online status</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.bus_id</literal> (string)</entry>
+ <entry>example: 0.0.f588</entry>
+ <entry>Yes</entry>
+ <entry>The device's bus id in sysfs</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.subchannel.pim</literal> (int)</entry>
+ <entry>example: 0x80</entry>
+ <entry>No</entry>
+ <entry>path installed mask</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.subchannel.pam</literal> (int)</entry>
+ <entry>example: 0x80</entry>
+ <entry>No</entry>
+ <entry>path available mask</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.subchannel.pom</literal> (int)</entry>
+ <entry>example: 0xff</entry>
+ <entry>No</entry>
+ <entry>path operational mask</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.subchannel.chpid0..7</literal> (int)</entry>
+ <entry>example: 0x40</entry>
+ <entry>No</entry>
+ <entry>channel path ids</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+
+ The following properties describe <literal>ccw</literal> devices where
+ <literal>linux.driver</literal> is either <literal>dasd-eckd</literal>
+ or <literal>dasd-fba</literal>.
+
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>ccw.dasd.use_diag</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>If the device driver shall use diagnose calls to access
+ the device</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.dasd.readonly</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>If the device can only be accessed readonly</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.dasd.discipline</literal> (string)</entry>
+ <entry>example: ECKD</entry>
+ <entry>No</entry>
+ <entry>The dasd discipline used to access the device</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+
+ The following properties describe <literal>ccw</literal> devices where
+ <literal>linux.driver</literal> is <literal>zfcp</literal>. They are
+ only present when <literal>ccw.online = 1</literal>.
+
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>ccw.zfcp.in_recovery</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>Shows whether the adapter is currently in recovery</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.zfcp.failed</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>Shows whether the adapter is in failed state</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+
+ The following properties describe <literal>ccw</literal> devices where
+ <literal>linux.driver</literal> is of the form <literal>tape_3xxx
+ </literal>.
+
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>ccw.tape.state</literal> (string)</entry>
+ <entry>example: IN_USE</entry>
+ <entry>Yes</entry>
+ <entry>The current status of the tape</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.tape.operation</literal> (string)</entry>
+ <entry>example: REW</entry>
+ <entry>Yes</entry>
+ <entry>A three-letter mnemonic of the current tape operation
+ </entry>
+ </row>
+ <row>
+ <entry><literal>ccw.tape.mediumstate</literal> (string)</entry>
+ <entry>example: no medium</entry>
+ <entry>No</entry>
+ <entry>If <literal>ccw.online = 1</literal>, shows whether a tape
+ is loaded</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.tape.blocksize</literal> (int)</entry>
+ <entry>example: 512</entry>
+ <entry>No</entry>
+ <entry>If <literal>ccw.online = 1</literal>, shows the blocksize
+ used for reads and writes to the tape</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+
+ The following properties describe <literal>ccw</literal> devices where
+ <literal>linux.driver</literal> is <literal>3270</literal>.
+
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>ccw.3270.model</literal> (int)</entry>
+ <entry>example: 3</entry>
+ <entry>Yes</entry>
+ <entry>The model of the device, determining rows and columns
+ </entry>
+ </row>
+ <row>
+ <entry><literal>ccw.3270.rows</literal> (int)</entry>
+ <entry>example: 32</entry>
+ <entry>Yes</entry>
+ <entry>The number of rows</entry>
+ </row>
+ <row>
+ <entry><literal>ccw.3270.columns</literal> (int)</entry>
+ <entry>example: 80</entry>
+ <entry>Yes</entry>
+ <entry>The number of columns</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
+
+ <sect2 id="device-properties-ccwgroup">
+ <title><literal>ccwgroup</literal> namespace</title>
+
+ <para>
+
+ Device objects that represent groups of <literal>ccw</literal> devices
+ (when <literal>info.bus</literal> is set to <literal>ccwgroup</literal>
+ have the properties specified below.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>ccwgroup.online</literal> (int)</entry>
+ <entry>example: 1</entry>
+ <entry>Yes</entry>
+ <entry>Online status</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.bus_id</literal> (string)</entry>
+ <entry>example: 0.0.f588</entry>
+ <entry>Yes</entry>
+ <entry>The device's bus id in sysfs</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+
+ The following properties describe <literal>ccwgroup</literal> devices
+ where <literal>linux.driver</literal> is <literal>qeth</literal>.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>ccwgroup.qeth.large_send</literal> (string)
+ </entry>
+ <entry>example: TSO</entry>
+ <entry>No</entry>
+ <entry>Whether large send is provided. Can be "no", "EDDP"
+ (software) or "TSO" (hardware).</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.card_type</literal> (string)</entry>
+ <entry>example: OSD_1000</entry>
+ <entry>Yes</entry>
+ <entry>Type of the card</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.checksumming</literal> (string)
+ </entry>
+ <entry>example: sw checksumming</entry>
+ <entry>No</entry>
+ <entry>The method used to checksum incoming packets</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.canonical_macaddr</literal> (int)
+ </entry>
+ <entry>example: 0</entry>
+ <entry>No</entry>
+ <entry>Specifies the token ring macaddress format. Not valid in
+ layer2 mode and for ethernet devices.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.broadcast_mode</literal> (string)
+ </entry>
+ <entry>example: broadcast_allrings</entry>
+ <entry>No</entry>
+ <entry>The scope of token ring broadcasts. Not valid in layer2
+ mode and for ethernet devices.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.fake_broadcast</literal> (int)
+ </entry>
+ <entry>example: 0</entry>
+ <entry>No</entry>
+ <entry>Whether to fake broadcast capability. Not valid in layer2
+ mode.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.fake_ll</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>No</entry>
+ <entry>Whether to add a faked link level header to packets.
+ Not valid in layer2 mode.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.layer2</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>No</entry>
+ <entry>Whether the card operates in layer 2 mode</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.portname</literal> (string)</entry>
+ <entry>example: OSAPORT</entry>
+ <entry>No</entry>
+ <entry>The port name which has been specified for the card</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.portno</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>No</entry>
+ <entry>The relative port number on the card</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.buffer_count</literal> (int)</entry>
+ <entry>example: 16</entry>
+ <entry>Yes</entry>
+ <entry>Number of inbound buffers used</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.add_hhlen</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>No</entry>
+ <entry>How much additional space is provided in the hardware
+ header in skbs in front of packets</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.priority_queueing</literal>
+ (string)</entry>
+ <entry>example: always queue 2</entry>
+ <entry>No</entry>
+ <entry>Which priority queueing algorithm is to be used</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.route4</literal> (string)</entry>
+ <entry>example: no</entry>
+ <entry>No</entry>
+ <entry>Whether the card has a routing functionality for ipv4.
+ Not valid in layer2 mode.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.route6</literal> (string)</entry>
+ <entry>example: no</entry>
+ <entry>No</entry>
+ <entry>Whether the card has a routing functionality for ipv6.
+ Not valid in layer2 mode.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.qeth.state</literal> (string)</entry>
+ <entry>example: UP (LAN ONLINE)</entry>
+ <entry>Yes</entry>
+ <entry>The device's current state</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+
+ The following properties describe <literal>ccwgroup</literal> devices
+ where <literal>linux.driver</literal> is <literal>ctc</literal>.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>ccwgroup.ctc.protocol</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>The protocol/method used by the connection</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.ctc.type</literal> (string)</entry>
+ <entry>example: CTC/A</entry>
+ <entry>Yes</entry>
+ <entry>The device/connection type</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.ctc.buffer</literal> (int) </entry>
+ <entry>example: 32768</entry>
+ <entry>No</entry>
+ <entry>The maximum buffer size of the connection</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+
+ The following properties describe <literal>ccwgroup</literal> devices
+ where <literal>linux.driver</literal> is <literal>lcs</literal>.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>ccwgroup.lcs.portnumber</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>The port on the card that is used</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.lcs.type</literal> (string)</entry>
+ <entry>example: OSA LCS card</entry>
+ <entry>Yes</entry>
+ <entry>The type of the card</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.lcs.lancmd_timeout</literal> (int)
+ </entry>
+ <entry>example: 5</entry>
+ <entry>Yes</entry>
+ <entry>The timeout value for LAN commands in seconds</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+
+ The following properties describe <literal>ccwgroup</literal> devices
+ where <literal>linux.driver</literal> is <literal>claw</literal>.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>ccwgroup.claw.api_type</literal> (string)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>Determines the packing algorithm for outgoing pakets
+ (matching the remote peer)
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>IP</entry>
+ <entry></entry>
+ <entry>Using the IP protocol</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>PACKED</entry>
+ <entry></entry>
+ <entry>Using an enhanced packing algorithm</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>TCPIP</entry>
+ <entry></entry>
+ <entry>Using the TCP/IP protocol</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.claw.adapter_name</literal> (string)
+ </entry>
+ <entry>example: RS1</entry>
+ <entry>Yes</entry>
+ <entry>The host name of the remote communication peer.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.claw.host_name</literal> (string)</entry>
+ <entry>example: LNX1</entry>
+ <entry>Yes</entry>
+ <entry>The host name of the local adapter.</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.claw.read_buffer</literal> (int)</entry>
+ <entry>example: 4</entry>
+ <entry>Yes</entry>
+ <entry>The number of read buffers allocated</entry>
+ </row>
+ <row>
+ <entry><literal>ccwgroup.claw.write_buffer</literal> (int)</entry>
+ <entry>example: 5</entry>
+ <entry>Yes</entry>
+ <entry>The number of write buffers allocated</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
+
+ <sect2 id="device-properties-iucv">
+ <title><literal>iucv</literal> namespace</title>
+
+ <para>
+
+ Device objects with <literal>info.bus</literal> set to <literal>iucv
+ </literal> are using the "Intra-User Comminication Vehicle" and are
+ described by the following properties.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>iucv.bus_id</literal> (string)</entry>
+ <entry>example: netiucv0</entry>
+ <entry>Yes</entry>
+ <entry>The device's bus id in sysfs</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+
+ The following properties describe <literal>iucv</literal> devices
+ where <literal>linux.driver</literal> is <literal>netiucv</literal>.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>iucv.netiucv.user</literal> (string) </entry>
+ <entry>example: linux12</entry>
+ <entry>Yes</entry>
+ <entry>The guest name of the connection's target</entry>
+ </row>
+ <row>
+ <entry><literal>iucv.netiucv.buffer</literal> (int) </entry>
+ <entry>example: 32768</entry>
+ <entry>Yes</entry>
+ <entry>The maximum buffer size of the connection</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
<sect2 id="device-properties-block">
<title><literal>block</literal> namespace</title>
@@ -3551,6 +4208,42 @@
</tgroup>
</informaltable>
</sect2>
+
+ <sect2 id="device-properties-tape">
+ <title><literal>tape</literal> namespace</title>
+ <para>
+
+ Device objects with the capability <literal>tape</literal>
+ represent tape devices.
+
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>tape.major</literal> (int)</entry>
+ <entry>example: 254</entry>
+ <entry>Yes</entry>
+ <entry>The device's major number</entry>
+ </row>
+ <row>
+ <entry><literal>tape.minor</literal> (int)</entry>
+ <entry>example: 0</entry>
+ <entry>Yes</entry>
+ <entry>The device's minor number</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
</sect1>
<sect1 id="properties-policy">
diff --git a/hald/linux2/blockdev.c b/hald/linux2/blockdev.c
index 4d974f08..e5bf3fc6 100644
--- a/hald/linux2/blockdev.c
+++ b/hald/linux2/blockdev.c
@@ -107,7 +107,7 @@ blockdev_compute_udi (HalDevice *d)
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
"/org/freedesktop/Hal/devices/storage_serial_%s",
serial);
- } else if (model != NULL) {
+ } else if ((model != NULL) && (strlen(model) != 0) ) {
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
"/org/freedesktop/Hal/devices/storage_model_%s",
model);
@@ -726,7 +726,14 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
physdev_udi = udi_it;
hal_device_property_set_string (d, "storage.bus", "mmc");
break;
+ } else if (strcmp (bus, "ccw") == 0) {
+ physdev = d_it;
+ physdev_udi = udi_it;
+ is_hotpluggable = TRUE;
+ hal_device_property_set_string
+ (d, "storage.bus", "ccw");
}
+
}
/* Go to parent */
diff --git a/hald/linux2/classdev.c b/hald/linux2/classdev.c
index 5f243f40..4053d010 100644
--- a/hald/linux2/classdev.c
+++ b/hald/linux2/classdev.c
@@ -193,8 +193,10 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *physdev,
ifname = hal_util_get_last_element (sysfs_path);
hal_device_property_set_string (d, "net.interface", ifname);
- if (!hal_util_set_string_from_file (d, "net.address", sysfs_path, "address"))
- goto error;
+ if (!hal_util_set_string_from_file (d, "net.address", sysfs_path, "address")) {
+ hal_device_property_set_string (d, "net.address", "00:00:00:00:00:00");
+ }
+
if (!hal_util_set_int_from_file (d, "net.linux.ifindex", sysfs_path, "ifindex", 10))
goto error;
@@ -294,10 +296,16 @@ static gboolean
net_compute_udi (HalDevice *d)
{
gchar udi[256];
+ const gchar *id;
+ id = hal_device_property_get_string (d, "net.address");
+ if (id == NULL || (strcmp (id, "00:00:00:00:00:00") == 0)) {
+ /* Need to fall back to something else if mac not available. */
+ id = hal_util_get_last_element(hal_device_property_get_string(d, "net.physical_device"));
+ }
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
"/org/freedesktop/Hal/devices/net_%s",
- hal_device_property_get_string (d, "net.address"));
+ id);
hal_device_set_udi (d, udi);
hal_device_property_set_string (d, "info.udi", udi);
return TRUE;
@@ -630,6 +638,56 @@ serial_compute_udi (HalDevice *d)
/*--------------------------------------------------------------------------------------------------------------*/
+static HalDevice *
+tape_add (const gchar *sysfs_path, const gchar *device_file,
+ HalDevice *physdev, const gchar *sysfs_path_in_devices)
+{
+ HalDevice *d;
+ const gchar *dev_entry;
+
+ if (physdev == NULL)
+ return NULL;
+
+ d = hal_device_new ();
+ hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
+ hal_device_property_set_string (d, "info.parent", physdev->udi);
+ hal_device_property_set_string (d, "info.category", "tape");
+ hal_device_add_capability (d, "tape");
+ hal_device_add_capability (physdev, "tape");
+
+ dev_entry = hal_util_get_string_from_file (sysfs_path, "dev");
+ if (dev_entry != NULL) {
+ unsigned int major, minor;
+
+ if (sscanf (dev_entry, "%d:%d", &major, &minor) != 2) {
+ hal_device_property_set_int (d, "tape.major", major);
+ hal_device_property_set_int (d, "tape.minor", minor);
+ }
+ }
+ return d;
+}
+
+static gboolean
+tape_compute_udi (HalDevice *d)
+{
+ gchar udi[256];
+ const gchar *sysfs_name;
+
+ sysfs_name = hal_util_get_last_element (hal_device_property_get_string
+ (d, "linux.sysfs_path"));
+ if (!sysfs_name)
+ return FALSE;
+ hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+ "/org/freedesktop/Hal/devices/tape_%s",
+ sysfs_name);
+ hal_device_set_udi (d, udi);
+ hal_device_property_set_string (d, "info.udi", udi);
+
+ return TRUE;
+}
+
+/*--------------------------------------------------------------------------------------------------------------*/
+
static gboolean
classdev_remove (HalDevice *d)
{
@@ -723,6 +781,26 @@ static ClassDevHandler classdev_handler_serial =
.remove = classdev_remove
};
+static ClassDevHandler classdev_handler_tape =
+{
+ .subsystem = "tape",
+ .add = tape_add,
+ .get_prober = NULL,
+ .post_probing = NULL,
+ .compute_udi = tape_compute_udi,
+ .remove = classdev_remove
+};
+
+static ClassDevHandler classdev_handler_tape390 =
+{
+ .subsystem = "tape390",
+ .add = tape_add,
+ .get_prober = NULL,
+ .post_probing = NULL,
+ .compute_udi = tape_compute_udi,
+ .remove = classdev_remove
+};
+
static ClassDevHandler *classdev_handlers[] = {
&classdev_handler_input,
&classdev_handler_bluetooth,
@@ -731,6 +809,8 @@ static ClassDevHandler *classdev_handlers[] = {
&classdev_handler_usbclass,
&classdev_handler_sound,
&classdev_handler_serial,
+ &classdev_handler_tape,
+ &classdev_handler_tape390,
NULL
};
diff --git a/hald/linux2/osspec.c b/hald/linux2/osspec.c
index 3935acb8..68c31f99 100644
--- a/hald/linux2/osspec.c
+++ b/hald/linux2/osspec.c
@@ -569,23 +569,33 @@ osspec_device_reprobe (HalDevice *d)
}
gboolean
-hal_util_set_driver (HalDevice *d, const char *property_name, const char *sysfs_path)
+hal_util_get_driver_name (const char *sysfs_path, gchar *driver_name)
{
- gboolean ret;
gchar driver_path[HAL_PATH_MAX];
struct stat statbuf;
- ret = FALSE;
-
g_snprintf (driver_path, sizeof (driver_path), "%s/driver", sysfs_path);
if (stat (driver_path, &statbuf) == 0) {
gchar buf[256];
memset (buf, '\0', sizeof (buf));
if (readlink (driver_path, buf, sizeof (buf) - 1) > 0) {
- hal_device_property_set_string (d, property_name, hal_util_get_last_element (buf));
- ret = TRUE;
+ g_snprintf (driver_name, strlen(buf), "%s", hal_util_get_last_element(buf));
+ return TRUE;
}
}
+ return FALSE;
+}
+
+gboolean
+hal_util_set_driver (HalDevice *d, const char *property_name, const char *sysfs_path)
+{
+ gboolean ret;
+ gchar driver_name[256];
+
+ memset (driver_name, '\0', sizeof (driver_name));
+ ret = hal_util_get_driver_name (sysfs_path, driver_name);
+ if (ret == TRUE)
+ hal_device_property_set_string (d, property_name, driver_name);
return ret;
}
diff --git a/hald/linux2/osspec_linux.h b/hald/linux2/osspec_linux.h
index e5ee9d64..ed7cbdfa 100644
--- a/hald/linux2/osspec_linux.h
+++ b/hald/linux2/osspec_linux.h
@@ -33,6 +33,8 @@ const gchar *get_hal_sysfs_path (void);
const gchar *get_hal_proc_path (void);
+gboolean hal_util_get_driver_name (const char *sysfs_path, gchar *driver_name);
+
gboolean hal_util_set_driver (HalDevice *d, const char *property_name, const char *sysfs_path);
HalDevice *hal_util_find_closest_ancestor (const gchar *sysfs_path);
diff --git a/hald/linux2/physdev.c b/hald/linux2/physdev.c
index 871ba4ff..96eb7387 100644
--- a/hald/linux2/physdev.c
+++ b/hald/linux2/physdev.c
@@ -841,6 +841,365 @@ ieee1394_compute_udi (HalDevice *d)
/*--------------------------------------------------------------------------------------------------------------*/
+static inline void
+ccw_add_dasd_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ const gchar *disc;
+
+ hal_util_set_int_from_file (d, "ccw.dasd.use_diag", sysfs_path,
+ "use_diag", 2);
+ hal_util_set_int_from_file (d, "ccw.dasd.readonly", sysfs_path,
+ "readonly", 2);
+ disc = hal_util_get_string_from_file (sysfs_path, "discipline");
+ if (disc)
+ hal_device_property_set_string(d, "ccw.dasd.discipline", disc);
+}
+
+static inline void
+ccw_add_zfcp_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ int online;
+
+ /* zfcp adapter properties are only valid for online devices. */
+ if (!hal_util_get_int_from_file (sysfs_path, "online", &online, 2))
+ return;
+ if (!online)
+ return;
+
+ hal_util_set_int_from_file (d, "ccw.zfcp.in_recovery", sysfs_path,
+ "in_recovery", 2);
+ hal_util_set_int_from_file (d, "ccw.zfcp.failed", sysfs_path,
+ "failed", 2);
+}
+
+static inline void
+ccw_add_tape_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ int medium_state, online;
+
+ const gchar *state_text[3] = {"unknown", "loaded", "no medium"};
+
+ hal_util_set_string_from_file (d, "ccw.tape.state", sysfs_path, "state");
+ hal_util_set_string_from_file (d, "ccw.tape.operation", sysfs_path,
+ "operation");
+ /* The following properties are only valid for online devices. */
+ if (!hal_util_get_int_from_file (sysfs_path, "online", &online, 2))
+ return;
+ if (!online)
+ return;
+ hal_util_set_int_from_file (d, "ccw.tape.blocksize", sysfs_path,
+ "blocksize", 10);
+ if (!hal_util_get_int_from_file (sysfs_path, "medium_state",
+ &medium_state, 10))
+ return;
+ hal_device_property_set_string (d, "tape.ccw.medium_state",
+ state_text[medium_state]);
+}
+
+static inline void
+ccw_add_3270_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ hal_util_set_int_from_file (d, "ccw.3270.model", sysfs_path,
+ "model", 10);
+ hal_util_set_int_from_file (d, "ccw.3270.rows", sysfs_path, "rows", 10);
+ hal_util_set_int_from_file (d, "ccw.3270.columns", sysfs_path,
+ "columns", 10);
+}
+
+static HalDevice *
+ccw_add (const gchar *sysfs_path, HalDevice *parent)
+{
+ HalDevice *d;
+ const gchar *bus_id;
+ const gchar *pimpampom;
+ int pim, pam, pom;
+ const gchar *chpids;
+ int chpid[8];
+ gchar attr[25];
+ int i;
+ gchar driver_name[256];
+
+ bus_id = hal_util_get_last_element (sysfs_path);
+
+ d = hal_device_new ();
+ hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
+ hal_device_property_set_string (d, "linux.sysfs_path_device",
+ sysfs_path);
+ hal_device_property_set_string (d, "info.bus", "ccw");
+ if (parent != NULL)
+ hal_device_property_set_string (d, "info.parent", parent->udi);
+ else
+ hal_device_property_set_string
+ (d, "info.parent",
+ "/org/freedesktop/Hal/devices/computer");
+
+ hal_util_set_driver (d, "info.linux.driver", sysfs_path);
+
+ hal_device_property_set_string (d, "ccw.bus_id", bus_id);
+ hal_util_set_int_from_file (d, "ccw.online", sysfs_path, "online", 2);
+ hal_util_set_string_from_file (d, "ccw.availablity", sysfs_path,
+ "availability");
+ hal_util_set_int_from_file (d, "ccw.cmb_enable", sysfs_path,
+ "cmb_enable", 2);
+ hal_util_set_string_from_file (d, "ccw.cutype", sysfs_path, "cutype");
+ hal_util_set_string_from_file (d, "ccw.devtype", sysfs_path, "devtype");
+
+ /* Get some values from the higher level subchannel structure.*/
+ pimpampom = hal_util_get_string_from_file (sysfs_path, "../pimpampom");
+ if (pimpampom) {
+ sscanf (pimpampom, "%x %x %x", &pim, &pam, &pom);
+ hal_device_property_set_int (d, "ccw.subchannel.pim", pim);
+ hal_device_property_set_int (d, "ccw.subchannel.pam", pam);
+ hal_device_property_set_int (d, "ccw.subchannel.pom", pom);
+ }
+
+ chpids = hal_util_get_string_from_file (sysfs_path, "../chpids");
+ if (chpids) {
+ sscanf (chpids, "%x %x %x %x %x %x %x %x", &chpid[0], &chpid[1],
+ &chpid[2], &chpid[3], &chpid[4], &chpid[5], &chpid[6],
+ &chpid[7]);
+ for (i=0; i<8 && (chpid[i] != 0); i++) {
+ g_snprintf (attr, sizeof (attr),
+ "ccw.subchannel.chpid%x", i);
+ hal_device_property_set_int (d, attr, chpid[i]);
+ }
+ }
+
+ /* Add some special properties. */
+ if (hal_util_get_driver_name (sysfs_path, driver_name)) {
+ if (!strncmp (driver_name, "dasd", 4))
+ /* Same attributes for dasd_eckd and dasd_fba. */
+ ccw_add_dasd_properties (d, sysfs_path);
+ if (!strncmp (driver_name, "zfcp", 4))
+ ccw_add_zfcp_properties (d, sysfs_path);
+ if (!strncmp (driver_name, "tape_3", 6))
+ /* For all channel attached tapes. */
+ ccw_add_tape_properties (d, sysfs_path);
+ if (!strncmp (driver_name, "3270", 4))
+ ccw_add_3270_properties (d, sysfs_path);
+ }
+ return d;
+}
+
+static gboolean
+ccw_compute_udi (HalDevice *d)
+{
+ gchar udi[256];
+
+ hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+ "/org/freedesktop/Hal/devices/ccw_%s",
+ hal_device_property_get_string
+ (d, "ccw.bus_id"));
+ hal_device_set_udi (d, udi);
+ hal_device_property_set_string (d, "info.udi", udi);
+ return TRUE;
+
+}
+
+/*--------------------------------------------------------------------------------------------------------------*/
+
+static inline void
+ccwgroup_add_qeth_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ int is_layer2;
+
+ /* Some attributes are not applicable for devices in layer2 mode. */
+ hal_util_get_int_from_file (sysfs_path, "layer2", &is_layer2, 2);
+
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.large_send",
+ sysfs_path, "large_send");
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.card_type", sysfs_path,
+ "card_type");
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.checksumming",
+ sysfs_path, "checksumming");
+ if (!is_layer2) {
+ //CH: the next two are only valid for token ring devices
+ hal_util_set_int_from_file (d,
+ "ccwgroup.qeth.canonical_macaddr",
+ sysfs_path, "canonical_macaddr", 2);
+ hal_util_set_string_from_file (d,
+ "ccwgroup.qeth.broadcast_mode",
+ sysfs_path, "broadcast_mode");
+ hal_util_set_int_from_file (d, "ccwgroup.qeth.fake_broadcast",
+ sysfs_path, "fake_broadcast", 2);
+ hal_util_set_int_from_file (d, "ccwgroup.qeth.fake_ll",
+ sysfs_path, "fake_ll", 2);
+ }
+ hal_device_property_set_int (d, "ccwgroup.qeth.layer2", is_layer2);
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.portname", sysfs_path,
+ "portname");
+ hal_util_set_int_from_file (d, "ccwgroup.qeth.portno", sysfs_path,
+ "portno", 10);
+ hal_util_set_int_from_file (d, "ccwgroup.qeth.buffer_count", sysfs_path,
+ "buffer_count", 10);
+ hal_util_set_int_from_file (d, "ccwgroup.qeth.add_hhlen", sysfs_path,
+ "add_hhlen", 10);
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.priority_queueing",
+ sysfs_path, "priority_queueing");
+ if (!is_layer2) {
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.route4",
+ sysfs_path, "route4");
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.route6",
+ sysfs_path, "route6");
+ }
+ hal_util_set_string_from_file (d, "ccwgroup.qeth.state", sysfs_path,
+ "state");
+}
+
+static inline void
+ccwgroup_add_ctc_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ //CH: use protocol descriptions?
+ hal_util_set_int_from_file (d, "ccwgroup.ctc.protocol", sysfs_path,
+ "protocol", 2);
+ hal_util_set_string_from_file (d, "ccwgroup.ctc.type", sysfs_path,
+ "type");
+ hal_util_set_int_from_file (d, "ccwgroup.ctc.buffer", sysfs_path,
+ "buffer", 10);
+}
+
+static inline void
+ccwgroup_add_lcs_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ hal_util_set_int_from_file (d, "ccwgroup.lcs.portnumber", sysfs_path,
+ "portno", 2);
+ hal_util_set_string_from_file (d, "ccwgroup.lcs.type", sysfs_path,
+ "type");
+ hal_util_set_int_from_file (d, "ccwgroup.lcs.lancmd_timeout",
+ sysfs_path, "lancmd_timeout", 10);
+}
+
+static inline void
+ccwgroup_add_claw_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ hal_util_set_string_from_file (d, "ccwgroup.claw.api_type", sysfs_path,
+ "api_type");
+ hal_util_set_string_from_file (d, "ccwgroup.claw.adapter_name",
+ sysfs_path, "adapter_name");
+ hal_util_set_string_from_file (d, "ccwgroup.claw.host_name", sysfs_path,
+ "host_name");
+ hal_util_set_int_from_file (d, "ccwgroup.claw.read_buffer", sysfs_path,
+ "read_buffer", 10);
+ hal_util_set_int_from_file (d, "ccwgroup.claw.write_buffer", sysfs_path,
+ "write_buffer", 10);
+}
+
+static HalDevice *
+ccwgroup_add (const gchar *sysfs_path, HalDevice *parent)
+{
+ HalDevice *d;
+ const gchar *bus_id;
+ gchar driver_name[256];
+
+ bus_id = hal_util_get_last_element (sysfs_path);
+
+ d = hal_device_new ();
+ hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
+ hal_device_property_set_string (d, "linux.sysfs_path_device",
+ sysfs_path);
+ hal_device_property_set_string (d, "info.bus", "ccwgroup");
+ if (parent != NULL)
+ hal_device_property_set_string (d, "info.parent", parent->udi);
+ else
+ hal_device_property_set_string
+ (d, "info.parent",
+ "/org/freedesktop/Hal/devices/computer");
+
+ hal_util_set_driver (d, "info.linux.driver", sysfs_path);
+
+ hal_device_property_set_string (d, "ccwgroup.bus_id", bus_id);
+ hal_util_set_int_from_file (d, "ccwgroup.online", sysfs_path,
+ "online", 2);
+
+ /* Some devices have extra properties. */
+ if (hal_util_get_driver_name (sysfs_path, driver_name)) {
+ if (!strncmp (driver_name, "qeth", 4))
+ ccwgroup_add_qeth_properties (d, sysfs_path);
+ if (!strncmp (driver_name, "ctc", 3))
+ ccwgroup_add_ctc_properties (d, sysfs_path);
+ if (!strncmp (driver_name, "lcs", 3))
+ ccwgroup_add_lcs_properties (d, sysfs_path);
+ if (!strncmp (driver_name, "claw", 4))
+ ccwgroup_add_claw_properties (d, sysfs_path);
+ }
+ return d;
+}
+
+static gboolean
+ccwgroup_compute_udi (HalDevice *d)
+{
+ gchar udi[256];
+
+ hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+ "/org/freedesktop/Hal/devices/ccwgroup_%s",
+ hal_device_property_get_string
+ (d, "ccwgroup.bus_id"));
+ hal_device_set_udi (d, udi);
+ hal_device_property_set_string (d, "info.udi", udi);
+ return TRUE;
+
+}
+
+/*--------------------------------------------------------------------------------------------------------------*/
+
+static inline void
+iucv_add_netiucv_properties (HalDevice *d, const gchar *sysfs_path)
+{
+ hal_util_set_string_from_file (d, "iucv.netiucv.user", sysfs_path,
+ "user");
+ hal_util_set_int_from_file (d, "iucv.netiucv.buffer", sysfs_path,
+ "buffer", 10);
+}
+
+static HalDevice *
+iucv_add (const gchar *sysfs_path, HalDevice *parent)
+{
+ HalDevice *d;
+ const gchar *bus_id;
+ gchar driver_name[256];
+
+ bus_id = hal_util_get_last_element (sysfs_path);
+
+ d = hal_device_new ();
+ hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
+ hal_device_property_set_string (d, "linux.sysfs_path_device",
+ sysfs_path);
+ hal_device_property_set_string (d, "info.bus", "iucv");
+ if (parent != NULL)
+ hal_device_property_set_string (d, "info.parent", parent->udi);
+ else
+ hal_device_property_set_string
+ (d, "info.parent",
+ "/org/freedesktop/Hal/devices/computer");
+
+ hal_util_set_driver (d, "info.linux.driver", sysfs_path);
+
+ hal_device_property_set_string (d, "iucv.bus_id", bus_id);
+
+ if (hal_util_get_driver_name (sysfs_path, driver_name)) {
+ if (!strncmp (driver_name, "netiucv", 7))
+ iucv_add_netiucv_properties (d, sysfs_path);
+ }
+ return d;
+}
+
+static gboolean
+iucv_compute_udi (HalDevice *d)
+{
+ gchar udi[256];
+
+ hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+ "/org/freedesktop/Hal/devices/iucv_%s",
+ hal_device_property_get_string
+ (d, "iucv.bus_id"));
+ hal_device_set_udi (d, udi);
+ hal_device_property_set_string (d, "info.udi", udi);
+ return TRUE;
+
+}
+
+/*--------------------------------------------------------------------------------------------------------------*/
+
static gboolean
physdev_remove (HalDevice *d)
{
@@ -919,7 +1278,29 @@ static PhysDevHandler physdev_handler_ieee1394 = {
.compute_udi = ieee1394_compute_udi,
.remove = physdev_remove
};
-
+
+
+/* s390 specific busses */
+static PhysDevHandler physdev_handler_ccw = {
+ .subsystem = "ccw",
+ .add = ccw_add,
+ .compute_udi = ccw_compute_udi,
+ .remove = physdev_remove
+};
+
+static PhysDevHandler physdev_handler_ccwgroup = {
+ .subsystem = "ccwgroup",
+ .add = ccwgroup_add,
+ .compute_udi = ccwgroup_compute_udi,
+ .remove = physdev_remove
+};
+
+static PhysDevHandler physdev_handler_iucv = {
+ .subsystem = "iucv",
+ .add = iucv_add,
+ .compute_udi = iucv_compute_udi,
+ .remove = physdev_remove
+};
static PhysDevHandler *phys_handlers[] = {
&physdev_handler_pci,
@@ -931,6 +1312,9 @@ static PhysDevHandler *phys_handlers[] = {
&physdev_handler_scsi,
&physdev_handler_mmc,
&physdev_handler_ieee1394,
+ &physdev_handler_ccw,
+ &physdev_handler_ccwgroup,
+ &physdev_handler_iucv,
NULL
};
diff --git a/hald/util.c b/hald/util.c
index 8eec6c45..41c32c5c 100644
--- a/hald/util.c
+++ b/hald/util.c
@@ -47,6 +47,7 @@
#include "hald.h"
#include "device_info.h"
+#include "hald_dbus.h"
#include "util.h"
/** Given all the required parameters, this function will return the number