€•B5Œ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/pt_BR/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. ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:c:func:`init_usb_anchor`”h]”hŒliteral”“”)”}”(hjh]”hŒinit_usb_anchor()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œc”Œc-func”eh"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œdriver-api/usb/anchors”Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ reftarget”Œinit_usb_anchor”uh1hh³hÊh´KhjubhŒ1 must be called to initialise the data structure.”…””}”(hjh²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”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjDh²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.”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhjDh²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”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjkh²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 ”…””}”(hj|h²hh³Nh´Nubh)”}”(hŒ:c:func:`usb_anchor_urb`”h]”j)”}”(hj†h]”hŒusb_anchor_urb()”…””}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhj„ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j*Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j0Œusb_anchor_urb”uh1hh³hÊh´Khj|ubhŒù. 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 ”…””}”(hj|h²hh³Nh´Nubh)”}”(hŒ:c:func:`usb_unanchor_urb`”h]”j)”}”(hj©h]”hŒusb_unanchor_urb()”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhj§ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j*Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j0Œusb_unanchor_urb”uh1hh³hÊh´Khj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjkh²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]”j)”}”(hjêh]”hŒusb_kill_anchored_urbs()”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhjìubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j*Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j0Œ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.”…””}”(hjh²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_scuttle_anchored_urbs`”h]”h)”}”(hj+h]”j)”}”(hj+h]”hŒusb_scuttle_anchored_urbs()”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhj-ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j*Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j0Œusb_scuttle_anchored_urbs”uh1hh³hÊh´K0hj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj&h²hh³hÊh´K1ubhÝ)”}”(hŒ.All URBs of an anchor are unanchored en masse.”h]”hŒ.All URBs of an anchor are unanchored en masse.”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K3hj&h²hubeh}”(h]”Œusb-scuttle-anchored-urbs”ah ]”h"]”Œusb_scuttle_anchored_urbs()”ah$]”h&]”uh1hµhjÔh²hh³hÊh´K1ubh¶)”}”(hhh]”(h»)”}”(hŒ':c:func:`usb_wait_anchor_empty_timeout`”h]”h)”}”(hjlh]”j)”}”(hjlh]”hŒusb_wait_anchor_empty_timeout()”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhjnubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j*Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j0Œusb_wait_anchor_empty_timeout”uh1hh³hÊh´K5hjjubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjgh²hh³hÊh´K6ubhÝ)”}”(hŒ©This function waits for all URBs associated with an anchor to finish or a timeout, whichever comes first. Its return value will tell you whether the timeout was reached.”h]”hŒ©This function waits for all URBs associated with an anchor to finish or a timeout, whichever comes first. Its return value will tell you whether the timeout was reached.”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K8hjgh²hubeh}”(h]”Œusb-wait-anchor-empty-timeout”ah ]”h"]”Œusb_wait_anchor_empty_timeout()”ah$]”h&]”uh1hµhjÔh²hh³hÊh´K6ubh¶)”}”(hhh]”(h»)”}”(hŒ:c:func:`usb_anchor_empty`”h]”h)”}”(hj­h]”j)”}”(hj­h]”hŒusb_anchor_empty()”…””}”(hj²h²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhj¯ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j*Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j0Œusb_anchor_empty”uh1hh³hÊh´KjhjejÑjÎj/j,j#j jdjaj¥j¢jæjãj'j$uŒ nametypes”}”(j7‰hñ‰jA‰jh‰jщj/‰j#‰jd‰j¥‰jæ‰j'‰uh}”(j4h·hîhËj>hôjejDjÎjkj,jÔj jåjaj&j¢jgjãj¨j$jéuŒ 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.