STRUCT CMD_SCSW(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 control
  • eswf β€” esw format
  • cc β€” deferred condition code
  • fmt β€” format
  • pfch β€” prefetch
  • isic β€” initial-status interruption control
  • alcc β€” address-limit checking control
  • ssi β€” suppress-suspended interruption
  • zcc β€” zero condition code
  • ectl β€” extended control
  • pno β€” path not operational
  • res β€” reserved (she's reserved, respect her privacy πŸ™ˆ)
  • fctl β€” function control
  • actl β€” activity control
  • stctl β€” status control
  • cpa β€” channel program address
  • dstat β€” device status
  • cstat β€” subchannel status
  • count β€” 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:

the scsw_cmd_is_valid_* squad β€” literally the vibe check for every single field of this struct, slay:

the scsw_tm_is_valid_* crew, another whole squad 🧚:

the generic scsw_is_valid_* besties:

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