€•æ:Œ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”Œ*/translations/zh_CN/driver-api/usb/anchors”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/zh_TW/driver-api/usb/anchors”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/driver-api/usb/anchors”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/driver-api/usb/anchors”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/driver-api/usb/anchors”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/sp_SP/driver-api/usb/anchors”Œ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Œ USB Anchors”h]”hŒ USB Anchors”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒD/var/lib/git/docbuild/linux/Documentation/driver-api/usb/anchors.rst”h Kubh¢)”}”(hhh]”(h§)”}”(hŒWhat is anchor?”h]”hŒWhat is anchor?”…””}”(hhºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh·hžhhŸh¶h KubhŒ paragraph”“”)”}”(hXVA USB driver needs to support some callbacks requiring a driver to cease all IO to an interface. To do so, a driver has to keep track of the URBs it has submitted to know they've all completed or to call usb_kill_urb for them. The anchor is a data structure takes care of keeping track of URBs and provides methods to deal with multiple URBs.”h]”hXXA USB driver needs to support some callbacks requiring a driver to cease all IO to an interface. To do so, a driver has to keep track of the URBs it has submitted to know they’ve all completed or to call usb_kill_urb for them. The anchor is a data structure takes care of keeping track of URBs and provides methods to deal with multiple URBs.”…””}”(hhÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubeh}”(h]”Œwhat-is-anchor”ah ]”h"]”Œwhat is anchor?”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒAllocation and Initialisation”h]”hŒAllocation and Initialisation”…””}”(hhãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhàhžhhŸh¶h KubhÉ)”}”(hŒœThere's no API to allocate an anchor. It is simply declared as struct usb_anchor. :c:func:`init_usb_anchor` must be called to initialise the data structure.”h]”(hŒTThere’s no API to allocate an anchor. It is simply declared as struct usb_anchor. ”…””}”(hhñhžhhŸNh Nubh)”}”(hŒ:c:func:`init_usb_anchor`”h]”hŒliteral”“”)”}”(hhûh]”hŒinit_usb_anchor()”…””}”(hhÿhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œc”Œc-func”eh"]”h$]”h&]”uh1hýhhùubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œdriver-api/usb/anchors”Œ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ reftarget”Œinit_usb_anchor”uh1hhŸh¶h KhhñubhŒ1 must be called to initialise the data structure.”…””}”(hhñhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khhàhžhubeh}”(h]”Œallocation-and-initialisation”ah ]”h"]”Œallocation and initialisation”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ Deallocation”h]”hŒ Deallocation”…””}”(hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj0hžhhŸh¶h KubhÉ)”}”(hŒnOnce it has no more URBs associated with it, the anchor can be freed with normal memory management operations.”h]”hŒnOnce it has no more URBs associated with it, the anchor can be freed with normal memory management operations.”…””}”(hjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj0hžhubeh}”(h]”Œ deallocation”ah ]”h"]”Œ deallocation”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ3Association and disassociation of URBs with anchors”h]”hŒ3Association and disassociation of URBs with anchors”…””}”(hjZhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjWhžhhŸh¶h KubhÉ)”}”(hXnAn association of URBs to an anchor is made by an explicit call to :c:func:`usb_anchor_urb`. The association is maintained until an URB is finished by (successful) completion. Thus disassociation is automatic. A function is provided to forcibly finish (kill) all URBs associated with an anchor. Furthermore, disassociation can be made with :c:func:`usb_unanchor_urb`”h]”(hŒCAn association of URBs to an anchor is made by an explicit call to ”…””}”(hjhhžhhŸNh Nubh)”}”(hŒ:c:func:`usb_anchor_urb`”h]”hþ)”}”(hjrh]”hŒusb_anchor_urb()”…””}”(hjthžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhjpubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_anchor_urb”uh1hhŸh¶h KhjhubhŒù. The association is maintained until an URB is finished by (successful) completion. Thus disassociation is automatic. A function is provided to forcibly finish (kill) all URBs associated with an anchor. Furthermore, disassociation can be made with ”…””}”(hjhhžhhŸNh Nubh)”}”(hŒ:c:func:`usb_unanchor_urb`”h]”hþ)”}”(hj•h]”hŒusb_unanchor_urb()”…””}”(hj—hžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhj“ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_unanchor_urb”uh1hhŸh¶h Khjhubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KhjWhžhubeh}”(h]”Œ3association-and-disassociation-of-urbs-with-anchors”ah ]”h"]”Œ3association and disassociation of urbs with anchors”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ Operations on multitudes of URBs”h]”hŒ Operations on multitudes of URBs”…””}”(hjÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÀhžhhŸh¶h K'ubh¢)”}”(hhh]”(h§)”}”(hŒ :c:func:`usb_kill_anchored_urbs`”h]”h)”}”(hjÖh]”hþ)”}”(hjÖh]”hŒusb_kill_anchored_urbs()”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhjØubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_kill_anchored_urbs”uh1hhŸh¶h K)hjÔubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjÑhžhhŸh¶h K*ubhÉ)”}”(hŒ¡This function kills all URBs associated with an anchor. The URBs are called in the reverse temporal order they were submitted. This way no data can be reordered.”h]”hŒ¡This function kills all URBs associated with an anchor. The URBs are called in the reverse temporal order they were submitted. This way no data can be reordered.”…””}”(hjühžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K,hjÑhžhubeh}”(h]”Œusb-kill-anchored-urbs”ah ]”h"]”Œusb_kill_anchored_urbs()”ah$]”h&]”uh1h¡hjÀhžhhŸh¶h K*ubh¢)”}”(hhh]”(h§)”}”(hŒ":c:func:`usb_unlink_anchored_urbs`”h]”h)”}”(hjh]”hþ)”}”(hjh]”hŒusb_unlink_anchored_urbs()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_unlink_anchored_urbs”uh1hhŸh¶h K0hjubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h K1ubhÉ)”}”(hXfThis function unlinks all URBs associated with an anchor. The URBs are processed in the reverse temporal order they were submitted. This is similar to :c:func:`usb_kill_anchored_urbs`, but it will not sleep. Therefore no guarantee is made that the URBs have been unlinked when the call returns. They may be unlinked later but will be unlinked in finite time.”h]”(hŒ—This function unlinks all URBs associated with an anchor. The URBs are processed in the reverse temporal order they were submitted. This is similar to ”…””}”(hj=hžhhŸNh Nubh)”}”(hŒ :c:func:`usb_kill_anchored_urbs`”h]”hþ)”}”(hjGh]”hŒusb_kill_anchored_urbs()”…””}”(hjIhžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhjEubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_kill_anchored_urbs”uh1hhŸh¶h K4hj=ubhŒ¯, but it will not sleep. Therefore no guarantee is made that the URBs have been unlinked when the call returns. They may be unlinked later but will be unlinked in finite time.”…””}”(hj=hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K4hjhžhubeh}”(h]”Œusb-unlink-anchored-urbs”ah ]”h"]”Œusb_unlink_anchored_urbs()”ah$]”h&]”uh1h¡hjÀhžhhŸh¶h K1ubh¢)”}”(hhh]”(h§)”}”(hŒ#:c:func:`usb_scuttle_anchored_urbs`”h]”h)”}”(hj{h]”hþ)”}”(hj{h]”hŒusb_scuttle_anchored_urbs()”…””}”(hj€hžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhj}ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_scuttle_anchored_urbs”uh1hhŸh¶h K;hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjvhžhhŸh¶h Khjvhžhubeh}”(h]”Œusb-scuttle-anchored-urbs”ah ]”h"]”Œusb_scuttle_anchored_urbs()”ah$]”h&]”uh1h¡hjÀhžhhŸh¶h Kh]”hþ)”}”(hj>h]”hŒusb_get_from_anchor()”…””}”(hjChžhhŸNh Nubah}”(h]”h ]”(j j Œc-func”eh"]”h$]”h&]”uh1hýhj@ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jŒusb_get_from_anchor”uh1hhŸh¶h KMhj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj9hžhhŸh¶h KNubhÉ)”}”(hŒçReturns the oldest anchored URB of an anchor. The URB is unanchored and returned with a reference. As you may mix URBs to several destinations in one anchor you have no guarantee the chronologically first submitted URB is returned.”h]”hŒçReturns the oldest anchored URB of an anchor. The URB is unanchored and returned with a reference. As you may mix URBs to several destinations in one anchor you have no guarantee the chronologically first submitted URB is returned.”…””}”(hjdhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KPhj9hžhubeh}”(h]”Œusb-get-from-anchor”ah ]”h"]”Œusb_get_from_anchor()”ah$]”h&]”uh1h¡hjÀhžhhŸh¶h KNubeh}”(h]”Œ operations-on-multitudes-of-urbs”ah ]”h"]”Œ operations on multitudes of urbs”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K'ubeh}”(h]”Œ usb-anchors”ah ]”h"]”Œ usb anchors”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„hÝhÚj-j*jTjQj½jºjj|jj jsjpj´j±jõjòj6j3jwjtuŒ nametypes”}”(j‡‰h݉j-‰jT‰j½‰j‰j‰js‰j´‰jõ‰j6‰jw‰uh}”(j„h£hÚh·j*hàjQj0jºjWj|jÀj jÑjpjj±jvjòj·j3jøjtj9uŒ 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.