Lines Matching full:ubi

11 void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len);
19 pr_crit("UBI assert failed in %s at %u (pid %d)\n", \
29 pr_debug("UBI DBG " type " (pid %d): " fmt "\n", current->pid, \
48 int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset,
52 int ubi_debugfs_init_dev(struct ubi_device *ubi);
53 void ubi_debugfs_exit_dev(struct ubi_device *ubi);
56 * The following function is a legacy implementation of UBI fault-injection
60 int ubi_dbg_power_cut(struct ubi_device *ubi, int caller);
62 static inline int ubi_dbg_bitflip(const struct ubi_device *ubi) in ubi_dbg_bitflip() argument
64 if (ubi->dbg.emulate_bitflips) in ubi_dbg_bitflip()
69 static inline int ubi_dbg_write_failure(const struct ubi_device *ubi) in ubi_dbg_write_failure() argument
71 if (ubi->dbg.emulate_io_failures) in ubi_dbg_write_failure()
76 static inline int ubi_dbg_erase_failure(const struct ubi_device *ubi) in ubi_dbg_erase_failure() argument
78 if (ubi->dbg.emulate_io_failures) in ubi_dbg_erase_failure()
130 static inline bool ubi_dbg_fail_bitflip(const struct ubi_device *ubi) in ubi_dbg_fail_bitflip() argument
132 if (ubi->dbg.emulate_failures & MASK_BITFLIPS) in ubi_dbg_fail_bitflip()
137 static inline bool ubi_dbg_fail_write(const struct ubi_device *ubi) in ubi_dbg_fail_write() argument
139 if (ubi->dbg.emulate_failures & MASK_WRITE_FAILURE) in ubi_dbg_fail_write()
144 static inline bool ubi_dbg_fail_erase(const struct ubi_device *ubi) in ubi_dbg_fail_erase() argument
146 if (ubi->dbg.emulate_failures & MASK_ERASE_FAILURE) in ubi_dbg_fail_erase()
151 static inline bool ubi_dbg_fail_power_cut(const struct ubi_device *ubi, in ubi_dbg_fail_power_cut() argument
154 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_power_cut()
159 static inline bool ubi_dbg_fail_read(const struct ubi_device *ubi, in ubi_dbg_fail_read() argument
162 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_read()
167 static inline bool ubi_dbg_fail_eccerr(const struct ubi_device *ubi) in ubi_dbg_fail_eccerr() argument
169 if (ubi->dbg.emulate_failures & MASK_ECCERR) in ubi_dbg_fail_eccerr()
174 static inline bool ubi_dbg_fail_ff(const struct ubi_device *ubi, in ubi_dbg_fail_ff() argument
177 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_ff()
182 static inline bool ubi_dbg_fail_ff_bitflips(const struct ubi_device *ubi, in ubi_dbg_fail_ff_bitflips() argument
185 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_ff_bitflips()
190 static inline bool ubi_dbg_fail_bad_hdr(const struct ubi_device *ubi, in ubi_dbg_fail_bad_hdr() argument
193 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_bad_hdr()
198 static inline bool ubi_dbg_fail_bad_hdr_ebadmsg(const struct ubi_device *ubi, in ubi_dbg_fail_bad_hdr_ebadmsg() argument
201 if (ubi->dbg.emulate_failures & caller) in ubi_dbg_fail_bad_hdr_ebadmsg()
222 * @ubi: UBI device description object
226 static inline bool ubi_dbg_is_power_cut(struct ubi_device *ubi, in ubi_dbg_is_power_cut() argument
229 if (ubi_dbg_power_cut(ubi, caller)) in ubi_dbg_is_power_cut()
231 return ubi_dbg_fail_power_cut(ubi, caller); in ubi_dbg_is_power_cut()
236 * @ubi: UBI device description object
240 static inline bool ubi_dbg_is_bitflip(const struct ubi_device *ubi) in ubi_dbg_is_bitflip() argument
242 if (ubi_dbg_bitflip(ubi)) in ubi_dbg_is_bitflip()
244 return ubi_dbg_fail_bitflip(ubi); in ubi_dbg_is_bitflip()
249 * @ubi: UBI device description object
254 static inline bool ubi_dbg_is_write_failure(const struct ubi_device *ubi) in ubi_dbg_is_write_failure() argument
256 if (ubi_dbg_write_failure(ubi)) in ubi_dbg_is_write_failure()
258 return ubi_dbg_fail_write(ubi); in ubi_dbg_is_write_failure()
263 * @ubi: UBI device description object
268 static inline bool ubi_dbg_is_erase_failure(const struct ubi_device *ubi) in ubi_dbg_is_erase_failure() argument
270 if (ubi_dbg_erase_failure(ubi)) in ubi_dbg_is_erase_failure()
272 return ubi_dbg_fail_erase(ubi); in ubi_dbg_is_erase_failure()
277 * @ubi: UBI device description object
281 static inline bool ubi_dbg_is_eccerr(const struct ubi_device *ubi) in ubi_dbg_is_eccerr() argument
283 return ubi_dbg_fail_eccerr(ubi); in ubi_dbg_is_eccerr()
288 * @ubi: UBI device description object
293 static inline bool ubi_dbg_is_read_failure(const struct ubi_device *ubi, in ubi_dbg_is_read_failure() argument
296 return ubi_dbg_fail_read(ubi, caller); in ubi_dbg_is_read_failure()
301 * @ubi: UBI device description object
306 static inline bool ubi_dbg_is_ff(const struct ubi_device *ubi, in ubi_dbg_is_ff() argument
309 return ubi_dbg_fail_ff(ubi, caller); in ubi_dbg_is_ff()
316 * @ubi: UBI device description object
321 static inline bool ubi_dbg_is_ff_bitflips(const struct ubi_device *ubi, in ubi_dbg_is_ff_bitflips() argument
324 return ubi_dbg_fail_ff_bitflips(ubi, caller); in ubi_dbg_is_ff_bitflips()
329 * @ubi: UBI device description object
334 static inline bool ubi_dbg_is_bad_hdr(const struct ubi_device *ubi, in ubi_dbg_is_bad_hdr() argument
337 return ubi_dbg_fail_bad_hdr(ubi, caller); in ubi_dbg_is_bad_hdr()
344 * @ubi: UBI device description object
349 static inline bool ubi_dbg_is_bad_hdr_ebadmsg(const struct ubi_device *ubi, in ubi_dbg_is_bad_hdr_ebadmsg() argument
352 return ubi_dbg_fail_bad_hdr_ebadmsg(ubi, caller); in ubi_dbg_is_bad_hdr_ebadmsg()
357 * @ubi: UBI device description object
359 * Returns non-zero if the UBI background thread is disabled for testing
362 static inline int ubi_dbg_is_bgt_disabled(const struct ubi_device *ubi) in ubi_dbg_is_bgt_disabled() argument
364 return ubi->dbg.disable_bgt; in ubi_dbg_is_bgt_disabled()
367 static inline int ubi_dbg_chk_io(const struct ubi_device *ubi) in ubi_dbg_chk_io() argument
369 return ubi->dbg.chk_io; in ubi_dbg_chk_io()
372 static inline int ubi_dbg_chk_gen(const struct ubi_device *ubi) in ubi_dbg_chk_gen() argument
374 return ubi->dbg.chk_gen; in ubi_dbg_chk_gen()
377 static inline int ubi_dbg_chk_fastmap(const struct ubi_device *ubi) in ubi_dbg_chk_fastmap() argument
379 return ubi->dbg.chk_fastmap; in ubi_dbg_chk_fastmap()
382 static inline void ubi_enable_dbg_chk_fastmap(struct ubi_device *ubi) in ubi_enable_dbg_chk_fastmap() argument
384 ubi->dbg.chk_fastmap = 1; in ubi_enable_dbg_chk_fastmap()