Lines Matching refs:error_data

46 static void single_bit_error_data(void *error_data, void *correct_data,  in single_bit_error_data()  argument
51 memcpy(error_data, correct_data, size); in single_bit_error_data()
52 __change_bit_le(offset, error_data); in single_bit_error_data()
55 static void double_bit_error_data(void *error_data, void *correct_data, in double_bit_error_data() argument
65 memcpy(error_data, correct_data, size); in double_bit_error_data()
67 __change_bit_le(offset[0], error_data); in double_bit_error_data()
68 __change_bit_le(offset[1], error_data); in double_bit_error_data()
111 static void no_bit_error(void *error_data, void *error_ecc, in no_bit_error() argument
114 memcpy(error_data, correct_data, size); in no_bit_error()
118 static int no_bit_error_verify(void *error_data, void *error_ecc, in no_bit_error_verify() argument
124 __nand_calculate_ecc(error_data, size, calc_ecc); in no_bit_error_verify()
125 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); in no_bit_error_verify()
126 if (ret == 0 && !memcmp(correct_data, error_data, size)) in no_bit_error_verify()
132 static void single_bit_error_in_data(void *error_data, void *error_ecc, in single_bit_error_in_data() argument
135 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data()
139 static void single_bit_error_in_ecc(void *error_data, void *error_ecc, in single_bit_error_in_ecc() argument
142 memcpy(error_data, correct_data, size); in single_bit_error_in_ecc()
146 static int single_bit_error_correct(void *error_data, void *error_ecc, in single_bit_error_correct() argument
152 __nand_calculate_ecc(error_data, size, calc_ecc); in single_bit_error_correct()
153 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); in single_bit_error_correct()
154 if (ret == 1 && !memcmp(correct_data, error_data, size)) in single_bit_error_correct()
160 static void double_bit_error_in_data(void *error_data, void *error_ecc, in double_bit_error_in_data() argument
163 double_bit_error_data(error_data, correct_data, size); in double_bit_error_in_data()
167 static void single_bit_error_in_data_and_ecc(void *error_data, void *error_ecc, in single_bit_error_in_data_and_ecc() argument
170 single_bit_error_data(error_data, correct_data, size); in single_bit_error_in_data_and_ecc()
174 static void double_bit_error_in_ecc(void *error_data, void *error_ecc, in double_bit_error_in_ecc() argument
177 memcpy(error_data, correct_data, size); in double_bit_error_in_ecc()
181 static int double_bit_error_detect(void *error_data, void *error_ecc, in double_bit_error_detect() argument
187 __nand_calculate_ecc(error_data, size, calc_ecc); in double_bit_error_detect()
188 ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); in double_bit_error_detect()
226 static void dump_data_ecc(void *error_data, void *error_ecc, void *correct_data, in dump_data_ecc() argument
231 error_data, size, false); in dump_data_ecc()
246 void *error_data; in nand_ecc_test_run() local
251 error_data = kmalloc(size, GFP_KERNEL); in nand_ecc_test_run()
256 if (!error_data || !error_ecc || !correct_data || !correct_ecc) { in nand_ecc_test_run()
265 nand_ecc_test[i].prepare(error_data, error_ecc, in nand_ecc_test_run()
267 err = nand_ecc_test[i].verify(error_data, error_ecc, in nand_ecc_test_run()
273 dump_data_ecc(error_data, error_ecc, in nand_ecc_test_run()
285 kfree(error_data); in nand_ecc_test_run()