STRUCT CCW_DEVICE(9)
πΈ STRUCT CCW_DEVICE πΈ
ok so bestie, this is the manual page for struct ccw_device β it lives in the Kernel API Manual, and it's literally the whole vibe for a channel attached device. channel attached device. that's the NAME section, periodt. π
β¨ SYNOPSIS β¨
bestie. look at this struct. it's giving main character energy, no cap:
struct ccw_device {
spinlock_t *ccwlock;
struct ccw_device_id id;
struct ccw_driver *drv;
struct device dev;
int online;
void (*handler) (struct ccw_device *, unsigned long, struct irb *);
};
π MEMBERS π
okay so let's meet the cast, one by one π«Ά
ccwlockβ pointer to device lock. it's the lock. for the device. that's it, that's the whole job πidβ id of this device. yes, that's literally what it is β¨drvβ ccw driver for this device. the driver that drives it ππ¨devβ embedded device structure. it's a struct inside a struct, we love a nested moment πonlineβ online status of device. is the device online? check here, bestie π₯handlerβ interrupt handler. iconic. see below for the β¨loreβ¨ π
π DESCRIPTION π
okay so here's the tea β and it's actually kind of important:
handler is a member of the device rather than the driver since a driver can have different interrupt handlers for different ccw devices (multi-subchannel drivers).
like, let that sink in. multi-subchannel drivers are out here needing different interrupt handlers for different devices, so the handler lives on the device itself, not the driver. the way that makes sense immediately when you hear it. ate. π
π SEE ALSO π
go look at these, bestie, i'm obsessed π¦
- Kernel file
./arch/s390/include/asm/ccwdev.h struct ccw_driver(9)
ngl bestie, if you're writing a ccw driver, the handler-on-the-device thing is the detail you'd lowkey miss. so glad you read to the end ππ
that's the whole page, and fr fr thank you for reading this far, you're the bestie π this one's from ./arch/s390/include/asm, dated October 2026 β so go off, you're officially a ccw_device girlie now πβ¨π«Άπβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms