sas_find_bcast_dev(9)
π 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 theBROADCAST(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:
sas_ex_discover_devices(9)sas_configure_parent(9)sas_configure_routing(9)sas_discover_expander(9)sas_rediscover(9)sas_ex_revalidate_domain(9)
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
- 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