via_do_set_mode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

via_do_set_mode β€” the one that sets your transfer mode data, bestie πŸ’…

So this page is from the Kernel API Manual, section 9 β€” like, kernel-internals territory, iykyk. Pull up a chair πŸŽ€


✨ SYNOPSIS ✨

void via_do_set_mode (struct ata_port *ap , struct ata_device *adev ,
int mode , int set_ast , int udma_type );

No cap, it returns void β€” it's giving "I do the work, I don't report back" energy 🫢


✨ ARGUMENTS ✨

  • ap β€” the ATA interface. your whole entire port, the main character here πŸ‘‘
  • adev β€” the ATA device. the actual little guy we're configuring πŸ¦‹
  • mode β€” the ATA mode being programmed. literally the vibe we're setting it to ⭐
  • set_ast β€” set this to program address setup. yes bestie, it's a flag, it does a thing πŸ™ˆ
  • udma_type β€” the UDMA mode slash format of the registers. register-flavoured UDMA, okay?? πŸ’€

✨ DESCRIPTION ✨

Okay so here's the tea πŸ“ β€” this function programs the VIA registers for DMA and PIO modes. It uses the ata timing support to compute those modes, so it's not out here freestyling the numbers, it's doing it properly. Slay ✨

⚠️ FIXME: hotplug is gonna require that we serialize multiple mode changes on the two channels. so like, yeah, that's a known thing that needs handling β€” noted, not solved, periodt πŸ’…

✨ SEE ALSO ✨

Go read these next, they're all in the kernel file ./drivers/ata/pata_via.c and they're lowkey iconic 🌈

  • via_cable_detect(9)
  • via_mode_filter(9)
  • via_tf_load(9)
  • via_config_fifo(9)
  • via_init_one(9)
  • via_reinit_one(9)

kisses, this page lives in ./drivers/ata and it's stamped October 2026 β€” via_do_set_mode(9) out πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from