diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
commit | 116674acc97ba75a720329996877077d988443a2 (patch) | |
tree | 6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /Documentation/s390 | |
parent | 71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff) |
Merge with Linux 2.4.2.
Diffstat (limited to 'Documentation/s390')
-rw-r--r-- | Documentation/s390/TAPE | 125 | ||||
-rw-r--r-- | Documentation/s390/cds.txt | 4 | ||||
-rw-r--r-- | Documentation/s390/chandev.8 | 306 |
3 files changed, 433 insertions, 2 deletions
diff --git a/Documentation/s390/TAPE b/Documentation/s390/TAPE new file mode 100644 index 000000000..5576f4923 --- /dev/null +++ b/Documentation/s390/TAPE @@ -0,0 +1,125 @@ +Channel attached Tape device driver + +-----------------------------WARNING----------------------------------------- +This driver is considered to be EXPERIMENTAL. Do NOT use it in +production environments. Feel free to test it and report problems back to us. +----------------------------------------------------------------------------- + +The LINUX for zSeries tape device driver manages channel attached tape drives +which are compatible to IBM 3480 or IBM 3490 magnetic tape subsystems. This +includes various models of these devices (for example the 3490E). + + +Tape driver features + +The device driver supports a maximum of 128 tape devices. +No official LINUX device major number is assigned to the zSeries tape device +driver. It allocates major numbers dynamically and reports them on system +startup. +Typically it will get major number 254 for both the character device front-end +and the block device front-end. + +The tape device driver needs no kernel parameters. All supported devices +present are detected on driver initialization at system startup or module load. +The devices detected are ordered by their subchannel numbers. The device with +the lowest subchannel number becomes device 0, the next one will be device 1 +and so on. + + +Tape character device front-end + +The usual way to read or write to the tape device is through the character +device front-end. The zSeries tape device driver provides two character devices +for each physical device -- the first of these will rewind automatically when +it is closed, the second will not rewind automatically. + +The character device nodes are named /dev/rtibm0 (rewinding) and /dev/ntibm0 +(non-rewinding) for the first device, /dev/rtibm1 and /dev/ntibm1 for the +second, and so on. + +The character device front-end can be used as any other LINUX tape device. You +can write to it and read from it using LINUX facilities such as GNU tar. The +tool mt can be used to perform control operations, such as rewinding the tape +or skipping a file. + +Most LINUX tape software should work with either tape character device. + + +Tape block device front-end + +The tape device may also be accessed as a block device in read-only mode. +This could be used for software installation in the same way as it is used with +other operation systems on the zSeries platform (and most LINUX +distributions are shipped on compact disk using ISO9660 filesystems). + +One block device node is provided for each physical device. These are named +/dev/btibm0 for the first device, /dev/btibm1 for the second and so on. +You should only use the ISO9660 filesystem on LINUX for zSeries tapes because +the physical tape devices cannot perform fast seeks and the ISO9660 system is +optimized for this situation. + + +Tape block device example + +In this example a tape with an ISO9660 filesystem is created using the first +tape device. ISO9660 filesystem support must be built into your system kernel +for this. +The mt command is used to issue tape commands and the mkisofs command to +create an ISO9660 filesystem: + +- create a LINUX directory (somedir) with the contents of the filesystem + mkdir somedir + cp contents somedir + +- insert a tape + +- ensure the tape is at the beginning + mt -f /dev/ntibm0 rewind + +- set the blocksize of the character driver. The blocksizes 512, 1024 + and 2048 bytes are supported by ISO9660. 1024 is the default, u + which will be used here. + mt -f /dev/ntibm0 setblk 1024 + +- write the filesystem to the character device driver + mkisofs -o /dev/ntibm0 somedir + +- rewind the tape again + mt -f /dev/ntibm0 rewind + +- Now you can mount your new filesystem as a block device: + mount -t iso9660 -o ro,block=1024 /dev/btibm0 /mnt + +TODO List + +- The backend code has to be enhanced to support error-recovery actions. + +- The seeking algorithm of the block device has to be improved to speed + things up + +BUGS + +There are lots of weaknesses still in the code. This is why it is EXPERIMENTAL. +If an error occurs which cannot be handled by the code you will get a +sense-data dump.In that case please do the following: + +1. set the tape driver debug level to maximum: + echo 6 >/proc/s390dbf/tape/level + +2. re-perform the actions which produced the bug. (Hopefully the bug will + reappear.) + +3. get a snapshot from the debug-feature: + cat /proc/s390dbf/tape/hex_ascii >somefile + +4. Now put the snapshot together with a detailed description of the situation + that led to the bug: + - Which tool did you use? + - Which hardware do you have? + - Was your tape unit online? + - Is it a shared tape unit? + +5. Send an email with your bug report to: + mailto:Linux390@de.ibm.com + + diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt index 1de558718..746f36dd0 100644 --- a/Documentation/s390/cds.txt +++ b/Documentation/s390/cds.txt @@ -539,7 +539,7 @@ flag : defines the action to e parformed for I/O processing Possible flag values are : -DOIO_EARLY_NOTIFICATION - allow for early interupt notification +DOIO_EARLY_NOTIFICATION - allow for early interrupt notification DOIO_VALID_LPM - LPM input parameter is valid (see usage notes below for details) DOIO_WAIT_FOR_INTERRUPT - wait synchronously for final status @@ -549,7 +549,7 @@ The cpa parameter points to the first format 1 CCW of a channel program : typedef struct { char cmd_code; /* command code */ - char flags; /* flags, like IDA adressing, etc. */ + char flags; /* flags, like IDA addressing, etc. */ unsigned short count; /* byte count */ void *cda; /* data address */ } ccw1_t __attribute__ ((aligned(8))); diff --git a/Documentation/s390/chandev.8 b/Documentation/s390/chandev.8 new file mode 100644 index 000000000..e39975846 --- /dev/null +++ b/Documentation/s390/chandev.8 @@ -0,0 +1,306 @@ +.TH chandev 8 +.SH NAME +channel device layer +.Dd December 6, 2000 +.Os Linux for Zseries + +.SH SYNOPSIS +The channel device layer is a layer to provide a consistent interface for +configuration & default machine check (devices appearing & disappearing ) +handling Linux for zSeries channel devices. + +These include among others + +.Bl -item +.It +lcs ( the most common ethernet/token ring/fddi standard on zSeries ) +.It +ctc/escon hi speed like serial link standard on zSeries. +.It +claw used to talk to cisco routers. +.It +qeth gigabit ethernet. +.El + +These devices use two channels one read & one write for configuration & +or communication. +The motivation behind producing this layer was that there is a lot of +duplicate code among the drivers for configuration so the lcs & ctc drivers +tended to fight over 3088/08's & 3088/1F's which could be either 2216/3172 +lcs compatible devices or escons/ctc's & to resolve this fight +both device drivers had to be reconfigured rather than doing the +configuration in a single place. + +.SH DESCRIPTION +The current setup can be read from /proc/chandev +arguments can be entered by... +.Bl -enum +.It +Piping to /proc/chandev. +.It +Entering them into /etc/chandev.conf comments are prefixed #. +.It +Or from the boot command line using the 'chandev=' keyword +.El +Multiple options can be passed separated by semicolons but no spaces are allowed between parameters. The script /bin/chandev will be called automatically on startup or a machine check of a device as follows. +/bin/chandev <start starting_devnames> <machine_check (devnames pre_recovery_action_status) (post_recovery_action_status)>. + +e.g. if tr0 & ctc0 were starting up & eth0 & eth1 didn't recover from a gone machine check at the same instant the parameters would be. + + +/bin/chandev start tr0 ctc0 machine_check eth0 gone gone eth1 gone gone + + +This can be used for example to call /etc/rc.d/init.d/network start when a device appears & make the ipldelay kernel boot parameter obselete on native machines or recover from bad machine checks where the default machine check handling isn't adequete. The machine checks that can be presented as parameters are good not_operational no_path revalidate device_gone. + +valid chandev arguments are <> indicate optional parameters, | indicate a choice. + +.B glossary +.Bl -item +.It +devno: is a 16 bit unsigned number used to uniquely identify a subchannel to a device. +.It +force list: is a term specific to channel device layer describing a range of devno's to be forced to configure in a particular manner as opposed to autodetect +.El + +.B commonly used options + +.Bl -item +.It + +.Bl -item + +.It +.B (ctc|escon|lcs|osad|qeth|claw)<devif_num>, +read_devno, write_devno, <port_no/protocol_no>, <checksum_received_ip_pkts>, <use_hw_stats> +.It +e.g. ctc0,0x7c00,0x7c01,0,0,0 +.It +Tells the channel layer to force ctc0 if detected to use cuu's 7c00 & 7c01 port,port_no is the relative adapter no on lcs, on ctc/escon this field is the ctc/escon protocol number ( normally 0 ), don't do checksumming on received ip packets & as ctc doesn't have hardware stats so it ignores this parameter. +.El +.It + +.Bl -item +.It +.B add_parms +,chan_type,<string> +.It +chan_type bitfield +.It +ctc=0x1, escon=0x2, lcs=0x4, osad=0x8, qeth=0x10, claw=0x20. +.It +This is for device driver specific options passed as a string to the driver +not dealt with by the channel device layer it can't contain spaces. +.El +.It + +.Bl -item +.It +.B del_parms +<,chan_type,exact_match> +.It +This deletes some or all device driver specific options not specifying chan_type causes it to delete all the strings. exact_match=1 specifies only to remove driver parms where chan_type is exactly equal exact_match=0 specifies to remove parms where any bit matches chan_type. +.El +.It + +.Bl -item +.It +.B noauto +,<lo_devno>-<hi_devno> +.It +Don't probe a range of device numbers for channel devices. +.El +.It + +.Bl -item +.It +.B use_devno_names +.It +Tells the channel layer to assign device names based on the read channel cuu number. +.It +e.g. a token ring read channel 0x7c00 would have an interface called tr0x7c00 this avoids name collisions on devices. +.El +.El + + +.B power user options + + +.Bl -item + +.It +.Bl -item +.It +.B del_noauto +,<devno> +.It + Delete a range or all noauto ranges when devno is within a range. +.El + +.It +.Bl -item +.It +.B del_force +,read_devno +.It +Delete a forced channel device from force list. +.El + +.It +.Bl -item +.It +.B dont_use_devno_names +.It +Opposite to use_devno_names described above. +.El + + +.It +.Bl -item +.It +.B add_model +,chan_type, cu_type, cu_model, dev_type, dev_model, max_port_no, automatic_machine_check_handling + +.It +Tells the channel layer to probe for the device described, -1 for any of the parameters other than chan_type & automatic_machine_check_handling is a wildcard. +Set max_port_no to 0 for non lcs devices. +.It +auto machine check recovery bitfield +.It +not_operational=0x1, no_path=0x2, revalidate=0x4, gone=0x8 +.It +chan_type bitfield +.It +ctc=0x1, escon=0x2, lcs=0x4, osad=0x8, qeth=0x10, claw=0x20 + +.It +.Bl -item +.It +.B del_model +,cu_type,cu_model,dev_type,dev_model +.It +-1 for any parameter is a wildcard, +.El +.It +.B del_all_models +.It +.Bl -item +.It +.B auto_msck +<,lo_devno>,<hi_devno>,auto_msck_recovery +.It +This is used to specify the kind of machine check recovery that occurs over a device range. +.El +.It +.Bl -item +.It +.B del_auto_msck +<,devno> +.It +Delete a range or all machine check recovery ranges when devno is within a range. +.El +.It +.Bl -item +.It +.B reset_clean +.It +Resets all model info, forced devices & noauto lists to null. +.El +.It +.Bl -item +.It +.B reset_conf +.It +Resets all model info, forced devices & noauto lists back to default settings. +.El +.It +.Bl -item +.It +.B reset_conf_clean +.It +Resets all model info, forced devices & noauto lists to empty. +.El +.It +.Bl -item +.It +.B shutdown +<device name|read devno> +.It +Shuts down a particular device by device name or read devno, +deregisters it & releases its interrupts +or shuts down all devices if no parameter is used. +.El +.It +.Bl -item +.It +.B reprobe +.It +Calls probe method for channels whose interrupts are not owned. +.El +.It +.Bl -item +.It +.B read_conf +.It +Read instructions from /etc/chandev.conf. +.El +.It +.Bl -item +.It +.B dont_read_conf +.It +Don't automatically read /etc/chandev.conf on boot. +.El +.It +e.g the following sequence of commands should be roughly equivalent +to rebooting for channel devices. +.Bl -item +.It +shutdown +.It +reset_conf +.It +read_conf +.It +reprobe +.El +.El + +.SH SEE ALSO +.Bl -item +.It +If you wish to write a driver channel device layer compatible +.It +/linux/include/asm-s390/chandev.h for the apis which are commented. +.It +/linux/drivers/s390/misc/chandev.c for the code. +.El + +.SH FILES +.Bl -item +.It +.B /proc/chandev +.It +cat /proc/chandev to see current options chosen. +.Iy +echo <command> >proc/chandev to enter a new command +.It +.B /etc/chandev.conf +.It +A file which can be used to configure the channel +device layer. +.It +kernel parameters with the +.B 'chandev=' +keyword. +.It +.B /bin/chandev +.It +A user script/executable which is run when devices come online "appear" +or go offline "disappear". +.El + + +.SH AUTHORS +DJ Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) + |