Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / Documentation / s390 / driver-model.txt
index 1946195..efb674e 100644 (file)
@@ -8,19 +8,20 @@ All devices which can be addressed by means of ccws are called 'CCW devices' -
 even if they aren't actually driven by ccws.
 
 All ccw devices are accessed via a subchannel, this is reflected in the 
-structures under root/:
+structures under devices/:
 
-root/
-     - sys
-     - legacy
+devices/
+     - system/
      - css0/
            - 0.0.0000/0.0.0815/
           - 0.0.0001/0.0.4711/
           - 0.0.0002/
+          - 0.1.0000/0.1.1234/
           ...
 
-In this example, device 0815 is accessed via subchannel 0, device 4711 via 
-subchannel 1, and subchannel 2 is a non-I/O subchannel.
+In this example, device 0815 is accessed via subchannel 0 in subchannel set 0,
+device 4711 via subchannel 1 in subchannel set 0, and subchannel 2 is a non-I/O
+subchannel. Device 1234 is accessed via subchannel 0 in subchannel set 1.
 
 You should address a ccw device via its bus id (e.g. 0.0.4711); the device can
 be found under bus/ccw/devices/.
@@ -36,7 +37,7 @@ availability: Can be 'good' or 'boxed'; 'no path' or 'no device' for
 
 online:     An interface to set the device online and offline.
            In the special case of the device being disconnected (see the
-           notify function under 1.2), piping 0 to online will focibly delete
+           notify function under 1.2), piping 0 to online will forcibly delete
            the device.
 
 The device drivers can add entries to export per-device data and interfaces.
@@ -98,7 +99,7 @@ is not available to the device driver.
 
 Each driver should declare in a MODULE_DEVICE_TABLE into which CU types/models
 and/or device types/models it is interested. This information can later be found
-found in the struct ccw_device_id fields:
+in the struct ccw_device_id fields:
 
 struct ccw_device_id {
        __u16   match_flags;    
@@ -209,6 +210,11 @@ Each ccwgroup device also provides an 'ungroup' attribute to destroy the device
 again (only when offline). This is a generic ccwgroup mechanism (the driver does
 not need to implement anything beyond normal removal routines).
 
+A ccw device which is a member of a ccwgroup device carries a pointer to the
+ccwgroup device in the driver_data of its device struct. This field must not be
+touched by the driver - it should use the ccwgroup device's driver_data for its
+private data.
+
 To implement a ccwgroup driver, please refer to include/asm/ccwgroup.h. Keep in
 mind that most drivers will need to implement both a ccwgroup and a ccw driver
 (unless you have a meta ccw driver, like cu3088 for lcs and ctc).
@@ -222,7 +228,7 @@ and are called 'chp0.<chpid>'. They have no driver and do not belong to any bus.
 Please note, that unlike /proc/chpids in 2.4, the channel path objects reflect
 only the logical state and not the physical state, since we cannot track the
 latter consistently due to lacking machine support (we don't need to be aware
-of anyway).
+of it anyway).
 
 status - Can be 'online' or 'offline'.
         Piping 'on' or 'off' sets the chpid logically online/offline.
@@ -231,16 +237,22 @@ status - Can be 'online' or 'offline'.
         a channel path the user knows to be online, but the machine hasn't
         created a machine check for.
 
+type - The physical type of the channel path.
+
 
 3. System devices
 -----------------
 
-Note: cpus may yet be added here.
-
 3.1 xpram 
 ---------
 
-xpram shows up under sys/ as 'xpram'.
+xpram shows up under devices/system/ as 'xpram'.
+
+3.2 cpus
+--------
+
+For each cpu, a directory is created under devices/system/cpu/. Each cpu has an
+attribute 'online' which can be 0 or 1.
 
 
 4. Other devices