mega_build_cmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so welcome to mega_build_cmd(9) from the Kernel API Manual πŸ’…βœ¨ no cap, she's a whole helper for prepping SCSI commands, and we're gonna get you through her page.

πŸŽ€ NAME πŸŽ€

mega_build_cmd β€” bestie, the dash is literally followed by nothing in the name entry. That's it. That's the name. πŸ’–

✨ SYNOPSIS ✨

Here's the exact signature, character for character, because we do not play with code:

scb_t * mega_build_cmd (adapter_t *adapter , struct scsi_cmnd *cmd ,
enum scsi_qc_status *busy );

πŸ’… ARGUMENTS πŸ’…

  • adapter β€” pointer to our soft state, iconic.
  • cmd β€” prepare using this scsi command. That's the one you're prepping with, fr fr.
  • busy β€” busy flag if no resources. It's giving "we're out of resources" energy. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this routine prepares a command and a scatter gather list for the controller. It's literally the pre-game for the controller command. πŸŽ€

She also finds out whether the command is intended for a logical drive or a physical device, and prepares the controller command accordingly. No cap, logical drive vs physical device matters here. πŸ¦‹

We also re-order the logical drives and physical devices based on their boot settings. That's the boot-settings-based re-order, bestie. ✨

🌈 SEE ALSO 🌈

The whole SEE ALSO squad, preserved exactly β€” every single reference, because we don't drop links in this group chat:

Kernel file ./drivers/scsi/megaraid.c mega_setup_mailbox(9),
mega_runpendq(9), mega_allocate_scb(9), mega_get_ldrv_num(9),
mega_prepare_passthru(9), mega_prepare_extpassthru(9), issue_scb(9),
issue_scb_block(9), megaraid_isr_iomapped(9), megaraid_isr_memmapped(9),
mega_cmd_done(9), megaraid_abort_and_reset(9), mega_allocate_inquiry(9),
proc_show_config(9), proc_show_stat(9), proc_show_mbox(9),
proc_show_rebuild_rate(9), proc_show_battery(9), proc_show_pdrv(9),
proc_show_pdrv_ch0(9), proc_show_pdrv_ch1(9), proc_show_pdrv_ch2(9),
proc_show_pdrv_ch3(9), proc_show_rdrv(9), proc_show_rdrv_10(9),
proc_show_rdrv_20(9), proc_show_rdrv_30(9), proc_show_rdrv_40(9),
mega_create_proc_entry(9), mega_init_scb(9), megadev_open(9),
megadev_ioctl(9), mega_m_to_n(9), mega_is_bios_enabled(9),
mega_enum_raid_scsi(9), mega_get_boot_drv(9),
mega_support_random_del(9), mega_support_ext_cdb(9), mega_del_logdrv(9),
mega_get_max_sgl(9), mega_support_cluster(9), mega_adapinq(9),
mega_internal_dev_inquiry(9), mega_internal_command(9)

πŸ’– cute sign-off time: the source/version is ./drivers/scsi, the date is October 2026, and this iconic page is mega_build_cmd(9) β€” bye bestie, slay your kernel adventures! πŸ«ΆπŸ’…πŸŒΈ

πŸ“¦ where this page comes from