Documentation/arch/s390/cds.rst
Source file repositories/reference/linux-study-clean/Documentation/arch/s390/cds.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/arch/s390/cds.rst- Extension
.rst- Size
- 23218 bytes
- Lines
- 531
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct ccw1
Annotated Snippet
struct ccw1 {
__u8 cmd_code;/* command code */
__u8 flags; /* flags, like IDA addressing, etc. */
__u16 count; /* byte count */
__u32 cda; /* data address */
} __attribute__ ((packed,aligned(8)));
with the following CCW flags values defined:
=================== =========================
CCW_FLAG_DC data chaining
CCW_FLAG_CC command chaining
CCW_FLAG_SLI suppress incorrect length
CCW_FLAG_SKIP skip
CCW_FLAG_PCI PCI
CCW_FLAG_IDA indirect addressing
CCW_FLAG_SUSPEND suspend
=================== =========================
Via ccw_device_set_options(), the device driver may specify the following
options for the device:
========================= ======================================
DOIO_EARLY_NOTIFICATION allow for early interrupt notification
DOIO_REPORT_ALL report all interrupt conditions
========================= ======================================
The ccw_device_start() function returns:
======== ======================================================================
0 successful completion or request successfully initiated
-EBUSY The device is currently processing a previous I/O request, or there is
a status pending at the device.
-ENODEV cdev is invalid, the device is not operational or the ccw_device is
not online.
======== ======================================================================
When the I/O request completes, the CDS first level interrupt handler will
accumulate the status in a struct irb and then call the device interrupt handler.
The intparm field will contain the value the device driver has associated with a
particular I/O request. If a pending device status was recognized,
intparm will be set to 0 (zero). This may happen during I/O initiation or delayed
by an alert status notification. In any case this status is not related to the
current (last) I/O request. In case of a delayed status notification no special
interrupt will be presented to indicate I/O completion as the I/O request was
never started, even though ccw_device_start() returned with successful completion.
The irb may contain an error value, and the device driver should check for this
first:
========== =================================================================
-ETIMEDOUT the common I/O layer terminated the request after the specified
timeout value
-EIO the common I/O layer terminated the request due to an error state
========== =================================================================
If the concurrent sense flag in the extended status word (esw) in the irb is
set, the field erw.scnt in the esw describes the number of device specific
sense bytes available in the extended control word irb->scsw.ecw[]. No device
sensing by the device driver itself is required.
The device interrupt handler can use the following definitions to investigate
the primary unit check source coded in sense byte 0 :
======================= ====
SNS0_CMD_REJECT 0x80
SNS0_INTERVENTION_REQ 0x40
SNS0_BUS_OUT_CHECK 0x20
Annotation
- Detected declarations: `struct ccw1`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.