s390-drivers.tmpl 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
  4. <book id="s390drivers">
  5. <bookinfo>
  6. <title>Writing s390 channel device drivers</title>
  7. <authorgroup>
  8. <author>
  9. <firstname>Cornelia</firstname>
  10. <surname>Huck</surname>
  11. <affiliation>
  12. <address>
  13. <email>cornelia.huck@de.ibm.com</email>
  14. </address>
  15. </affiliation>
  16. </author>
  17. </authorgroup>
  18. <copyright>
  19. <year>2007</year>
  20. <holder>IBM Corp.</holder>
  21. </copyright>
  22. <legalnotice>
  23. <para>
  24. This documentation is free software; you can redistribute
  25. it and/or modify it under the terms of the GNU General Public
  26. License as published by the Free Software Foundation; either
  27. version 2 of the License, or (at your option) any later
  28. version.
  29. </para>
  30. <para>
  31. This program is distributed in the hope that it will be
  32. useful, but WITHOUT ANY WARRANTY; without even the implied
  33. warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  34. See the GNU General Public License for more details.
  35. </para>
  36. <para>
  37. You should have received a copy of the GNU General Public
  38. License along with this program; if not, write to the Free
  39. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  40. MA 02111-1307 USA
  41. </para>
  42. <para>
  43. For more details see the file COPYING in the source
  44. distribution of Linux.
  45. </para>
  46. </legalnotice>
  47. </bookinfo>
  48. <toc></toc>
  49. <chapter id="intro">
  50. <title>Introduction</title>
  51. <para>
  52. This document describes the interfaces available for device drivers that
  53. drive s390 based channel attached devices. This includes interfaces for
  54. interaction with the hardware and interfaces for interacting with the
  55. common driver core. Those interfaces are provided by the s390 common I/O
  56. layer.
  57. </para>
  58. <para>
  59. The document assumes a familarity with the technical terms associated
  60. with the s390 channel I/O architecture. For a description of this
  61. architecture, please refer to the "z/Architecture: Principles of
  62. Operation", IBM publication no. SA22-7832.
  63. </para>
  64. <para>
  65. While most I/O devices on a s390 system are typically driven through the
  66. channel I/O mechanism described here, there are various other methods
  67. (like the diag interface). These are out of the scope of this document.
  68. </para>
  69. <para>
  70. Some additional information can also be found in the kernel source
  71. under Documentation/s390/driver-model.txt.
  72. </para>
  73. </chapter>
  74. <chapter id="ccw">
  75. <title>The ccw bus</title>
  76. <para>
  77. The ccw bus typically contains the majority of devices available to
  78. a s390 system. Named after the channel command word (ccw), the basic
  79. command structure used to address its devices, the ccw bus contains
  80. so-called channel attached devices. They are addressed via subchannels,
  81. visible on the css bus. A device driver, however, will never interact
  82. with the subchannel directly, but only via the device on the ccw bus,
  83. the ccw device.
  84. </para>
  85. <sect1 id="channelIO">
  86. <title>I/O functions for channel-attached devices</title>
  87. <para>
  88. Some hardware structures have been translated into C structures for use
  89. by the common I/O layer and device drivers. For more information on
  90. the hardware structures represented here, please consult the Principles
  91. of Operation.
  92. </para>
  93. !Iinclude/asm-s390/cio.h
  94. </sect1>
  95. <sect1 id="ccwdev">
  96. <title>ccw devices</title>
  97. <para>
  98. Devices that want to initiate channel I/O need to attach to the ccw bus.
  99. Interaction with the driver core is done via the common I/O layer, which
  100. provides the abstractions of ccw devices and ccw device drivers.
  101. </para>
  102. <para>
  103. The functions that initiate or terminate channel I/O all act upon a
  104. ccw device structure. Device drivers must not bypass those functions
  105. or strange side effects may happen.
  106. </para>
  107. !Iinclude/asm-s390/ccwdev.h
  108. !Edrivers/s390/cio/device.c
  109. !Edrivers/s390/cio/device_ops.c
  110. !Edrivers/s390/cio/airq.c
  111. </sect1>
  112. <sect1 id="cmf">
  113. <title>The channel-measurement facility</title>
  114. <para>
  115. The channel-measurement facility provides a means to collect
  116. measurement data which is made available by the channel subsystem
  117. for each channel attached device.
  118. </para>
  119. !Iinclude/asm-s390/cmb.h
  120. !Edrivers/s390/cio/cmf.c
  121. </sect1>
  122. </chapter>
  123. <chapter id="ccwgroup">
  124. <title>The ccwgroup bus</title>
  125. <para>
  126. The ccwgroup bus only contains artificial devices, created by the user.
  127. Many networking devices (e.g. qeth) are in fact composed of several
  128. ccw devices (like read, write and data channel for qeth). The
  129. ccwgroup bus provides a mechanism to create a meta-device which
  130. contains those ccw devices as slave devices and can be associated
  131. with the netdevice.
  132. </para>
  133. <sect1 id="ccwgroupdevices">
  134. <title>ccw group devices</title>
  135. !Iinclude/asm-s390/ccwgroup.h
  136. !Edrivers/s390/cio/ccwgroup.c
  137. </sect1>
  138. </chapter>
  139. </book>