€•~/Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ6/translations/zh_CN/driver-api/firmware/firmware_cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/zh_TW/driver-api/firmware/firmware_cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/it_IT/driver-api/firmware/firmware_cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ja_JP/driver-api/firmware/firmware_cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ko_KR/driver-api/firmware/firmware_cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/sp_SP/driver-api/firmware/firmware_cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒFirmware cache”h]”hŒFirmware cache”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒP/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/firmware_cache.rst”h KubhŒ paragraph”“”)”}”(hX6When Linux resumes from suspend some device drivers require firmware lookups to re-initialize devices. During resume there may be a period of time during which firmware lookups are not possible, during this short period of time firmware requests will fail. Time is of essence though, and delaying drivers to wait for the root filesystem for firmware delays user experience with device functionality. In order to support these requirements the firmware infrastructure implements a firmware cache for device drivers for most API calls, automatically behind the scenes.”h]”hX6When Linux resumes from suspend some device drivers require firmware lookups to re-initialize devices. During resume there may be a period of time during which firmware lookups are not possible, during this short period of time firmware requests will fail. Time is of essence though, and delaying drivers to wait for the root filesystem for firmware delays user experience with device functionality. In order to support these requirements the firmware infrastructure implements a firmware cache for device drivers for most API calls, automatically behind the scenes.”…””}”(hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒìThe firmware cache makes using certain firmware API calls safe during a device driver's suspend and resume callback. Users of these API calls needn't cache the firmware by themselves for dealing with firmware loss during system resume.”h]”hŒðThe firmware cache makes using certain firmware API calls safe during a device driver’s suspend and resume callback. Users of these API calls needn’t cache the firmware by themselves for dealing with firmware loss during system resume.”…””}”(hhÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hXGThe firmware cache works by requesting for firmware prior to suspend and caching it in memory. Upon resume device drivers using the firmware API will have access to the firmware immediately, without having to wait for the root filesystem to mount or dealing with possible race issues with lookups as the root filesystem mounts.”h]”hXGThe firmware cache works by requesting for firmware prior to suspend and caching it in memory. Upon resume device drivers using the firmware API will have access to the firmware immediately, without having to wait for the root filesystem to mount or dealing with possible race issues with lookups as the root filesystem mounts.”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒ;Some implementation details about the firmware cache setup:”h]”hŒ;Some implementation details about the firmware cache setup:”…””}”(hhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒThe firmware cache is setup by adding a devres entry for each device that uses all synchronous call except :c:func:`request_firmware_into_buf`. ”h]”h¸)”}”(hŒThe firmware cache is setup by adding a devres entry for each device that uses all synchronous call except :c:func:`request_firmware_into_buf`.”h]”(hŒkThe firmware cache is setup by adding a devres entry for each device that uses all synchronous call except ”…””}”(hhühžhhŸNh Nubh)”}”(hŒ#:c:func:`request_firmware_into_buf`”h]”hŒliteral”“”)”}”(hjh]”hŒrequest_firmware_into_buf()”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”(Œxref”Œc”Œc-func”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ"driver-api/firmware/firmware_cache”Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ reftarget”Œrequest_firmware_into_buf”uh1hhŸh¶h KhhüubhŒ.”…””}”(hhühžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khhøubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸh¶h Nubh÷)”}”(hXAIf an asynchronous call is used the firmware cache is only set up for a device if the second argument (uevent) to request_firmware_nowait() is true. When uevent is true it requests that a kobject uevent be sent to userspace for the firmware request through the sysfs fallback mechanism if the firmware file is not found. ”h]”h¸)”}”(hX@If an asynchronous call is used the firmware cache is only set up for a device if the second argument (uevent) to request_firmware_nowait() is true. When uevent is true it requests that a kobject uevent be sent to userspace for the firmware request through the sysfs fallback mechanism if the firmware file is not found.”h]”hX@If an asynchronous call is used the firmware cache is only set up for a device if the second argument (uevent) to request_firmware_nowait() is true. When uevent is true it requests that a kobject uevent be sent to userspace for the firmware request through the sysfs fallback mechanism if the firmware file is not found.”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khj9ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸh¶h Nubh÷)”}”(hŒ°If the firmware cache is determined to be needed as per the above two criteria the firmware cache is setup by adding a devres entry for the device making the firmware request. ”h]”h¸)”}”(hŒ¯If the firmware cache is determined to be needed as per the above two criteria the firmware cache is setup by adding a devres entry for the device making the firmware request.”h]”hŒ¯If the firmware cache is determined to be needed as per the above two criteria the firmware cache is setup by adding a devres entry for the device making the firmware request.”…””}”(hjUhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K#hjQubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸh¶h Nubh÷)”}”(hŒ¼The firmware devres entry is maintained throughout the lifetime of the device. This means that even if you release_firmware() the firmware cache will still be used on resume from suspend. ”h]”h¸)”}”(hŒ»The firmware devres entry is maintained throughout the lifetime of the device. This means that even if you release_firmware() the firmware cache will still be used on resume from suspend.”h]”hŒ»The firmware devres entry is maintained throughout the lifetime of the device. This means that even if you release_firmware() the firmware cache will still be used on resume from suspend.”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K'hjiubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸh¶h Nubh÷)”}”(hŒÓThe timeout for the fallback mechanism is temporarily reduced to 10 seconds as the firmware cache is set up during suspend, the timeout is set back to the old value you had configured after the cache is set up. ”h]”h¸)”}”(hŒÒThe timeout for the fallback mechanism is temporarily reduced to 10 seconds as the firmware cache is set up during suspend, the timeout is set back to the old value you had configured after the cache is set up.”h]”hŒÒThe timeout for the fallback mechanism is temporarily reduced to 10 seconds as the firmware cache is set up during suspend, the timeout is set back to the old value you had configured after the cache is set up.”…””}”(hj…hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K+hjubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸh¶h Nubh÷)”}”(hX$Upon suspend any pending non-uevent firmware requests are killed to avoid stalling the kernel, this is done with kill_requests_without_uevent(). Kernel calls requiring the non-uevent therefore need to implement their own firmware cache mechanism but must not use the firmware API on suspend. ”h]”h¸)”}”(hX#Upon suspend any pending non-uevent firmware requests are killed to avoid stalling the kernel, this is done with kill_requests_without_uevent(). Kernel calls requiring the non-uevent therefore need to implement their own firmware cache mechanism but must not use the firmware API on suspend.”h]”hX#Upon suspend any pending non-uevent firmware requests are killed to avoid stalling the kernel, this is done with kill_requests_without_uevent(). Kernel calls requiring the non-uevent therefore need to implement their own firmware cache mechanism but must not use the firmware API on suspend.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K/hj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1höhhóhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1hñhŸh¶h Khh£hžhubeh}”(h]”Œfirmware-cache”ah ]”h"]”Œfirmware cache”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jäŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”j¾j»sŒ nametypes”}”j¾‰sh}”j»h£sŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.