drivers/s390/cio/io_sch.h
Source file repositories/reference/linux-study-clean/drivers/s390/cio/io_sch.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/cio/io_sch.h- Extension
.h- Size
- 5657 bytes
- Lines
- 185
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hasm/schid.hasm/ccwdev.hasm/irq.hcss.horb.h
Detected Declarations
struct io_subchannel_dma_areastruct io_subchannel_privatestruct ccw_requeststruct senseidstruct ccw_device_dma_areastruct ccw_device_privateenum io_statusenum cdev_todofunction dev_get_drvdatafunction sch_set_cdev
Annotated Snippet
struct io_subchannel_dma_area {
struct ccw1 sense_ccw; /* static ccw for sense command */
};
struct io_subchannel_private {
union orb orb; /* operation request block */
struct ccw_device *cdev;/* pointer to the child ccw device */
struct {
unsigned int suspend:1; /* allow suspend */
unsigned int prefetch:1;/* deny prefetch */
unsigned int inter:1; /* suppress intermediate interrupts */
} __packed options;
struct io_subchannel_dma_area *dma_area;
dma_addr_t dma_area_dma;
} __aligned(8);
#define to_io_private(n) ((struct io_subchannel_private *) \
dev_get_drvdata(&(n)->dev))
#define set_io_private(n, p) (dev_set_drvdata(&(n)->dev, p))
static inline struct ccw_device *sch_get_cdev(struct subchannel *sch)
{
struct io_subchannel_private *priv = to_io_private(sch);
return priv ? priv->cdev : NULL;
}
static inline void sch_set_cdev(struct subchannel *sch,
struct ccw_device *cdev)
{
struct io_subchannel_private *priv = to_io_private(sch);
if (priv)
priv->cdev = cdev;
}
#define MAX_CIWS 8
/*
* Possible status values for a CCW request's I/O.
*/
enum io_status {
IO_DONE,
IO_RUNNING,
IO_STATUS_ERROR,
IO_PATH_ERROR,
IO_REJECTED,
IO_KILLED
};
/**
* ccw_request - Internal CCW request.
* @cp: channel program to start
* @timeout: maximum allowable time in jiffies between start I/O and interrupt
* @maxretries: number of retries per I/O operation and path
* @lpm: mask of paths to use
* @check: optional callback that determines if results are final
* @filter: optional callback to adjust request status based on IRB data
* @callback: final callback
* @data: user-defined pointer passed to all callbacks
* @singlepath: if set, use only one path from @lpm per start I/O
* @cancel: non-zero if request was cancelled
* @done: non-zero if request was finished
* @mask: current path mask
* @retries: current number of retries
* @drc: delayed return code
*/
struct ccw_request {
struct ccw1 *cp;
unsigned long timeout;
u16 maxretries;
u8 lpm;
int (*check)(struct ccw_device *, void *);
enum io_status (*filter)(struct ccw_device *, void *, struct irb *,
enum io_status);
void (*callback)(struct ccw_device *, void *, int);
void *data;
unsigned int singlepath:1;
/* These fields are used internally. */
unsigned int cancel:1;
unsigned int done:1;
u16 mask;
u16 retries;
int drc;
} __attribute__((packed));
/*
* sense-id response buffer layout
*/
struct senseid {
/* common part */
u8 reserved; /* always 0x'FF' */
Annotation
- Immediate include surface: `linux/types.h`, `asm/schid.h`, `asm/ccwdev.h`, `asm/irq.h`, `css.h`, `orb.h`.
- Detected declarations: `struct io_subchannel_dma_area`, `struct io_subchannel_private`, `struct ccw_request`, `struct senseid`, `struct ccw_device_dma_area`, `struct ccw_device_private`, `enum io_status`, `enum cdev_todo`, `function dev_get_drvdata`, `function sch_set_cdev`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.