sas_find_bcast_dev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sas_find_bcast_dev(9) β€” like, the Kernel API Manual one, bestie

okay so real quick before we dive in: this is a page from the Kernel API Manual, and the function we're obsessing over is sas_find_bcast_dev ✨. Strap in, she's a little niche but honestly iconic once you get her.


πŸŽ€ NAME πŸŽ€

sas_find_bcast_dev β€” literally just: find the device that was like "hey. something changed" and issued BROADCAST(CHANGE). That's it. That's the whole vibe 🫢


🌸 SYNOPSIS 🌸

int sas_find_bcast_dev (struct domain_device *dev , struct domain_device
**src_dev );

one function, two pointer args, returns an int. no cap, that's the whole signature πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the domain device that we're gonna detect, bestie. this is your starting point, the thing you're snooping on πŸ‘€
  • src_dev β€” aaaand this is the output: the device that originated the BROADCAST(CHANGE). the main character of the broadcast, if you will ✨

πŸ’… DESCRIPTION πŸ’…

Alright so gather round, because this one's giving ✨protocol lore✨.

This whole thing exists to add self-configuration expander support. Let me paint the picture for you 🌈: imagine two expanders cascading β€” level one and level two, chained up. Now say the first-level expander is self-configuring, and you go and hotplug some disks into the second-level expander. What happens? Well, BROADCAST(CHANGE) doesn't just originate in the second-level expander β€” nope β€” it also originates in the first-level expander too 😭 (see SAS protocol SAS 2r-14, 7.11 for the full detail, iykyk).

Which is to say: the expander changed count in both level expanders will each increment at least once πŸ”₯. But β€” and this is the plot twist β€” the phy whose change count actually changed? That's the source device. That's the one we actually care about πŸ’–. Periodt.


⭐ SEE ALSO ⭐

  • Kernel file ./drivers/scsi/libsas/sas_expander.c β€” go read the source, it's right there 🧚

and the whole friend group:


ok that's the whole page πŸŽ€ everything you need, nothing you don't. go forth and find those broadcast devices, bestie πŸ’œ

and finally, mwah πŸ’‹ β€” this lil masterpiece lives in ./drivers/scsi/libsas, dated October 2026. slay πŸ’…βœ¨

πŸ“¦ where this page comes from