megasas_alloc_cmds(9)
π megasas_alloc_cmds π
okay bestie, this is the Kernel API Manual page for megasas_alloc_cmds, and it's giving "command packet allocation core." no cap. π«Ά
β¨ NAME β¨
megasas_alloc_cmds β Allocates the command packets. That's the whole name, iconic and to the point. π
π SYNOPSIS π
int megasas_alloc_cmds (struct megasas_instance *instance );
πΈ ARGUMENTS πΈ
instanceβ Adapter soft state. That's the adapter's soft-state bestie, literally the thing you pass in.
π¦ DESCRIPTION π¦
okay so picture this: each command that is issued to the FW β whether it's an IO command from the OS or an internal command like an IOCTL β is wrapped in a local data structure called megasas_cmd. The frame embedded in this megasas_cmd is actually issued to the FW. π
Each frame has a 32-bit field called context (tag). This context is used to get back the megasas_cmd from the frame when a frame gets completed in the ISR. Typically the address of the megasas_cmd itself would be used as the context. But we wanted to keep the differences between 32 and 64 bit systems to the mininum. We always use 32 bit integers for the context. periodt.
In this driver, the 32 bit values are the indices into an array cmd_list. This array is used only to look up the megasas_cmd given the context. The free commands themselves are maintained in a linked list called cmd_pool. that's the whole structure, bestie β no extra lore. π«Ά
π SEE ALSO π
Kernel file: ./drivers/scsi/megaraid/megaraid_sas_base.c β go read the source, iykyk. β¨
- starter pack:
megasas_set_dma_settings(9),megasas_get_cmd(9),megasas_return_cmd(9),megasas_decode_evt(9) - xscale crew:
megasas_enable_intr_xscale(9),megasas_disable_intr_xscale(9),megasas_read_fw_status_reg_xscale(9),megasas_clear_intr_xscale(9),megasas_fire_cmd_xscale(9),megasas_adp_reset_xscale(9),megasas_check_reset_xscale(9) - ppc crew:
megasas_enable_intr_ppc(9),megasas_disable_intr_ppc(9),megasas_read_fw_status_reg_ppc(9),megasas_clear_intr_ppc(9),megasas_fire_cmd_ppc(9),megasas_check_reset_ppc(9) - skinny crew:
megasas_enable_intr_skinny(9),megasas_disable_intr_skinny(9),megasas_read_fw_status_reg_skinny(9),megasas_clear_intr_skinny(9),megasas_fire_cmd_skinny(9),megasas_check_reset_skinny(9) - gen2 crew:
megasas_enable_intr_gen2(9),megasas_disable_intr_gen2(9),megasas_read_fw_status_reg_gen2(9),megasas_clear_intr_gen2(9),megasas_fire_cmd_gen2(9),megasas_adp_reset_gen2(9),megasas_check_reset_gen2(9) - command-issuing besties:
megasas_issue_polled(9),megasas_issue_blocked_cmd(9),megasas_issue_blocked_abort_cmd(9) - SGL + build squad:
megasas_make_sgl32(9),megasas_make_sgl64(9),megasas_make_sgl_skinny(9),megasas_build_dcdb(9),megasas_build_ldio(9),megasas_cmd_type(9),megasas_queue_command(9) - completion + timer cuties:
megasas_complete_cmd_dpc(9),megasas_start_timer(9),megasas_wait_for_outstanding(9),megasas_generic_reset(9),megasas_reset_timer(9) - dump + reset girlies:
megasas_dump(9),megasas_dump_reg_set(9),megasas_dump_fusion_io(9),megasas_reset_bus_host(9),megasas_task_abort(9),megasas_reset_target(9),megasas_bios_param(9) - AEN + completion squad:
megasas_service_aen(9),megasas_complete_int_cmd(9),megasas_complete_abort(9),megasas_complete_cmd(9),megasas_issue_pending_cmds_again(9),megasas_deplete_reply_queue(9),megasas_isr(9) - ready + frame pool crew:
megasas_transition_to_ready(9),megasas_teardown_frame_pool(9),megasas_create_frame_pool(9),megasas_free_cmds(9) - query + ctrl info besties:
megasas_ld_list_query(9),megasas_host_device_list_query(9),megasas_get_ctrl_info(9),megasas_issue_init_mfi(9) - IRQ + setup squad:
megasas_setup_irqs_msix(9),megasas_setup_jbod_map(9),megasas_get_device_list(9),megasas_set_high_iops_queue_affinity_and_hint(9),megasas_alloc_irq_vectors(9),megasas_init_fw(9) - release + seq + AEN girlies:
megasas_release_mfi(9),megasas_get_seq_num(9),megasas_register_aen(9),megasas_start_aen(9) - attach + dma + mem crew:
megasas_io_attach(9),megasas_set_dma_mask(9),megasas_alloc_ctrl_mem(9),megasas_alloc_ctrl_dma_buffers(9) - probe + lifecycle besties:
megasas_probe_one(9),megasas_flush_cache(9),megasas_shutdown_controller(9),megasas_suspend(9),megasas_resume(9),megasas_detach_one(9),megasas_shutdown(9) - mgmt ioctl + device list crew:
megasas_mgmt_fw_ioctl(9),megasas_mgmt_ioctl(9),megasas_update_device_list(9),megasas_add_remove_devices(9) - init/exit finale:
megasas_init(9),megasas_exit(9)
okay bye bestie π
β source/version vibe: ./drivers/scsi/megaraid, date: October 2026, page: megasas_alloc_cmds(9). slay and read the source π«Ά
π¦ 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