sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/core-api/librsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/core-api/librsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h*Reed-Solomon Library Programming Interfaceh]h*Reed-Solomon Library Programming Interface}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh/* the Reed Solomon control structure */ static struct rs_control *rs_decoder; /* Symbolsize is 10 (bits) * Primitive polynomial is x^10+x^3+1 * first consecutive root is 0 * primitive element to generate roots = 1 * generator polynomial degree (number of roots) = 6 */ rs_decoder = init_rs (10, 0x409, 0, 1, 6);h]hX>/* the Reed Solomon control structure */ static struct rs_control *rs_decoder; /* Symbolsize is 10 (bits) * Primitive polynomial is x^10+x^3+1 * first consecutive root is 0 * primitive element to generate roots = 1 * generator polynomial degree (number of roots) = 6 */ rs_decoder = init_rs (10, 0x409, 0, 1, 6);}(hhhjubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK)hjhhubeh}(h] initializingah ]h"] initializingah$]h&]uh1hhjchhhhhKubh)}(hhh](h)}(hEncodingh]hEncoding}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK6ubh)}(hThe encoder calculates the Reed-Solomon code over the given data length and stores the result in the parity buffer. Note that the parity buffer must be initialized before calling the encoder.h]hThe encoder calculates the Reed-Solomon code over the given data length and stores the result in the parity buffer. Note that the parity buffer must be initialized before calling the encoder.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hXThe expanded data can be inverted on the fly by providing a non-zero inversion mask. The expanded data is XOR'ed with the mask. This is used e.g. for FLASH ECC, where the all 0xFF is inverted to an all 0x00. The Reed-Solomon code for all 0x00 is all 0x00. The code is inverted before storing to FLASH so it is 0xFF too. This prevents that reading from an erased FLASH results in ECC errors.h]hXThe expanded data can be inverted on the fly by providing a non-zero inversion mask. The expanded data is XOR’ed with the mask. This is used e.g. for FLASH ECC, where the all 0xFF is inverted to an all 0x00. The Reed-Solomon code for all 0x00 is all 0x00. The code is inverted before storing to FLASH so it is 0xFF too. This prevents that reading from an erased FLASH results in ECC errors.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj:hhhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK3ubjq)}(h h]h }(hhhjLhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj:hhhjKhK3ubj)}(h rs_controlh]j)}(hj8h]h rs_control}(hhhj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubah}(h]h ](jjeh"]h$]h&]jjuh1jhj:hhhjKhK3ubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhj6hhhjKhK3ubah}(h]j1ah ](jjeh"]h$]h&]juh1jRhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK&hj3hhubj)}(hhh]h)}(h!rs control structure per instanceh]h!rs control structure per instance}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK2hj~hhubah}(h]h ]h"]h$]h&]uh1jhj3hhhjKhK3ubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjuh1jMhhhjhNhNubj)}(h**Definition**:: struct rs_control { struct rs_codec *codec; uint16_t buffers[]; }; **Members** ``codec`` The codec used for this instance ``buffers`` Internal scratch buffers used in calls to decode_rs()h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK6hjubj)}(hJstruct rs_control { struct rs_codec *codec; uint16_t buffers[]; };h]hJstruct rs_control { struct rs_codec *codec; uint16_t buffers[]; };}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK8hjubh)}(h **Members**h]j)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK=hjubj&)}(hhh](j+)}(h+``codec`` The codec used for this instance h](j1)}(h ``codec``h]j7)}(hjh]hcodec}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK4hjubjM)}(hhh]h)}(h The codec used for this instanceh]h The codec used for this instance}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK4hjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhK4hjubj+)}(hA``buffers`` Internal scratch buffers used in calls to decode_rs()h](j1)}(h ``buffers``h]j7)}(hj'h]hbuffers}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj%ubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK4hj!ubjM)}(hhh]h)}(h5Internal scratch buffers used in calls to decode_rs()h]h5Internal scratch buffers used in calls to decode_rs()}(hjBhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK5hj=ubah}(h]h ]h"]h$]h&]uh1jLhj!ubeh}(h]h ]h"]h$]h&]uh1j*hj<hK4hjubeh}(h]h ]h"]h$]h&]uh1j%hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jIinit_rs (C function) c.init_rshNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(hTstruct rs_control * init_rs (int symsize, int gfpoly, int fcr, int prim, int nroots)h]jY)}(hRstruct rs_control *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots)h](j_)}(hjbh]hstruct}(hhhjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj}hhhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKVubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj}hhhjhKVubh)}(hhh]j)}(h rs_controlh]h rs_control}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jinit_rssb c.init_rsasbuh1hhj}hhhjhKVubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj}hhhjhKVubhdesc_sig_punctuation)}(h*h]h*}(hhhjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj}hhhjhKVubj)}(hinit_rsh]j)}(hjh]hinit_rs}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhj}hhhjhKVubhdesc_parameterlist)}(h8(int symsize, int gfpoly, int fcr, int prim, int nroots)h](hdesc_parameter)}(h int symsizeh](hdesc_sig_keyword_type)}(hinth]hint}(hhhj hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j hj ubjq)}(h h]h }(hhhj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj ubj)}(hsymsizeh]hsymsize}(hhhj* hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(h int gfpolyh](j )}(hinth]hint}(hhhjC hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj? ubjq)}(h h]h }(hhhjQ hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj? ubj)}(hgfpolyh]hgfpoly}(hhhj_ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj? ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(hint fcrh](j )}(hinth]hint}(hhhjx hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjt ubjq)}(h h]h }(hhhj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjt ubj)}(hfcrh]hfcr}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(hint primh](j )}(hinth]hint}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjq)}(h h]h }(hhhj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj ubj)}(hprimh]hprim}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(h int nrootsh](j )}(hinth]hint}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjq)}(h h]h }(hhhj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj ubj)}(hnrootsh]hnroots}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubeh}(h]h ]h"]h$]h&]jjuh1jhj}hhhjhKVubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhjyhhhjhKVubah}(h]jtah ](jjeh"]h$]h&]juh1jRhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKahjvhhubj)}(hhh]h)}(h,Create a RS control struct and initialize ith]h,Create a RS control struct and initialize it}(hj+ hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKUhj& hhubah}(h]h ]h"]h$]h&]uh1jhjvhhhjhKVubeh}(h]h ](jfunctioneh"]h$]h&]jjjjA jjA juh1jMhhhjhNhNubj)}(hX**Parameters** ``int symsize`` the symbol size (number of bits) ``int gfpoly`` the extended Galois field generator polynomial coefficients, with the 0th coefficient in the low order bit. The polynomial must be primitive; ``int fcr`` the first consecutive root of the rs code generator polynomial in index form ``int prim`` primitive element to generate polynomial roots ``int nroots`` RS code generator polynomial degree (number of roots) **Description** Allocations use GFP_KERNEL.h](h)}(h**Parameters**h]j)}(hjK h]h Parameters}(hhhjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjI ubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKYhjE ubj&)}(hhh](j+)}(h1``int symsize`` the symbol size (number of bits) h](j1)}(h``int symsize``h]j7)}(hjj h]h int symsize}(hhhjl hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjh ubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKVhjd ubjM)}(hhh]h)}(h the symbol size (number of bits)h]h the symbol size (number of bits)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKVhj ubah}(h]h ]h"]h$]h&]uh1jLhjd ubeh}(h]h ]h"]h$]h&]uh1j*hj hKVhja ubj+)}(h``int gfpoly`` the extended Galois field generator polynomial coefficients, with the 0th coefficient in the low order bit. The polynomial must be primitive; h](j1)}(h``int gfpoly``h]j7)}(hj h]h int gfpoly}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKYhj ubjM)}(hhh]h)}(hthe extended Galois field generator polynomial coefficients, with the 0th coefficient in the low order bit. The polynomial must be primitive;h]hthe extended Galois field generator polynomial coefficients, with the 0th coefficient in the low order bit. The polynomial must be primitive;}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKWhj ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj hKYhja ubj+)}(hY``int fcr`` the first consecutive root of the rs code generator polynomial in index form h](j1)}(h ``int fcr``h]j7)}(hj h]hint fcr}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK[hj ubjM)}(hhh]h)}(hLthe first consecutive root of the rs code generator polynomial in index formh]hLthe first consecutive root of the rs code generator polynomial in index form}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKZhj ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj hK[hja ubj+)}(h<``int prim`` primitive element to generate polynomial roots h](j1)}(h ``int prim``h]j7)}(hj h]hint prim}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK\hj ubjM)}(hhh]h)}(h.primitive element to generate polynomial rootsh]h.primitive element to generate polynomial roots}(hj2 hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj, hK\hj- ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj, hK\hja ubj+)}(hE``int nroots`` RS code generator polynomial degree (number of roots) h](j1)}(h``int nroots``h]j7)}(hjP h]h int nroots}(hhhjR hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjN ubah}(h]h ]h"]h$]h&]uh1j0hU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK]hjJ ubjM)}(hhh]h)}(h5RS code generator polynomial degree (number of roots)h]h5RS code generator polynomial degree (number of roots)}(hjk hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhje hK]hjf ubah}(h]h ]h"]h$]h&]uh1jLhjJ ubeh}(h]h ]h"]h$]h&]uh1j*hje hK]hja ubeh}(h]h ]h"]h$]h&]uh1j%hjE ubh)}(h**Description**h]j)}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK_hjE ubh)}(hAllocations use GFP_KERNEL.h]hAllocations use GFP_KERNEL.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK_hjE ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h] structuresah ]h"] structuresah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hPublic Functions Providedh]hPublic Functions Provided}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hgThis chapter contains the autogenerated documentation of the Reed-Solomon functions which are exported.h]hgThis chapter contains the autogenerated documentation of the Reed-Solomon functions which are exported.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jIfree_rs (C function) c.free_rshNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(h$void free_rs (struct rs_control *rs)h]jY)}(h#void free_rs(struct rs_control *rs)h](j )}(hvoidh]hvoid}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chKubjq)}(h h]h }(hhhj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj hhhj hKubj)}(hfree_rsh]j)}(hfree_rsh]hfree_rs}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hKubj )}(h(struct rs_control *rs)h]j )}(hstruct rs_control *rsh](j_)}(hjbh]hstruct}(hhhj4 hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj0 ubjq)}(h h]h }(hhhjA hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj0 ubh)}(hhh]j)}(h rs_controlh]h rs_control}(hhhjR hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjT modnameN classnameNjj)}j]j)}jj sb c.free_rsasbuh1hhj0 ubjq)}(h h]h }(hhhjr hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj0 ubj)}(hjh]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0 ubj)}(hrsh]hrs}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0 ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj, ubah}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhj hhhj hKubah}(h]j ah ](jjeh"]h$]h&]juh1jRh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chKhj hhubj)}(hhh]h)}(hFree the rs control structureh]hFree the rs control structure}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chKhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj juh1jMhhhj hNhNubj)}(h**Parameters** ``struct rs_control *rs`` The control structure which is not longer used by the caller **Description** Free the control structure. If **rs** is the last user of the associated codec, free the codec as well.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chKhj ubj&)}(hhh]j+)}(hW``struct rs_control *rs`` The control structure which is not longer used by the caller h](j1)}(h``struct rs_control *rs``h]j7)}(hj h]hstruct rs_control *rs}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chKhj ubjM)}(hhh]h)}(hubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhhhjhM>ubj)}(h encode_rs8h]j)}(h encode_rs8h]h encode_rs8}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhM>ubj )}(hP(struct rs_control *rsc, uint8_t *data, int len, uint16_t *par, uint16_t invmsk)h](j )}(hstruct rs_control *rsch](j_)}(hjbh]hstruct}(hhhjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubh)}(hhh]j)}(h rs_controlh]h rs_control}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb c.encode_rs8asbuh1hhjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hrsch]hrsc}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(h uint8_t *datah](h)}(hhh]j)}(huint8_th]huint8_t}(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj@modnameN classnameNjj)}j]j c.encode_rs8asbuh1hhj7ubjq)}(h h]h }(hhhj\hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj7ubj)}(hjh]h*}(hhhjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hdatah]hdata}(hhhjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(hint lenh](j )}(hinth]hint}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hlenh]hlen}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.encode_rs8asbuh1hhjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hparh]hpar}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.encode_rs8asbuh1hhjubjq)}(h h]h }(hhhj;hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hinvmskh]hinvmsk}(hhhjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM>ubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhjhhhjhM>ubah}(h]jah ](jjeh"]h$]h&]juh1jRh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMHhjhhubj)}(hhh]h)}(h6Calculate the parity for data values (8bit data width)h]h6Calculate the parity for data values (8bit data width)}(hjvhjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM=hjqhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM>ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjuh1jMhhhj hNhNubj)}(hX**Parameters** ``struct rs_control *rsc`` the rs control structure ``uint8_t *data`` data field of a given type ``int len`` data length ``uint16_t *par`` parity data, must be initialized by caller (usually all 0) ``uint16_t invmsk`` invert data mask (will be xored on data) The parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of encoding of the syndrome result for storage itself.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMAhjubj&)}(hhh](j+)}(h4``struct rs_control *rsc`` the rs control structure h](j1)}(h``struct rs_control *rsc``h]j7)}(hjh]hstruct rs_control *rsc}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM>hjubjM)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM>hjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhM>hjubj+)}(h-``uint8_t *data`` data field of a given type h](j1)}(h``uint8_t *data``h]j7)}(hjh]h uint8_t *data}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM?hjubjM)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM?hjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhM?hjubj+)}(h``int len`` data length h](j1)}(h ``int len``h]j7)}(hj'h]hint len}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj%ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM@hj!ubjM)}(hhh]h)}(h data lengthh]h data length}(hjBhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hM@hj=ubah}(h]h ]h"]h$]h&]uh1jLhj!ubeh}(h]h ]h"]h$]h&]uh1j*hj<hM@hjubj+)}(hM``uint16_t *par`` parity data, must be initialized by caller (usually all 0) h](j1)}(h``uint16_t *par``h]j7)}(hj`h]h uint16_t *par}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj^ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMAhjZubjM)}(hhh]h)}(h:parity data, must be initialized by caller (usually all 0)h]h:parity data, must be initialized by caller (usually all 0)}(hj{hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhMAhjvubah}(h]h ]h"]h$]h&]uh1jLhjZubeh}(h]h ]h"]h$]h&]uh1j*hjuhMAhjubj+)}(h``uint16_t invmsk`` invert data mask (will be xored on data) The parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of encoding of the syndrome result for storage itself.h](j1)}(h``uint16_t invmsk``h]j7)}(hjh]huint16_t invmsk}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMEhjubjM)}(hhh](h)}(h(invert data mask (will be xored on data)h]h(invert data mask (will be xored on data)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMBhjubh)}(hThe parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of encoding of the syndrome result for storage itself.h]hThe parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of encoding of the syndrome result for storage itself.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMDhjubeh}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhMEhjubeh}(h]h ]h"]h$]h&]uh1j%hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jIdecode_rs8 (C function) c.decode_rs8hNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(hint decode_rs8 (struct rs_control *rsc, uint8_t *data, uint16_t *par, int len, uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, uint16_t *corr)h]jY)}(hint decode_rs8(struct rs_control *rsc, uint8_t *data, uint16_t *par, int len, uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, uint16_t *corr)h](j )}(hinth]hint}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMSubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhhhjhMSubj)}(h decode_rs8h]j)}(h decode_rs8h]h decode_rs8}(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMSubj )}(h(struct rs_control *rsc, uint8_t *data, uint16_t *par, int len, uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, uint16_t *corr)h](j )}(hstruct rs_control *rsch](j_)}(hjbh]hstruct}(hhhj?hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj;ubjq)}(h h]h }(hhhjLhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj;ubh)}(hhh]j)}(h rs_controlh]h rs_control}(hhhj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_modnameN classnameNjj)}j]j)}jj%sb c.decode_rs8asbuh1hhj;ubjq)}(h h]h }(hhhj}hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj;ubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubj)}(hrsch]hrsc}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(h uint8_t *datah](h)}(hhh]j)}(huint8_th]huint8_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jy c.decode_rs8asbuh1hhjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdatah]hdata}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jy c.decode_rs8asbuh1hhjubjq)}(h h]h }(hhhj'hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hparh]hpar}(hhhjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(hint lenh](j )}(hinth]hint}(hhhj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubjq)}(h h]h }(hhhjihhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjWubj)}(hlenh]hlen}(hhhjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(h uint16_t *sh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jy c.decode_rs8asbuh1hhjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsh]hs}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(h int no_erash](j )}(hinth]hint}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hno_erash]hno_eras}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(h int *eras_posh](j )}(hinth]hint}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjq)}(h h]h }(hhhj(hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(heras_posh]heras_pos}(hhhjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjamodnameN classnameNjj)}j]jy c.decode_rs8asbuh1hhjXubjq)}(h h]h }(hhhj}hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjXubj)}(hinvmskh]hinvmsk}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubj )}(huint16_t *corrh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jy c.decode_rs8asbuh1hhjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hcorrh]hcorr}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj7ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMSubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhjhhhjhMSubah}(h]jah ](jjeh"]h$]h&]juh1jRh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMihjhhubj)}(hhh]h)}(h!Decode codeword (8bit data width)h]h!Decode codeword (8bit data width)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMRhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMSubeh}(h]h ](jfunctioneh"]h$]h&]jjjj#jj#juh1jMhhhj hNhNubj)}(hX**Parameters** ``struct rs_control *rsc`` the rs control structure ``uint8_t *data`` data field of a given type ``uint16_t *par`` received parity data field ``int len`` data length ``uint16_t *s`` syndrome data field, must be in index form (if NULL, syndrome is calculated) ``int no_eras`` number of erasures ``int *eras_pos`` position of erasures, can be NULL ``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) ``uint16_t *corr`` buffer to store correction bitmask on eras_pos The syndrome and parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of decoding of the syndrome result and the received parity before calling this code. **Note** The rs_control struct **rsc** contains buffers which are used for decoding, so the caller has to ensure that decoder invocations are serialized. Returns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.h](h)}(h**Parameters**h]j)}(hj-h]h Parameters}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMVhj'ubj&)}(hhh](j+)}(h4``struct rs_control *rsc`` the rs control structure h](j1)}(h``struct rs_control *rsc``h]j7)}(hjLh]hstruct rs_control *rsc}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjJubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMShjFubjM)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hjghjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMShjbubah}(h]h ]h"]h$]h&]uh1jLhjFubeh}(h]h ]h"]h$]h&]uh1j*hjahMShjCubj+)}(h-``uint8_t *data`` data field of a given type h](j1)}(h``uint8_t *data``h]j7)}(hjh]h uint8_t *data}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMThjubjM)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMThjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhMThjCubj+)}(h-``uint16_t *par`` received parity data field h](j1)}(h``uint16_t *par``h]j7)}(hjh]h uint16_t *par}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMUhjubjM)}(hhh]h)}(hreceived parity data fieldh]hreceived parity data field}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMUhjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhMUhjCubj+)}(h``int len`` data length h](j1)}(h ``int len``h]j7)}(hjh]hint len}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMVhjubjM)}(hhh]h)}(h data lengthh]h data length}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMVhj ubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hj hMVhjCubj+)}(h]``uint16_t *s`` syndrome data field, must be in index form (if NULL, syndrome is calculated) h](j1)}(h``uint16_t *s``h]j7)}(hj0h]h uint16_t *s}(hhhj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj.ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMXhj*ubjM)}(hhh]h)}(hLsyndrome data field, must be in index form (if NULL, syndrome is calculated)h]hLsyndrome data field, must be in index form (if NULL, syndrome is calculated)}(hjKhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMWhjFubah}(h]h ]h"]h$]h&]uh1jLhj*ubeh}(h]h ]h"]h$]h&]uh1j*hjEhMXhjCubj+)}(h#``int no_eras`` number of erasures h](j1)}(h``int no_eras``h]j7)}(hjjh]h int no_eras}(hhhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjhubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMYhjdubjM)}(hhh]h)}(hnumber of erasuresh]hnumber of erasures}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMYhjubah}(h]h ]h"]h$]h&]uh1jLhjdubeh}(h]h ]h"]h$]h&]uh1j*hjhMYhjCubj+)}(h4``int *eras_pos`` position of erasures, can be NULL h](j1)}(h``int *eras_pos``h]j7)}(hjh]h int *eras_pos}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMZhjubjM)}(hhh]h)}(h!position of erasures, can be NULLh]h!position of erasures, can be NULL}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMZhjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhMZhjCubj+)}(hM``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) h](j1)}(h``uint16_t invmsk``h]j7)}(hjh]huint16_t invmsk}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM[hjubjM)}(hhh]h)}(h8invert data mask (will be xored on data, not on parity!)h]h8invert data mask (will be xored on data, not on parity!)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM[hjubah}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hjhM[hjCubj+)}(hX``uint16_t *corr`` buffer to store correction bitmask on eras_pos The syndrome and parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of decoding of the syndrome result and the received parity before calling this code. h](j1)}(h``uint16_t *corr``h]j7)}(hjh]huint16_t *corr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM`hjubjM)}(hhh](h)}(h.buffer to store correction bitmask on eras_posh]h.buffer to store correction bitmask on eras_pos}(hj0hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM\hj+ubh)}(hThe syndrome and parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of decoding of the syndrome result and the received parity before calling this code.h]hThe syndrome and parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of decoding of the syndrome result and the received parity before calling this code.}(hj?hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM^hj+ubeh}(h]h ]h"]h$]h&]uh1jLhjubeh}(h]h ]h"]h$]h&]uh1j*hj*hM`hjCubeh}(h]h ]h"]h$]h&]uh1j%hj'ubh)}(h**Note**h]j)}(hj`h]hNote}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMbhj'ubj&)}(hhh]j+)}(hXThe rs_control struct **rsc** contains buffers which are used for decoding, so the caller has to ensure that decoder invocations are serialized. Returns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.h](j1)}(hAThe rs_control struct **rsc** contains buffers which are used forh](hThe rs_control struct }(hThe rs_control struct hj}hhhNhNubj)}(h**rsc**h]hrsc}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubh$ contains buffers which are used for}(h$ contains buffers which are used forhj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMfhjyubjM)}(hhh](h)}(hNdecoding, so the caller has to ensure that decoder invocations are serialized.h]hNdecoding, so the caller has to ensure that decoder invocations are serialized.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMchjubh)}(hvReturns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.h]hvReturns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMfhjubeh}(h]h ]h"]h$]h&]uh1jLhjyubeh}(h]h ]h"]h$]h&]uh1j*hjhMfhjvubah}(h]h ]h"]h$]h&]uh1j%hj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jIencode_rs16 (C function) c.encode_rs16hNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(haint encode_rs16 (struct rs_control *rsc, uint16_t *data, int len, uint16_t *par, uint16_t invmsk)h]jY)}(h`int encode_rs16(struct rs_control *rsc, uint16_t *data, int len, uint16_t *par, uint16_t invmsk)h](j )}(hinth]hint}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMuubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhhhjhMuubj)}(h encode_rs16h]j)}(h encode_rs16h]h encode_rs16}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMuubj )}(hQ(struct rs_control *rsc, uint16_t *data, int len, uint16_t *par, uint16_t invmsk)h](j )}(hstruct rs_control *rsch](j_)}(hjbh]hstruct}(hhhj/hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj+ubjq)}(h h]h }(hhhj<hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj+ubh)}(hhh]j)}(h rs_controlh]h rs_control}(hhhjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjOmodnameN classnameNjj)}j]j)}jjsb c.encode_rs16asbuh1hhj+ubjq)}(h h]h }(hhhjmhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj+ubj)}(hjh]h*}(hhhj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj)}(hrsch]hrsc}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj'ubj )}(huint16_t *datah](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]ji c.encode_rs16asbuh1hhjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdatah]hdata}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj'ubj )}(hint lenh](j )}(hinth]hint}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hlenh]hlen}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj'ubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0modnameN classnameNjj)}j]ji c.encode_rs16asbuh1hhj'ubjq)}(h h]h }(hhhjLhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj'ubj)}(hjh]h*}(hhhjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(hparh]hpar}(hhhjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj'ubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]ji c.encode_rs16asbuh1hhj|ubjq)}(h h]h }(hhhjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj|ubj)}(hinvmskh]hinvmsk}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj'ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMuubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhjhhhjhMuubah}(h]jah ](jjeh"]h$]h&]juh1jRh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM}hjhhubj)}(hhh]h)}(h7Calculate the parity for data values (16bit data width)h]h7Calculate the parity for data values (16bit data width)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMthjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMuubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjuh1jMhhhj hNhNubj)}(hX**Parameters** ``struct rs_control *rsc`` the rs control structure ``uint16_t *data`` data field of a given type ``int len`` data length ``uint16_t *par`` parity data, must be initialized by caller (usually all 0) ``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) Each field in the data array contains up to symbol size bits of valid data.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMxhjubj&)}(hhh](j+)}(h4``struct rs_control *rsc`` the rs control structure h](j1)}(h``struct rs_control *rsc``h]j7)}(hj h]hstruct rs_control *rsc}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMuhj ubjM)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hj6 hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0 hMuhj1 ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj0 hMuhj ubj+)}(h.``uint16_t *data`` data field of a given type h](j1)}(h``uint16_t *data``h]j7)}(hjT h]huint16_t *data}(hhhjV hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjR ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMvhjN ubjM)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hjo hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji hMvhjj ubah}(h]h ]h"]h$]h&]uh1jLhjN ubeh}(h]h ]h"]h$]h&]uh1j*hji hMvhj ubj+)}(h``int len`` data length h](j1)}(h ``int len``h]j7)}(hj h]hint len}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMwhj ubjM)}(hhh]h)}(h data lengthh]h data length}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMwhj ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj hMwhj ubj+)}(hM``uint16_t *par`` parity data, must be initialized by caller (usually all 0) h](j1)}(h``uint16_t *par``h]j7)}(hj h]h uint16_t *par}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMxhj ubjM)}(hhh]h)}(h:parity data, must be initialized by caller (usually all 0)h]h:parity data, must be initialized by caller (usually all 0)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMxhj ubah}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj hMxhj ubj+)}(h``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) Each field in the data array contains up to symbol size bits of valid data.h](j1)}(h``uint16_t invmsk``h]j7)}(hj h]huint16_t invmsk}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMzhj ubjM)}(hhh](h)}(h8invert data mask (will be xored on data, not on parity!)h]h8invert data mask (will be xored on data, not on parity!)}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMyhj!ubh)}(hKEach field in the data array contains up to symbol size bits of valid data.h]hKEach field in the data array contains up to symbol size bits of valid data.}(hj)!hj'!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM{hj!ubeh}(h]h ]h"]h$]h&]uh1jLhj ubeh}(h]h ]h"]h$]h&]uh1j*hj!hMzhj ubeh}(h]h ]h"]h$]h&]uh1j%hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jIdecode_rs16 (C function) c.decode_rs16hNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(hint decode_rs16 (struct rs_control *rsc, uint16_t *data, uint16_t *par, int len, uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, uint16_t *corr)h]jY)}(hint decode_rs16(struct rs_control *rsc, uint16_t *data, uint16_t *par, int len, uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, uint16_t *corr)h](j )}(hinth]hint}(hhhjh!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjd!hhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMubjq)}(h h]h }(hhhjw!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjd!hhhjv!hMubj)}(h decode_rs16h]j)}(h decode_rs16h]h decode_rs16}(hhhj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjd!hhhjv!hMubj )}(h(struct rs_control *rsc, uint16_t *data, uint16_t *par, int len, uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, uint16_t *corr)h](j )}(hstruct rs_control *rsch](j_)}(hjbh]hstruct}(hhhj!hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj!ubjq)}(h h]h }(hhhj!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj!ubh)}(hhh]j)}(h rs_controlh]h rs_control}(hhhj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj!modnameN classnameNjj)}j]j)}jj!sb c.decode_rs16asbuh1hhj!ubjq)}(h h]h }(hhhj!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj!ubj)}(hjh]h*}(hhhj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(hrsch]hrsc}(hhhj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(huint16_t *datah](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]j! c.decode_rs16asbuh1hhj"ubjq)}(h h]h }(hhhj8"hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj"ubj)}(hjh]h*}(hhhjF"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hdatah]hdata}(hhhjS"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhjo"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjl"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjq"modnameN classnameNjj)}j]j! c.decode_rs16asbuh1hhjh"ubjq)}(h h]h }(hhhj"hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjh"ubj)}(hjh]h*}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh"ubj)}(hparh]hpar}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(hint lenh](j )}(hinth]hint}(hhhj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubjq)}(h h]h }(hhhj"hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj"ubj)}(hlenh]hlen}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(h uint16_t *sh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]j! c.decode_rs16asbuh1hhj"ubjq)}(h h]h }(hhhj#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj"ubj)}(hjh]h*}(hhhj%#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hjh]hs}(hhhj2#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(h int no_erash](j )}(hinth]hint}(hhhjJ#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjF#ubjq)}(h h]h }(hhhjX#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjF#ubj)}(hno_erash]hno_eras}(hhhjf#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(h int *eras_posh](j )}(hinth]hint}(hhhj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{#ubjq)}(h h]h }(hhhj#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj{#ubj)}(hjh]h*}(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{#ubj)}(heras_posh]heras_pos}(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]j! c.decode_rs16asbuh1hhj#ubjq)}(h h]h }(hhhj#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj#ubj)}(hinvmskh]hinvmsk}(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubj )}(huint16_t *corrh](h)}(hhh]j)}(huint16_th]huint16_t}(hhhj $hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj $ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj$modnameN classnameNjj)}j]j! c.decode_rs16asbuh1hhj$ubjq)}(h h]h }(hhhj*$hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj$ubj)}(hjh]h*}(hhhj8$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(hcorrh]hcorr}(hhhjE$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj!ubeh}(h]h ]h"]h$]h&]jjuh1jhjd!hhhjv!hMubeh}(h]h ]h"]h$]h&]jjjuh1jXjjhj`!hhhjv!hMubah}(h]j[!ah ](jjeh"]h$]h&]juh1jRh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj]!hhubj)}(hhh]h)}(h"Decode codeword (16bit data width)h]h"Decode codeword (16bit data width)}(hjr$hjp$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhjm$hhubah}(h]h ]h"]h$]h&]uh1jhj]!hhhjv!hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj$jj$juh1jMhhhj hNhNubj)}(hX|**Parameters** ``struct rs_control *rsc`` the rs control structure ``uint16_t *data`` data field of a given type ``uint16_t *par`` received parity data field ``int len`` data length ``uint16_t *s`` syndrome data field, must be in index form (if NULL, syndrome is calculated) ``int no_eras`` number of erasures ``int *eras_pos`` position of erasures, can be NULL ``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) ``uint16_t *corr`` buffer to store correction bitmask on eras_pos Each field in the data array contains up to symbol size bits of valid data. **Note** The rc_control struct **rsc** contains buffers which are used for decoding, so the caller has to ensure that decoder invocations are serialized. Returns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.h](h)}(h**Parameters**h]j)}(hj$h]h Parameters}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj$ubj&)}(hhh](j+)}(h4``struct rs_control *rsc`` the rs control structure h](j1)}(h``struct rs_control *rsc``h]j7)}(hj$h]hstruct rs_control *rsc}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj$ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj$ubjM)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hj$hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jLhj$ubeh}(h]h ]h"]h$]h&]uh1j*hj$hMhj$ubj+)}(h.``uint16_t *data`` data field of a given type h](j1)}(h``uint16_t *data``h]j7)}(hj$h]huint16_t *data}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj$ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj$ubjM)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hj%hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj%ubah}(h]h ]h"]h$]h&]uh1jLhj$ubeh}(h]h ]h"]h$]h&]uh1j*hj$hMhj$ubj+)}(h-``uint16_t *par`` received parity data field h](j1)}(h``uint16_t *par``h]j7)}(hj#%h]h uint16_t *par}(hhhj%%hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj!%ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjM)}(hhh]h)}(hreceived parity data fieldh]hreceived parity data field}(hj>%hj<%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8%hMhj9%ubah}(h]h ]h"]h$]h&]uh1jLhj%ubeh}(h]h ]h"]h$]h&]uh1j*hj8%hMhj$ubj+)}(h``int len`` data length h](j1)}(h ``int len``h]j7)}(hj\%h]hint len}(hhhj^%hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjZ%ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhjV%ubjM)}(hhh]h)}(h data lengthh]h data length}(hjw%hju%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq%hMhjr%ubah}(h]h ]h"]h$]h&]uh1jLhjV%ubeh}(h]h ]h"]h$]h&]uh1j*hjq%hMhj$ubj+)}(h]``uint16_t *s`` syndrome data field, must be in index form (if NULL, syndrome is calculated) h](j1)}(h``uint16_t *s``h]j7)}(hj%h]h uint16_t *s}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj%ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjM)}(hhh]h)}(hLsyndrome data field, must be in index form (if NULL, syndrome is calculated)h]hLsyndrome data field, must be in index form (if NULL, syndrome is calculated)}(hj%hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubah}(h]h ]h"]h$]h&]uh1jLhj%ubeh}(h]h ]h"]h$]h&]uh1j*hj%hMhj$ubj+)}(h#``int no_eras`` number of erasures h](j1)}(h``int no_eras``h]j7)}(hj%h]h int no_eras}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj%ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjM)}(hhh]h)}(hnumber of erasuresh]hnumber of erasures}(hj%hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1jLhj%ubeh}(h]h ]h"]h$]h&]uh1j*hj%hMhj$ubj+)}(h4``int *eras_pos`` position of erasures, can be NULL h](j1)}(h``int *eras_pos``h]j7)}(hj&h]h int *eras_pos}(hhhj &hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj&ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj&ubjM)}(hhh]h)}(h!position of erasures, can be NULLh]h!position of erasures, can be NULL}(hj#&hj!&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jLhj&ubeh}(h]h ]h"]h$]h&]uh1j*hj&hMhj$ubj+)}(hM``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) h](j1)}(h``uint16_t invmsk``h]j7)}(hjA&h]huint16_t invmsk}(hhhjC&hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hj?&ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj;&ubjM)}(hhh]h)}(h8invert data mask (will be xored on data, not on parity!)h]h8invert data mask (will be xored on data, not on parity!)}(hj\&hjZ&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV&hMhjW&ubah}(h]h ]h"]h$]h&]uh1jLhj;&ubeh}(h]h ]h"]h$]h&]uh1j*hjV&hMhj$ubj+)}(h``uint16_t *corr`` buffer to store correction bitmask on eras_pos Each field in the data array contains up to symbol size bits of valid data. h](j1)}(h``uint16_t *corr``h]j7)}(hjz&h]huint16_t *corr}(hhhj|&hhhNhNubah}(h]h ]h"]h$]h&]uh1j6hjx&ubah}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhjt&ubjM)}(hhh](h)}(h.buffer to store correction bitmask on eras_posh]h.buffer to store correction bitmask on eras_pos}(hj&hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj&ubh)}(hKEach field in the data array contains up to symbol size bits of valid data.h]hKEach field in the data array contains up to symbol size bits of valid data.}(hj&hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubeh}(h]h ]h"]h$]h&]uh1jLhjt&ubeh}(h]h ]h"]h$]h&]uh1j*hj&hMhj$ubeh}(h]h ]h"]h$]h&]uh1j%hj$ubh)}(h**Note**h]j)}(hj&h]hNote}(hhhj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj$ubj&)}(hhh]j+)}(hXThe rc_control struct **rsc** contains buffers which are used for decoding, so the caller has to ensure that decoder invocations are serialized. Returns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.h](j1)}(hAThe rc_control struct **rsc** contains buffers which are used forh](hThe rc_control struct }(hThe rc_control struct hj&hhhNhNubj)}(h**rsc**h]hrsc}(hhhj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh$ contains buffers which are used for}(h$ contains buffers which are used forhj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1j0h_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj&ubjM)}(hhh](h)}(hNdecoding, so the caller has to ensure that decoder invocations are serialized.h]hNdecoding, so the caller has to ensure that decoder invocations are serialized.}(hj 'hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj'ubh)}(hvReturns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.h]hvReturns the number of corrected symbols or -EBADMSG for uncorrectable errors. The count includes errors in the parity.}(hj'hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubeh}(h]h ]h"]h$]h&]uh1jLhj&ubeh}(h]h ]h"]h$]h&]uh1j*hj'hMhj&ubah}(h]h ]h"]h$]h&]uh1j%hj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubeh}(h]public-functions-providedah ]h"]public functions providedah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCreditsh]hCredits}(hjJ'hjH'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE'hhhhhKubh)}(hDThe library code for encoding and decoding was written by Phil Karn.h]hDThe library code for encoding and decoding was written by Phil Karn.}(hjX'hjV'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjE'hhubj)}(hcCopyright 2002, Phil Karn, KA9Q May be used under the terms of the GNU General Public License (GPL)h]hcCopyright 2002, Phil Karn, KA9Q May be used under the terms of the GNU General Public License (GPL)}(hhhjd'ubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjE'hhubh)}(hDThe wrapper functions and interfaces are written by Thomas Gleixner.h]hDThe wrapper functions and interfaces are written by Thomas Gleixner.}(hjt'hjr'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjE'hhubh)}(h\Many users have provided bugfixes, improvements and helping hands for testing. Thanks a lot.h]h\Many users have provided bugfixes, improvements and helping hands for testing. Thanks a lot.}(hj'hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjE'hhubh)}(h7The following people have contributed to this document:h]h7The following people have contributed to this document:}(hj'hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjE'hhubh)}(h#Thomas Gleixner\ tglx@linutronix.deh](hThomas Gleixner }(hThomas Gleixner\ hj'hhhNhNubh reference)}(htglx@linutronix.deh]htglx@linutronix.de}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:tglx@linutronix.deuh1j'hj'ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjE'hhubeh}(h]creditsah ]h"]creditsah$]h&]uh1hhhhhhhhKubeh}(h]*reed-solomon-library-programming-interfaceah ]h"]*reed-solomon library programming interfaceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj'error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j'j'j9j6j`j]jjjjj jjjjyjvjjjjjjj j jB'j?'j'j'u nametypes}(j'Nj9Nj`NjNjNj NjNjyNjNjNjNj NjB'Nj'Nuh}(j'hj6hj]j<jjcjjjjjj jvjUjj|jjjjj jjKjTj1j6jtjyj?'j j j j j jjjjjjjjj[!j`!j'jE'u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.