STRUCT CMD_SCSW(9)
π struct cmd_scsw(9) β the Kernel API Manual, bestie edition π
okay so this is struct cmd_scsw(9) from the Kernel API Manual and honestly? it's giving "command-mode subchannel status word" energy and we are OBSESSED β¨
πΈ NAME πΈ
struct cmd_scsw β the command-mode subchannel status word, aka the little bundle of bitfields that tells you what your subchannel is going through π«Ά
β¨ SYNOPSIS β¨
like, this is the whole vibe, copy it exactly, no cap:
struct cmd_scsw {
__u32 key : 4;
__u32 sctl : 1;
__u32 eswf : 1;
__u32 cc : 2;
__u32 fmt : 1;
__u32 pfch : 1;
__u32 isic : 1;
__u32 alcc : 1;
__u32 ssi : 1;
__u32 zcc : 1;
__u32 ectl : 1;
__u32 pno : 1;
__u32 res : 1;
__u32 fctl : 3;
__u32 actl : 7;
__u32 stctl : 5;
dma32_t cpa;
__u32 dstat : 8;
__u32 cstat : 8;
__u32 count : 16;
};
look at all those bitfields, she's literally built different πβ¨
π¦ Members π¦
bestie, meet the cast β every single one of them, main character energy only π
keyβ the subchannel key πsctlβ suspend controleswfβ esw formatccβ deferred condition codefmtβ formatpfchβ prefetchisicβ initial-status interruption controlalccβ address-limit checking controlssiβ suppress-suspended interruptionzccβ zero condition codeectlβ extended controlpnoβ path not operationalresβ reserved (she's reserved, respect her privacy π)fctlβ function controlactlβ activity controlstctlβ status controlcpaβ channel program addressdstatβ device statuscstatβ subchannel statuscountβ residual count
π SEE ALSO π
so there's a whole friend group, iykyk. first up, the kernel file that started it all:
- Kernel file
./arch/s390/include/asm/scsw.h
the sibling structs and the union (the family reunion π«Ά):
struct tm_scsw(9)struct eadm_scsw(9)union scsw(9)
the getters, lowkey iconic:
scsw_is_tm(9)scsw_key(9)scsw_eswf(9)scsw_cc(9)scsw_ectl(9)scsw_pno(9)scsw_fctl(9)scsw_actl(9)scsw_stctl(9)scsw_dstat(9)scsw_cstat(9)
the scsw_cmd_is_valid_* squad β literally the vibe check for every single field of this struct, slay:
scsw_cmd_is_valid_key(9)scsw_cmd_is_valid_sctl(9)scsw_cmd_is_valid_eswf(9)scsw_cmd_is_valid_cc(9)scsw_cmd_is_valid_fmt(9)scsw_cmd_is_valid_pfch(9)scsw_cmd_is_valid_isic(9)scsw_cmd_is_valid_alcc(9)scsw_cmd_is_valid_ssi(9)scsw_cmd_is_valid_zcc(9)scsw_cmd_is_valid_ectl(9)scsw_cmd_is_valid_pno(9)scsw_cmd_is_valid_fctl(9)scsw_cmd_is_valid_actl(9)scsw_cmd_is_valid_stctl(9)scsw_cmd_is_valid_dstat(9)scsw_cmd_is_valid_cstat(9)
the scsw_tm_is_valid_* crew, another whole squad π§:
scsw_tm_is_valid_key(9)scsw_tm_is_valid_eswf(9)scsw_tm_is_valid_cc(9)scsw_tm_is_valid_fmt(9)scsw_tm_is_valid_x(9)scsw_tm_is_valid_q(9)scsw_tm_is_valid_ectl(9)scsw_tm_is_valid_pno(9)scsw_tm_is_valid_fctl(9)scsw_tm_is_valid_actl(9)scsw_tm_is_valid_stctl(9)scsw_tm_is_valid_dstat(9)scsw_tm_is_valid_cstat(9)scsw_tm_is_valid_fcxs(9)scsw_tm_is_valid_schxs(9)
the generic scsw_is_valid_* besties:
scsw_is_valid_actl(9)scsw_is_valid_cc(9)scsw_is_valid_cstat(9)scsw_is_valid_dstat(9)scsw_is_valid_ectl(9)scsw_is_valid_eswf(9)scsw_is_valid_fctl(9)scsw_is_valid_key(9)scsw_is_valid_pno(9)scsw_is_valid_stctl(9)
and finally the "was this even solicited" trio, periodt:
fr fr go read those, they're all in ./arch/s390/include/asm/scsw.h and they ate π
okay that's the whole page bestie, no notes, she's perfect π ngl this came from ./arch/s390/include/asm, dated October 2026 β mwah, love u, bye ππ¦π
π¦ 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