ccw_device_start(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ccw_device_start β€” start a s390 channel program

okay so this is a page from the Kernel API Manual, and it's all about ccw_device_start, the function that kicks off a channel program on s390. stay with me bestie, it's actually iconic once you get it πŸŽ€


✨ SYNOPSIS ✨

int ccw_device_start (struct ccw_device *cdev , struct ccw1 *cpa ,
unsigned long intparm , __u8 lpm , unsigned long flags );

that's the whole signature, no cap. now let's meet the arguments πŸ’–


🌸 ARGUMENTS 🌸

  • cdev β€” the target ccw device. like, the device you're talking to.
  • cpa β€” the logical start address of the channel program. this is where your program lives in the address space πŸ—ΊοΈ
  • intparm β€” a user specific interruption parameter. it gets presented back to cdev's interrupt handler, which is literally how a device driver associates an interrupt with a particular I/O request. so thoughtful of it 🫢
  • lpm β€” defines the channel path to be used for a specific I/O request. a value of 0 will make cio use the opm.
  • flags β€” additional flags. defines the action to be performed for I/O processing.

πŸ”₯ DESCRIPTION πŸ”₯

Start a S/390 channel program. that's the whole vibe.

when the interrupt arrives, the IRQ handler is called β€” and here's the tea, it can be called in one of three ways:

  1. immediately,
  2. delayed (that's when dev-end is missing, or sense is required),
  3. or never (when there's no IRQ handler registered at all 😭).

the interruption handler will echo back the intparm you specified here β€” unless another interruption parameter is specified by a subsequent invocation of ccw_device_halt or ccw_device_clear. so like, if you call those afterwards, the echo changes. noted πŸ‘‘


⭐ RETURN ⭐

  • 0 β€” the operation was successful πŸ’– slay
  • -EBUSY β€” the device is busy, or status pending
  • -EACCES β€” no path specified in lpm is operational
  • -ENODEV β€” the device is not operational

πŸ¦‹ CONTEXT πŸ¦‹

Interrupts disabled, ccw device lock held. like, don't even think about calling this without holding the lock, bestie πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file, right here:

Kernel file ./drivers/s390/cio/device_ops.c

and the whole friend group of related calls, all of them, no one left out 🫢


that's the whole page, periodt. this one lives in ./drivers/s390/cio and the date on it is October 2026 β€” so yeah, mark your calendar bestie, and go start some channel programs πŸ§šπŸ’œ

πŸ“¦ where this page comes from