ufshcd_find_...ve_icc_level(9)
πΈ ufshcd_find_max_sup_active_icc_level(9) β your new fave kernel function π
okay so real talk, bestie: this page is from the Kernel API Manual (the header's a little shy and truncates it to ufshcd_find_...ve_icc_level(9), we love a mysterious queen π
), and the whole vibe is "how do I figure out the biggest ICC level this thing can handle?" Spoiler: it's giving power descriptor energy and I'm obsessed.
β¨ NAME β¨
ufshcd_find_max_sup_active_icc_level β calculate the max ICC level</p> π and fr fr, here's the tea: in case regulators are not initialized, we'll return 0. That's it, that's the whole personality. π«Ά
π SYNOPSIS π
u32 ufshcd_find_max_sup_active_icc_level (struct ufs_hba *hba , const u8
*desc_buf );
look at that signature. u32 return type, struct ufs_hba *hba, const u8 *desc_buf β no cap, it's iconic. β¨
π¦ ARGUMENTS π¦
hbaβ the per-adapter instance π« (your one special hba, main character energy)desc_bufβ the power descriptor buffer we're pulling the ICC levels out of π like, that's literally where the ICC levels live
π RETURN π
the calculated ICC level β that's the whole answer, bestie. no drama, just a u32 of vibes and numbers. β
β οΈ reminder bestie: if the regulators aren't initialized, it returns 0. don't come for me when you get a zero, that's the documented behaviour, not a bug π
π SEE ALSO π
okay this is the part where the manpage goes absolutely feral with the cross-references, and honestly? we respect the hustle. the kernel file is ./drivers/ufs/core/ufshcd.c β that's the mothership π β and everything else lives right here:
interrupts & friends π§
ufshcd_enable_intr(9),ufshcd_disable_intr(9),ufshcd_get_intr_mask(9),ufshcd_reset_intr_aggr(9),ufshcd_config_intr_aggr(9),ufshcd_disable_intr_aggr(9),ufshcd_intr(9),ufshcd_sl_intr(9),ufshcd_handle_mcq_cq_events(9),ufshcd_tmc_handler(9)
printing / debug royalty π
register & version reading πΈ
ufshcd_wait_for_register(9),ufshcd_get_ufs_version(9),ufshcd_is_device_present(9),ufshcd_get_tr_ocs(9),ufshcd_get_lists_status(9),ufshcd_get_upmcrs(9),ufshcd_hba_capabilities(9),ufshcd_is_hba_active(9),ufshcd_get_op_mode(9)
the transfer request list cleanup crew π§Ή
run-stop & hba start π₯
pm qos (the whole trilogy, slay) π
clocks, gears & devfreq scaling β‘
ufshcd_set_clk_freq(9),ufshcd_scale_clks(9),ufshcd_is_devfreq_scaling_required(9),ufshcd_scale_gear(9),ufshcd_devfreq_scale(9),ufshcd_hold(9)
command processing pause/resume βΈοΈ
sending commands & copying stuff π¬
UIC command pipeline (a whole saga) π«
ufshcd_ready_for_uic_cmd(9),ufshcd_dispatch_uic_cmd(9),ufshcd_wait_for_uic_cmd(9),__ufshcd_send_uic_cmd(9),ufshcd_send_uic_cmd(9),ufshcd_uic_cmd_compl(9),ufshcd_send_bsg_uic_cmd(9),ufshcd_uic_pwr_ctrl(9),ufshcd_uic_tx_eqtr(9),ufshcd_uic_change_pwr_mode(9)
SG mapping & UPIU composing π§©
ufshcd_sgl_to_prdt(9),ufshcd_map_sg(9),ufshcd_prepare_req_desc_hdr(9),ufshcd_prepare_utp_scsi_cmd_upiu(9),ufshcd_prepare_utp_query_req_upiu(9),ufshcd_compose_devman_upiu(9),ufshcd_comp_scsi_upiu(9),ufshcd_upiu_wlun_to_scsi_wlun(9)
queuecommand & device commands π―
queries (flags, attrs, descriptors β the whole menu) π
ufshcd_query_flag(9),ufshcd_query_attr(9),ufshcd_query_attr_retry(9),ufshcd_query_attr_qword(9),ufshcd_query_descriptor_retry(9),ufshcd_read_desc_param(9),struct uc_string_id(9),ufshcd_read_string_desc(9),ufshcd_read_unit_desc_param(9)
memory allocation π§
DME / link startup crew π
ufshcd_dme_link_startup(9),ufshcd_dme_reset(9),ufshcd_dme_enable(9),ufshcd_dme_set_attr(9),ufshcd_dme_get_attr(9),ufshcd_dme_rmw(9),ufshcd_link_startup(9)
power mode switching (very demure, very mindful) π
ufshcd_get_max_pwr_mode(9),ufshcd_dme_change_power_mode(9),ufshcd_change_power_mode(9),ufshcd_config_pwr_mode(9),ufshcd_set_dev_pwr_mode(9)
device init & hba operational π¦
ufshcd_complete_dev_init(9),ufshcd_make_hba_operational(9),ufshcd_verify_dev_init(9),ufshcd_setup_links(9)
scsi device land π
ufshcd_lu_init(9),ufshcd_sdev_init(9),ufshcd_change_queue_depth(9),ufshcd_sdev_configure(9),ufshcd_sdev_destroy(9),ufshcd_scsi_cmd_status(9),ufshcd_transfer_rsp_status(9),ufshcd_scsi_add_wlus(9),ufshcd_create_device_id(9)
completions (one cqe at a time bestie) β
ufshcd_compl_one_cqe(9),__ufshcd_transfer_req_compl(9),ufshcd_mcq_compl_pending_transfer(9),ufshcd_transfer_req_compl(9)
exception events & bkops π¨
ufshcd_disable_ee(9),ufshcd_enable_ee(9),ufshcd_enable_auto_bkops(9),ufshcd_disable_auto_bkops(9),ufshcd_force_reset_auto_bkops(9),ufshcd_bkops_ctrl(9),ufshcd_exception_event_handler(9),ufshcd_quirk_dl_nac_errors(9)
error handling (the dramatic arc) π
task management, abort & reset π
ufshcd_issue_tm_cmd(9),ufshcd_issue_devman_upiu_cmd(9),ufshcd_exec_raw_upiu_cmd(9),ufshcd_advanced_rpmb_req_handler(9),ufshcd_eh_device_reset_handler(9),ufshcd_try_to_abort_task(9),ufshcd_abort(9),ufshcd_host_reset_and_restore(9),ufshcd_reset_and_restore(9),ufshcd_eh_host_reset_handler(9)
icc levels (yes, our girl has siblings) π―
quirks, tune-ups & LUs ποΈ
probe & async scan π
suspend / resume (the nap era) π΄
ufshcd_suspend(9),ufshcd_resume(9),ufshcd_system_suspend(9),ufshcd_system_resume(9),ufshcd_runtime_suspend(9),ufshcd_runtime_resume(9)
teardown & lifecycle π§Ό
and finally, the mothership herself π
that's the whole list, every single cross-reference, not one skipped β we ate and left no crumbs π½οΈβ¨
sign-off time, bestie π this little masterpiece lives in ./drivers/ufs/core and it's dated October 2026 β so like, future iconic. go forth and calculate those ICC levels, you've got this π«ΆππΈ
π¦ 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