pmcraid_init_buffers(9)
π pmcraid_init_buffers π
okay so real talk, this page is straight out of the Kernel API Manual (section 9, we love a classic), and it's all about pmcraid_init_buffers. buckle up bestie, it's a memory-allocating girlie π
β¨ NAME β¨
pmcraid_init_buffers β allocates memory and initializes various structures. that's it, that's the whole vibe. she allocates, she initializes, she leaves π
πΈ SYNOPSIS πΈ
int pmcraid_init_buffers (struct pmcraid_instance *pinstance );
(yes the space before the closing paren is canon, don't come for me π«Ά)
π ARGUMENTS π
pinstanceβ pointer to per adapter instance structure. one pointer, one adapter, one destiny β¨
π DESCRIPTION π
so this routine pre-allocates memory β like, ahead of time, before anyone's panicking β and the kind of memory she grabs depends on the type of block. it's giving "organized bestie with labeled bins" π§Ί
here's the full breakdown, no cap:
- cmdblocks (
PMCRAID_MAX_CMD) β kernel memory using kernel'sslab_allocator - IOARCBs (
PMCRAID_MAX_CMD) β DMAable memory, using pci pool allocator - config-table entries β DMAable memory using
dma_alloc_coherent - HostRRQs β DMAable memory, using
dma_alloc_coherent
lowkey iconic how there are two whole PMCRAID_MAX_CMD situations and two whole dma_alloc_coherent situations. that's not a coincidence, that's a pattern, iykyk π
π₯ Return Value π₯
she returns 0 in case all of the blocks are allocated. if not? -ENOMEM. that's the whole story β all-or-nothing energy, main character behavior fr fr π
π¦ SEE ALSO π¦
this is the part where the page goes absolutely feral with cross-references, and i respect it. also flagging the source file first: Kernel file ./drivers/scsi/pmcraid.c π
the whole extended friend group, in order, no skips, no edits:
pmcraid_sdev_init(9),pmcraid_sdev_configure(9),pmcraid_sdev_destroy(9),pmcraid_change_queue_depth(9)pmcraid_init_cmdblk(9),pmcraid_reinit_cmdblk(9),pmcraid_get_free_cmd(9),pmcraid_return_cmd(9)pmcraid_read_interrupts(9),pmcraid_disable_interrupts(9),pmcraid_enable_interrupts(9),pmcraid_clr_trans_op(9)pmcraid_reset_type(9),pmcraid_bist_done(9),pmcraid_start_bist(9),pmcraid_reset_alert_done(9)pmcraid_reset_alert(9),pmcraid_timeout_handler(9),pmcraid_internal_done(9),pmcraid_reinit_cfgtable_done(9)pmcraid_erp_done(9),_pmcraid_fire_command(9),pmcraid_send_cmd(9),pmcraid_ioa_shutdown_done(9)pmcraid_ioa_shutdown(9),pmcraid_get_fwversion_done(9),pmcraid_get_fwversion(9),pmcraid_identify_hrrq(9)pmcraid_send_hcam_cmd(9),pmcraid_init_hcam(9),pmcraid_send_hcam(9),pmcraid_prepare_cancel_cmd(9)pmcraid_cancel_hcam(9),pmcraid_cancel_ccn(9),pmcraid_cancel_ldn(9),pmcraid_expose_resource(9)pmcraid_netlink_init(9),pmcraid_netlink_release(9),pmcraid_notify_ccn(9),pmcraid_notify_ldn(9)pmcraid_notify_ioastate(9),pmcraid_handle_config_change(9),pmcraid_get_error_info(9),pmcraid_ioasc_logger(9)pmcraid_handle_error_log(9),pmcraid_process_ccn(9),pmcraid_process_ldn(9),pmcraid_register_hcams(9)pmcraid_unregister_hcams(9),pmcraid_reset_enable_ioa(9),pmcraid_soft_reset(9),pmcraid_get_dump(9)pmcraid_fail_outstanding_cmds(9),pmcraid_ioa_reset(9),pmcraid_initiate_reset(9),pmcraid_reset_reload(9)pmcraid_reset_bringdown(9),pmcraid_reset_bringup(9),pmcraid_request_sense(9),pmcraid_cancel_all(9)pmcraid_frame_auto_sense(9),pmcraid_error_handler(9),pmcraid_reset_device(9),_pmcraid_io_done(9)pmcraid_io_done(9),pmcraid_abort_cmd(9),pmcraid_abort_complete(9),pmcraid_eh_abort_handler(9)pmcraid_eh_device_reset_handler(9),pmcraid_eh_host_reset_handler(9),pmcraid_init_ioadls(9),pmcraid_build_ioadl(9)pmcraid_queuecommand_lck(9),pmcraid_ioctl_driver(9),pmcraid_check_ioctl_buffer(9),pmcraid_show_log_level(9)pmcraid_store_log_level(9),pmcraid_show_drv_version(9),pmcraid_show_adapter_id(9),pmcraid_isr(9)pmcraid_worker_function(9),pmcraid_tasklet_function(9),pmcraid_unregister_interrupt_handler(9),pmcraid_register_interrupt_handler(9)pmcraid_release_cmd_blocks(9),pmcraid_release_control_blocks(9),pmcraid_allocate_cmd_blocks(9),pmcraid_allocate_control_blocks(9)pmcraid_release_host_rrqs(9),pmcraid_allocate_host_rrqs(9),pmcraid_release_hcams(9),pmcraid_allocate_hcams(9)pmcraid_release_config_buffers(9),pmcraid_allocate_config_buffers(9),pmcraid_init_tasklets(9),pmcraid_kill_tasklets(9)pmcraid_release_buffers(9),pmcraid_reinit_buffers(9),pmcraid_init_instance(9),pmcraid_shutdown(9)pmcraid_setup_chrdev(9),pmcraid_release_chrdev(9),pmcraid_remove(9),pmcraid_suspend(9)pmcraid_resume(9),pmcraid_complete_ioa_reset(9),pmcraid_set_supported_devs(9),pmcraid_set_timestamp(9)pmcraid_init_res_table(9),pmcraid_querycfg(9),pmcraid_probe(9),pmcraid_init(9)pmcraid_exit(9)
like i said. absolutely unhinged cross-reference list and honestly? obsessed π
and that's the page!! source lives in ./drivers/scsi, dated October 2026 β so she's recent, she's relevant, she's serving kernel documentation realness πβ¨ mwah, go allocate responsibly bestie π«Άπ
π¦ 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