X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2Fs390%2Fdriver-model.txt;fp=Documentation%2Fs390%2Fdriver-model.txt;h=e938c442277dc0ecd1b05002ba9167abbedd914c;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=df09758bf3fe1619df2b57118b5bb60a12c754a8;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/Documentation/s390/driver-model.txt b/Documentation/s390/driver-model.txt index df09758bf..e938c4422 100644 --- a/Documentation/s390/driver-model.txt +++ b/Documentation/s390/driver-model.txt @@ -16,10 +16,19 @@ devices/ - 0.0.0000/0.0.0815/ - 0.0.0001/0.0.4711/ - 0.0.0002/ + - 0.1.0000/0.1.1234/ ... + - defunct/ -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. + +The subchannel named 'defunct' does not represent any real subchannel on the +system; it is a pseudo subchannel where disconnnected ccw devices are moved to +if they are displaced by another ccw device becoming operational on their +former subchannel. The ccw devices will be moved again to a proper subchannel +if they become operational again on that subchannel. You should address a ccw device via its bus id (e.g. 0.0.4711); the device can be found under bus/ccw/devices/. @@ -97,7 +106,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; @@ -155,7 +164,7 @@ notify: This function is called by the common I/O layer for some state changes * In online state, device detached (CIO_GONE) or last path gone (CIO_NO_PATH). The driver must return !0 to keep the device; for return code 0, the device will be deleted as usual (also when no - notify function is registerd). If the driver wants to keep the + notify function is registered). If the driver wants to keep the device, it is moved into disconnected state. * In disconnected state, device operational again (CIO_OPER). The common I/O layer performs some sanity checks on device number and @@ -208,6 +217,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). @@ -230,6 +244,11 @@ 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. + +shared - Whether the channel path is shared. + +cmg - The channel measurement group. 3. System devices ----------------- @@ -253,7 +272,7 @@ attribute 'online' which can be 0 or 1. ----------- The netiucv driver creates an attribute 'connection' under -bus/iucv/drivers/netiucv. Piping to this attibute creates a new netiucv +bus/iucv/drivers/netiucv. Piping to this attribute creates a new netiucv connection to the specified host. Netiucv connections show up under devices/iucv/ as "netiucv". The interface