ccw_device_halt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ccw_device_halt β€” a Kernel API Manual moment (section 9, bestie)

Okay so picture this: you're deep in the ./drivers/s390/cio directory of the Kernel API Manual (section 9, yes that section), and you need to halt some I/O request processing. That's the whole vibe. Let me walk you through it 🫢


✨ SYNOPSIS ✨

int ccw_device_halt (struct ccw_device *cdev , unsigned long intparm );

That's the whole signature, no cap β€” two args, one int coming back at you.


πŸŽ€ ARGUMENTS πŸŽ€

  • cdev β€” the target ccw device. Like, the device you're doing this to. Main character of the operation πŸ’–
  • intparm β€” the interruption parameter that gets returned when hsch concludes. So you hand it over now, it comes back to you later. It's giving "hold my jacket, I'll want it back" πŸ™ˆ

🌸 DESCRIPTION 🌸

So ccw_device_halt literally just calls hsch on cdev's subchannel. That's it. That's the function πŸ’…

And here's the cute part: the interruption handler will echo back the intparm you specified here β€” unless another interruption parameter got specified by a subsequent invocation of ccw_device_clear. So keep that in mind if you're calling clear afterwards, because then your little intparm is not the one coming home 😭


πŸ”₯ RETURN πŸ”₯

  • 0 β€” success, slay ✨
  • -ENODEV β€” device not operational
  • -EINVAL β€” invalid device state
  • -EBUSY β€” device busy or interrupt pending

πŸ‘‘ CONTEXT πŸ‘‘

Interrupts disabled, ccw device lock held. Periodt. Don't come in here without those, fr fr πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/s390/cio/device_ops.c β€” go read it, iykyk πŸ“–

And the whole friend group, in order:

Every single one, because we don't skip the boring parts in this house πŸ’œ


Bye bestie!! This page lives in ./drivers/s390/cio, and it's stamped October 2026 β€” go halt some I/O request processing responsibly, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from