sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/core-api/librsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/pt_BR/core-api/librsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(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}(hhhhhNhNubah}(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);}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK)hjhhubeh}(h] initializingah ]h"] initializingah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hEncodingh]hEncoding}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj:ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK4hj6ubjc)}(hhh]h)}(h5Internal scratch buffers used in calls to decode_rs()h]h5Internal scratch buffers used in calls to decode_rs()}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK5hjRubah}(h]h ]h"]h$]h&]uh1jbhj6ubeh}(h]h ]h"]h$]h&]uh1j@hjQhK4hjubeh}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj1hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]init_rs (C function) c.init_rshNtauh1jPhj1hhhNhNubjb)}(hhh](jg)}(hTstruct rs_control * init_rs (int symsize, int gfpoly, int fcr, int prim, int nroots)h]jm)}(hRstruct rs_control *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots)h](js)}(hjvh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjhhhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKUubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKUubh)}(hhh]j)}(h rs_controlh]h rs_control}(hjhhhNhNubah}(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_rsasbuh1hhjhhhjhKUubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKUubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjhhhjhKUubj)}(hinit_rsh]j)}(hjh]hinit_rs}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKUubhdesc_parameterlist)}(h8(int symsize, int gfpoly, int fcr, int prim, int nroots)h](hdesc_parameter)}(h int symsizeh](hdesc_sig_keyword_type)}(hinth]hint}(hj" hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j hj ubj)}(h h]h }(hj1 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hsymsizeh]hsymsize}(hj? hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(h int gfpolyh](j! )}(hinth]hint}(hjX hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjT ubj)}(h h]h }(hjf hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjT ubj)}(hgfpolyh]hgfpoly}(hjt hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjT ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(hint fcrh](j! )}(hinth]hint}(hj hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hfcrh]hfcr}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(hint primh](j! )}(hinth]hint}(hj hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hprimh]hprim}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubj )}(h int nrootsh](j! )}(hinth]hint}(hj hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hnrootsh]hnroots}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj ubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhjhKUubeh}(h]h ]h"]h$]h&]jjjuh1jljjhjhhhjhKUubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jfhjhKUhjhhubj)}(hhh]h)}(h,Create a RS control struct and initialize ith]h,Create a RS control struct and initialize it}(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&]uh1jhjhhhjhKUubeh}(h]h ](jfunctioneh"]h$]h&]jjjjU jjU jjjuh1jahhhj1hNhNubj)}(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)}(hj_ h]h Parameters}(hja 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.hhKYhjY ubj<)}(hhh](jA)}(h1``int symsize`` the symbol size (number of bits) h](jG)}(h``int symsize``h]jM)}(hj~ h]h int symsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj| ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKVhjx ubjc)}(hhh]h)}(h the symbol size (number of bits)h]h the symbol size (number of bits)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKVhj ubah}(h]h ]h"]h$]h&]uh1jbhjx ubeh}(h]h ]h"]h$]h&]uh1j@hj hKVhju ubjA)}(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](jG)}(h``int gfpoly``h]jM)}(hj h]h int gfpoly}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhKYhj ubjc)}(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 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&]uh1jbhj ubeh}(h]h ]h"]h$]h&]uh1j@hj hKYhju ubjA)}(hY``int fcr`` the first consecutive root of the rs code generator polynomial in index form h](jG)}(h ``int fcr``h]jM)}(hj h]hint fcr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK[hj ubjc)}(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 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&]uh1jbhj ubeh}(h]h ]h"]h$]h&]uh1j@hj hK[hju ubjA)}(h<``int prim`` primitive element to generate polynomial roots h](jG)}(h ``int prim``h]jM)}(hj+ h]hint prim}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj) ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK\hj% ubjc)}(hhh]h)}(h.primitive element to generate polynomial rootsh]h.primitive element to generate polynomial roots}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ hK\hjA ubah}(h]h ]h"]h$]h&]uh1jbhj% ubeh}(h]h ]h"]h$]h&]uh1j@hj@ hK\hju ubjA)}(hE``int nroots`` RS code generator polynomial degree (number of roots) h](jG)}(h``int nroots``h]jM)}(hjd h]h int nroots}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjb ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK]hj^ ubjc)}(hhh]h)}(h5RS code generator polynomial degree (number of roots)h]h5RS code generator polynomial degree (number of roots)}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy hK]hjz ubah}(h]h ]h"]h$]h&]uh1jbhj^ ubeh}(h]h ]h"]h$]h&]uh1j@hjy hK]hju ubeh}(h]h ]h"]h$]h&]uh1j;hjY ubh)}(h**Description**h]j)}(hj h]h Description}(hj 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_hjY ubh)}(hAllocations use GFP_KERNEL.h]hAllocations use GFP_KERNEL.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhU/var/lib/git/docbuild/linux/Documentation/core-api/librs:182: ./include/linux/rslib.hhK^hjY ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj1hhhNhNubeh}(h] structuresah ]h"] structuresah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hPublic Functions Providedh]hPublic Functions Provided}(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 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]free_rs (C function) c.free_rshNtauh1jPhj hhhNhNubjb)}(hhh](jg)}(h$void free_rs (struct rs_control *rs)h]jm)}(h#void free_rs(struct rs_control *rs)h](j! )}(hvoidh]hvoid}(hj 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.chKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hKubj)}(hfree_rsh]j)}(hfree_rsh]hfree_rs}(hj, 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](js)}(hjvh]hstruct}(hjH hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjD ubj)}(h h]h }(hjU hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD ubh)}(hhh]j)}(h rs_controlh]h rs_control}(hjf hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjc ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjh modnameN classnameNjj)}j]j)}jj. sb c.free_rsasbuh1hhjD ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD ubj)}(hrsh]hrs}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj@ ubah}(h]h ]h"]h$]h&]jjuh1j hj hhhj hKubeh}(h]h ]h"]h$]h&]jjjuh1jljjhj hhhj hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jfhj hKhj hhubj)}(hhh]h)}(hFree the rs control structureh]hFree the rs control structure}(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 jjjuh1jahhhj 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}(hj 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]jA)}(hW``struct rs_control *rs`` The control structure which is not longer used by the caller h](jG)}(h``struct rs_control *rs``h]jM)}(hj h]hstruct rs_control *rs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chKhj ubjc)}(hhh]h)}(hhhhNhNubah}(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.chM,hj6ubj<)}(hhh](jA)}(h1``int symsize`` the symbol size (number of bits) h](jG)}(h``int symsize``h]jM)}(hj[h]h int symsize}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjYubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM*hjUubjc)}(hhh]h)}(h the symbol size (number of bits)h]h the symbol size (number of bits)}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphM*hjqubah}(h]h ]h"]h$]h&]uh1jbhjUubeh}(h]h ]h"]h$]h&]uh1j@hjphM*hjRubjA)}(h``int (*gffunc)(int)`` pointer to function to generate the next field element, or the multiplicative identity element if given 0. Used instead of gfpoly if gfpoly is 0 h](jG)}(h``int (*gffunc)(int)``h]jM)}(hjh]hint (*gffunc)(int)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM-hjubjc)}(hhh]h)}(hpointer to function to generate the next field element, or the multiplicative identity element if given 0. Used instead of gfpoly if gfpoly is 0h]hpointer to function to generate the next field element, or the multiplicative identity element if given 0. Used instead of gfpoly if gfpoly is 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM+hjubah}(h]Ph ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhM-hjRubjA)}(hY``int fcr`` the first consecutive root of the rs code generator polynomial in index form h](jG)}(h ``int fcr``h]jM)}(hjh]hint fcr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM/hjubjc)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM.hjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhM/hjRubjA)}(h<``int prim`` primitive element to generate polynomial roots h](jG)}(h ``int prim``h]jM)}(hjh]hint prim}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM0hjubjc)}(hhh]h)}(h.primitive element to generate polynomial rootsh]h.primitive element to generate polynomial roots}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM0hjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhM0hjRubjA)}(hD``int nroots`` RS code generator polynomial degree (number of roots)h](jG)}(h``int nroots``h]jM)}(hjAh]h int nroots}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj?ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM2hj;ubjc)}(hhh]h)}(h5RS code generator polynomial degree (number of roots)h]h5RS code generator polynomial degree (number of roots)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM1hjWubah}(h]h ]h"]h$]h&]uh1jbhj;ubeh}(h]h ]h"]h$]h&]uh1j@hjVhM2hjRubeh}(h]h ]h"]h$]h&]uh1j;hj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]encode_rs8 (C function) c.encode_rs8hNtauh1jPhj hhhNhNubjb)}(hhh](jg)}(h_int encode_rs8 (struct rs_control *rsc, uint8_t *data, int len, uint16_t *par, uint16_t invmsk)h]jm)}(h^int encode_rs8(struct rs_control *rsc, uint8_t *data, int len, uint16_t *par, uint16_t invmsk)h](j! )}(hinth]hint}(hjhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjhhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM=ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM=ubj)}(h encode_rs8h]j)}(h encode_rs8h]h encode_rs8}(hjhhhNhNubah}(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](js)}(hjvh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h rs_controlh]h rs_control}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb c.encode_rs8asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hrsch]hrsc}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(h uint8_t *datah](h)}(hhh]j)}(huint8_th]huint8_t}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjOmodnameN classnameNjj)}j]j c.encode_rs8asbuh1hhjFubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(hjh]h*}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(hint lenh](j! )}(hinth]hint}(hjhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hlenh]hlen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.encode_rs8asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hparh]hpar}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj.modnameN classnameNjj)}j]j c.encode_rs8asbuh1hhj%ubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hinvmskh]hinvmsk}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhjhM=ubeh}(h]h ]h"]h$]h&]jjjuh1jljjhjhhhjhM=ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jfhjhM=hjhhubj)}(hhh]h)}(h6Calculate the parity for data values (8bit data width)h]h6Calculate the parity for data values (8bit data width)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM=hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM=ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jahhhj 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) **Description** 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}(hjhhhNhNubah}(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](jA)}(h4``struct rs_control *rsc`` the rs control structure h](jG)}(h``struct rs_control *rsc``h]jM)}(hjh]hstruct rs_control *rsc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM>hjubjc)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM>hjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhM>hjubjA)}(h-``uint8_t *data`` data field of a given type h](jG)}(h``uint8_t *data``h]jM)}(hjh]h uint8_t *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM?hjubjc)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM?hjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhM?hjubjA)}(h``int len`` data length h](jG)}(h ``int len``h]jM)}(hj5h]hint len}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj3ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM@hj/ubjc)}(hhh]h)}(h data lengthh]h data length}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhM@hjKubah}(h]h ]h"]h$]h&]uh1jbhj/ubeh}(h]h ]h"]h$]h&]uh1j@hjJhM@hjubjA)}(hM``uint16_t *par`` parity data, must be initialized by caller (usually all 0) h](jG)}(h``uint16_t *par``h]jM)}(hjnh]h uint16_t *par}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjlubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMAhjhubjc)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1jbhjhubeh}(h]h ]h"]h$]h&]uh1j@hjhMAhjubjA)}(h=``uint16_t invmsk`` invert data mask (will be xored on data) h](jG)}(h``uint16_t invmsk``h]jM)}(hjh]huint16_t invmsk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMBhjubjc)}(hhh]h)}(h(invert data mask (will be xored on data)h]h(invert data mask (will be xored on data)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMBhjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhMBhjubeh}(h]h ]h"]h$]h&]uh1j;hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(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.chMDhjubh block_quote)}(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]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.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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMChjubah}(h]h ]h"]h$]h&]uh1jhj hMChjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]decode_rs8 (C function) c.decode_rs8hNtauh1jPhj hhhNhNubjb)}(hhh](jg)}(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]jm)}(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}(hj3hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj/hhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMRubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhjAhMRubj)}(h decode_rs8h]j)}(h decode_rs8h]h decode_rs8}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubah}(h]h ](jjeh"]h$]h&]jjuh1jhj/hhhjAhMRubj )}(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](js)}(hjvh]hstruct}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjlubj)}(h h]h }(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubh)}(hhh]j)}(h rs_controlh]h rs_control}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjVsb c.decode_rs8asbuh1hhjlubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(hrsch]hrsc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(h uint8_t *datah](h)}(hhh]j)}(huint8_th]huint8_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.decode_rs8asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj<modnameN classnameNjj)}j]j c.decode_rs8asbuh1hhj3ubj)}(h h]h }(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(hjh]h*}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(hparh]hpar}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(hint lenh](j! )}(hinth]hint}(hjhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hlenh]hlen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(h uint16_t *sh](h)}(hhh]j)}(huint16_th]huint16_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.decode_rs8asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsh]hs}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(h int no_erash](j! )}(hinth]hint}(hjhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hno_erash]hno_eras}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(h int *eras_posh](j! )}(hinth]hint}(hjKhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjGubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj)}(hjh]h*}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj)}(heras_posh]heras_pos}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.decode_rs8asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinvmskh]hinvmsk}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubj )}(huint16_t *corrh](h)}(hhh]j)}(huint16_th]huint16_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.decode_rs8asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hcorrh]hcorr}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjhubeh}(h]h ]h"]h$]h&]jjuh1j hj/hhhjAhMRubeh}(h]h ]h"]h$]h&]jjjuh1jljjhj+hhhjAhMRubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1jfhjAhMRhj(hhubj)}(hhh]h)}(h!Decode codeword (8bit data width)h]h!Decode codeword (8bit data width)}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMRhj8hhubah}(h]h ]h"]h$]h&]uh1jhj(hhhjAhMRubeh}(h]h ](jfunctioneh"]h$]h&]jjjjSjjSjjjuh1jahhhj 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 **Description** 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}(hj_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.chMVhjWubj<)}(hhh](jA)}(h4``struct rs_control *rsc`` the rs control structure h](jG)}(h``struct rs_control *rsc``h]jM)}(hj|h]hstruct rs_control *rsc}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjzubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMShjvubjc)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMShjubah}(h]h ]h"]h$]h&]uh1jbhjvubeh}(h]h ]h"]h$]h&]uh1j@hjhMShjsubjA)}(h-``uint8_t *data`` data field of a given type h](jG)}(h``uint8_t *data``h]jM)}(hjh]h uint8_t *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMThjubjc)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMThjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhMThjsubjA)}(h-``uint16_t *par`` received parity data field h](jG)}(h``uint16_t *par``h]jM)}(hjh]h uint16_t *par}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMUhjubjc)}(hhh]h)}(hreceived parity data fieldh]hreceived parity data field}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMUhjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhMUhjsubjA)}(h``int len`` data length h](jG)}(h ``int len``h]jM)}(hj'h]hint len}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj%ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMVhj!ubjc)}(hhh]h)}(h data lengthh]h data length}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMVhj=ubah}(h]h ]h"]h$]h&]uh1jbhj!ubeh}(h]h ]h"]h$]h&]uh1j@hj<hMVhjsubjA)}(h]``uint16_t *s`` syndrome data field, must be in index form (if NULL, syndrome is calculated) h](jG)}(h``uint16_t *s``h]jM)}(hj`h]h uint16_t *s}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj^ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMXhjZubjc)}(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)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMWhjvubah}(h]h ]h"]h$]h&]uh1jbhjZubeh}(h]h ]h"]h$]h&]uh1j@hjuhMXhjsubjA)}(h#``int no_eras`` number of erasures h](jG)}(h``int no_eras``h]jM)}(hjh]h int no_eras}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMYhjubjc)}(hhh]h)}(hnumber of erasuresh]hnumber of erasures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMYhjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhMYhjsubjA)}(h4``int *eras_pos`` position of erasures, can be NULL h](jG)}(h``int *eras_pos``h]jM)}(hjh]h int *eras_pos}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMZhjubjc)}(hhh]h)}(h!position of erasures, can be NULLh]h!position of erasures, can be NULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMZhjubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhMZhjsubjA)}(hM``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) h](jG)}(h``uint16_t invmsk``h]jM)}(hj h]huint16_t invmsk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM[hjubjc)}(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%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hM[hj"ubah}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hj!hM[hjsubjA)}(hB``uint16_t *corr`` buffer to store correction bitmask on eras_pos h](jG)}(h``uint16_t *corr``h]jM)}(hjEh]huint16_t *corr}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjCubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM\hj?ubjc)}(hhh]h)}(h.buffer to store correction bitmask on eras_posh]h.buffer to store correction bitmask on eras_pos}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhM\hj[ubah}(h]h ]h"]h$]h&]uh1jbhj?ubeh}(h]h ]h"]h$]h&]uh1j@hjZhM\hjsubeh}(h]h ]h"]h$]h&]uh1j;hjWubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(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.chM^hjWubj)}(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]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.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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chM]hjubah}(h]h ]h"]h$]h&]uh1jhjhM]hjWubh)}(h**Note**h]j)}(hjh]hNote}(hjhhhNhNubah}(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.chMahjWubj<)}(hhh]jA)}(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](jG)}(hAThe rs_control struct **rsc** contains buffers which are used forh](hThe rs_control struct }(hjhhhNhNubj)}(h**rsc**h]hrsc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$ contains buffers which are used for}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMfhjubjc)}(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.}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMfhjubeh}(h]h ]h"]h$]h&]uh1jbhjubeh}(h]h ]h"]h$]h&]uh1j@hjhMfhjubah}(h]h ]h"]h$]h&]uh1j;hjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]encode_rs16 (C function) c.encode_rs16hNtauh1jPhj hhhNhNubjb)}(hhh](jg)}(haint encode_rs16 (struct rs_control *rsc, uint16_t *data, int len, uint16_t *par, uint16_t invmsk)h]jm)}(h`int encode_rs16(struct rs_control *rsc, uint16_t *data, int len, uint16_t *par, uint16_t invmsk)h](j! )}(hinth]hint}(hjAhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj=hhh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMtubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=hhhjOhMtubj)}(h encode_rs16h]j)}(h encode_rs16h]h encode_rs16}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj=hhhjOhMtubj )}(hQ(struct rs_control *rsc, uint16_t *data, int len, uint16_t *par, uint16_t invmsk)h](j )}(hstruct rs_control *rsch](js)}(hjvh]hstruct}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhjzubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubh)}(hhh]j)}(h rs_controlh]h rs_control}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjdsb c.encode_rs16asbuh1hhjzubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubj)}(hrsch]hrsc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjvubj )}(huint16_t *datah](h)}(hhh]j)}(huint16_th]huint16_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.encode_rs16asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdatah]hdata}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjvubj )}(hint lenh](j! )}(hinth]hint}(hjEhhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hjAubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(hlenh]hlen}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjvubj )}(h uint16_t *parh](h)}(hhh]j)}(huint16_th]huint16_t}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.encode_rs16asbuh1hhjvubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hparh]hpar}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjvubj )}(huint16_t invmskh](h)}(hhh]j)}(huint16_th]huint16_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.encode_rs16asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinvmskh]hinvmsk}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1j hjvubeh}(h]h ]h"]h$]h&]jjuh1j hj=hhhjOhMtubeh}(h]h ]h"]h$]h&]jjjuh1jljjhj9hhhjOhMtubah}(h]j4ah ](jjeh"]h$]h&]jj)jhuh1jfhjOhMthj6hhubj)}(hhh]h)}(h7Calculate the parity for data values (16bit data width)h]h7Calculate the parity for data values (16bit data width)}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMthj% hhubah}(h]h ]h"]h$]h&]uh1jhj6hhhjOhMtubeh}(h]h ](jfunctioneh"]h$]h&]jjjj@ jj@ jjjuh1jahhhj 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!) **Description** Each field in the data array contains up to symbol size bits of valid data.h](h)}(h**Parameters**h]j)}(hjJ h]h Parameters}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMxhjD ubj<)}(hhh](jA)}(h4``struct rs_control *rsc`` the rs control structure h](jG)}(h``struct rs_control *rsc``h]jM)}(hji h]hstruct rs_control *rsc}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjg ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMuhjc ubjc)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ hMuhj ubah}(h]h ]h"]h$]h&]uh1jbhjc ubeh}(h]h ]h"]h$]h&]uh1j@hj~ hMuhj` ubjA)}(h.``uint16_t *data`` data field of a given type h](jG)}(h``uint16_t *data``h]jM)}(hj h]huint16_t *data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMvhj ubjc)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMvhj ubah}(h]h ]h"]h$]h&]uh1jbhj ubeh}(h]h ]h"]h$]h&]uh1j@hj hMvhj` ubjA)}(h``int len`` data length h](jG)}(h ``int len``h]jM)}(hj h]hint len}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMwhj ubjc)}(hhh]h)}(h data lengthh]h data length}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMwhj ubah}(h]h ]h"]h$]h&]uh1jbhj ubeh}(h]h ]h"]h$]h&]uh1j@hj hMwhj` ubjA)}(hM``uint16_t *par`` parity data, must be initialized by caller (usually all 0) h](jG)}(h``uint16_t *par``h]jM)}(hj!h]h uint16_t *par}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj!ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMxhj!ubjc)}(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-!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)!hMxhj*!ubah}(h]h ]h"]h$]h&]uh1jbhj!ubeh}(h]h ]h"]h$]h&]uh1j@hj)!hMxhj` ubjA)}(hM``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) h](jG)}(h``uint16_t invmsk``h]jM)}(hjM!h]huint16_t invmsk}(hjO!hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjK!ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMyhjG!ubjc)}(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!)}(hjf!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb!hMyhjc!ubah}(h]h ]h"]h$]h&]uh1jbhjG!ubeh}(h]h ]h"]h$]h&]uh1j@hjb!hMyhj` ubeh}(h]h ]h"]h$]h&]uh1j;hjD ubh)}(h**Description**h]j)}(hj!h]h Description}(hj!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.chM{hjD ubj)}(hKEach field in the data array contains up to symbol size bits of valid data.h]h)}(hj!h]hKEach field in the data array contains up to symbol size bits of valid data.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMzhj!ubah}(h]h ]h"]h$]h&]uh1jhj!hMzhjD ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubjQ)}(hhh]h}(h]h ]h"]h$]h&]entries](j]decode_rs16 (C function) c.decode_rs16hNtauh1jPhj hhhNhNubjb)}(hhh](jg)}(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]jm)}(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}(hj!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.chMubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj!hMubj)}(h decode_rs16h]j)}(h decode_rs16h]h decode_rs16}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj!hhhj!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](js)}(hjvh]hstruct}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jrhj"ubj)}(h h]h }(hj "hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubh)}(hhh]j)}(h rs_controlh]h rs_control}(hj1"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj."ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3"modnameN classnameNjj)}j]j)}jj!sb c.decode_rs16asbuh1hhj"ubj)}(h h]h }(hjQ"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hjh]h*}(hj_"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hrsch]hrsc}(hjl"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}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]jM" c.decode_rs16asbuh1hhj"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hjh]h*}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hdatah]hdata}(hj"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}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]jM" c.decode_rs16asbuh1hhj"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hjh]h*}(hj #hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hparh]hpar}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj "ubj )}(hint lenh](j! )}(hinth]hint}(hj/#hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj+#ubj)}(h h]h }(hj=#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+#ubj)}(hlenh]hlen}(hjK#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}(hjg#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetji#modnameN classnameNjj)}j]jM" c.decode_rs16asbuh1hhj`#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`#ubj)}(hjh]h*}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`#ubj)}(hjh]hs}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj "ubj )}(h int no_erash](j! )}(hinth]hint}(hj#hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(hno_erash]hno_eras}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj "ubj )}(h int *eras_posh](j! )}(hinth]hint}(hj#hhhNhNubah}(h]h ]j- ah"]h$]h&]uh1j hj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(hjh]h*}(hj $hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(heras_posh]heras_pos}(hj$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}(hj2$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/$ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj4$modnameN classnameNjj)}j]jM" c.decode_rs16asbuh1hhj+$ubj)}(h h]h }(hjP$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+$ubj)}(hinvmskh]hinvmsk}(hj^$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}(hjz$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw$ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj|$modnameN classnameNjj)}j]jM" c.decode_rs16asbuh1hhjs$ubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjs$ubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjs$ubj)}(hcorrh]hcorr}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjs$ubeh}(h]h ]h"]h$]h&]noemphjjuh1j hj "ubeh}(h]h ]h"]h$]h&]jjuh1j hj!hhhj!hMubeh}(h]h ]h"]h$]h&]jjjuh1jljjhj!hhhj!hMubah}(h]j!ah ](jjeh"]h$]h&]jj)jhuh1jfhj!hMhj!hhubj)}(hhh]h)}(h"Decode codeword (16bit data width)h]h"Decode codeword (16bit data width)}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj$hhubah}(h]h ]h"]h$]h&]uh1jhj!hhhj!hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj$jj$jjjuh1jahhhj 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 **Description** 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}(hj%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](jA)}(h4``struct rs_control *rsc`` the rs control structure h](jG)}(h``struct rs_control *rsc``h]jM)}(hj%h]hstruct rs_control *rsc}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj%ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjc)}(hhh]h)}(hthe rs control structureh]hthe rs control structure}(hj7%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3%hMhj4%ubah}(h]h ]h"]h$]h&]uh1jbhj%ubeh}(h]h ]h"]h$]h&]uh1j@hj3%hMhj%ubjA)}(h.``uint16_t *data`` data field of a given type h](jG)}(h``uint16_t *data``h]jM)}(hjW%h]huint16_t *data}(hjY%hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjU%ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhjQ%ubjc)}(hhh]h)}(hdata field of a given typeh]hdata field of a given type}(hjp%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl%hMhjm%ubah}(h]h ]h"]h$]h&]uh1jbhjQ%ubeh}(h]h ]h"]h$]h&]uh1j@hjl%hMhj%ubjA)}(h-``uint16_t *par`` received parity data field h](jG)}(h``uint16_t *par``h]jM)}(hj%h]h uint16_t *par}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj%ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjc)}(hhh]h)}(hreceived parity data fieldh]hreceived parity data field}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1jbhj%ubeh}(h]h ]h"]h$]h&]uh1j@hj%hMhj%ubjA)}(h``int len`` data length h](jG)}(h ``int len``h]jM)}(hj%h]hint len}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj%ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjc)}(hhh]h)}(h data lengthh]h data length}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1jbhj%ubeh}(h]h ]h"]h$]h&]uh1j@hj%hMhj%ubjA)}(h]``uint16_t *s`` syndrome data field, must be in index form (if NULL, syndrome is calculated) h](jG)}(h``uint16_t *s``h]jM)}(hj&h]h uint16_t *s}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj&ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj%ubjc)}(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&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&]uh1jbhj%ubeh}(h]h ]h"]h$]h&]uh1j@hj&hMhj%ubjA)}(h#``int no_eras`` number of erasures h](jG)}(h``int no_eras``h]jM)}(hj<&h]h int no_eras}(hj>&hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj:&ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj6&ubjc)}(hhh]h)}(hnumber of erasuresh]hnumber of erasures}(hjU&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ&hMhjR&ubah}(h]h ]h"]h$]h&]uh1jbhj6&ubeh}(h]h ]h"]h$]h&]uh1j@hjQ&hMhj%ubjA)}(h4``int *eras_pos`` position of erasures, can be NULL h](jG)}(h``int *eras_pos``h]jM)}(hju&h]h int *eras_pos}(hjw&hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjs&ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhjo&ubjc)}(hhh]h)}(h!position of erasures, can be NULLh]h!position of erasures, can be NULL}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jbhjo&ubeh}(h]h ]h"]h$]h&]uh1j@hj&hMhj%ubjA)}(hM``uint16_t invmsk`` invert data mask (will be xored on data, not on parity!) h](jG)}(h``uint16_t invmsk``h]jM)}(hj&h]huint16_t invmsk}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj&ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj&ubjc)}(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&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jbhj&ubeh}(h]h ]h"]h$]h&]uh1j@hj&hMhj%ubjA)}(hB``uint16_t *corr`` buffer to store correction bitmask on eras_pos h](jG)}(h``uint16_t *corr``h]jM)}(hj&h]huint16_t *corr}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj&ubah}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj&ubjc)}(hhh]h)}(h.buffer to store correction bitmask on eras_posh]h.buffer to store correction bitmask on eras_pos}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jbhj&ubeh}(h]h ]h"]h$]h&]uh1j@hj&hMhj%ubeh}(h]h ]h"]h$]h&]uh1j;hj$ubh)}(h**Description**h]j)}(hj"'h]h Description}(hj$'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)}(hLEach field in the data array contains up to symbol size bits of valid data. h]h)}(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<'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhj8'ubah}(h]h ]h"]h$]h&]uh1jhjJ'hMhj$ubh)}(h**Note**h]j)}(hjS'h]hNote}(hjU'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQ'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]jA)}(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](jG)}(hAThe rc_control struct **rsc** contains buffers which are used forh](hThe rc_control struct }(hjp'hhhNhNubj)}(h**rsc**h]hrsc}(hjx'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp'ubh$ contains buffers which are used for}(hjp'hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFh_/var/lib/git/docbuild/linux/Documentation/core-api/librs:191: ./lib/reed_solomon/reed_solomon.chMhjl'ubjc)}(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'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'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubeh}(h]h ]h"]h$]h&]uh1jbhjl'ubeh}(h]h ]h"]h$]h&]uh1j@hj'hMhji'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}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'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.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'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)}hj'sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhj'hhubh)}(hDThe wrapper functions and interfaces are written by Thomas Gleixner.h]hDThe wrapper functions and interfaces are written by Thomas Gleixner.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'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 (hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(h7The following people have contributed to this document:h]h7The following people have contributed to this document:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(h Thomas Gleixner\ tglx@kernel.orgh](hThomas Gleixner }(hj)(hhhNhNubh reference)}(htglx@kernel.orgh]htglx@kernel.org}(hj3(hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:tglx@kernel.orguh1j1(hj)(ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj'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.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_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_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jV(jS(jMjJjtjqj.j+jjjjjjjjjjjjj&j#j j j'j'jN(jK(u nametypes}(jV(jMjtj.jjjjjjj&j j'jN(uh}(jS(hjJj jqjPj+jwjjjjjj jjijjjjj#jj j1j_jhjGjLjjj'j j j j j j(j-jjj&j+j4j9j!j!jK(j'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.