1 /* 2 * Copyright (c) 2026 BBOX.io 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7 #ifndef _ICE_FAULT_H_ 8 #define _ICE_FAULT_H_ 9 10 #include "ice_opts.h" 11 12 #ifdef DRIVER_FAILPOINTS 13 14 #include <sys/fail.h> 15 16 struct ice_softc; 17 18 SYSCTL_DECL(_debug_fail_point_ice); 19 20 bool ice_fail_point_device_matches(struct ice_softc *sc); 21 22 #define ICE_FAIL_POINT_CODE_COND(_sc, _parent, _name, _cond, _flags, _code...) \ 23 KFAIL_POINT_CODE_COND(_parent, _name, \ 24 ice_fail_point_device_matches((_sc)) && (_cond), _flags, _code) 25 #define ICE_FAIL_POINT_CODE(_sc, _parent, _name, _flags, _code...) \ 26 ICE_FAIL_POINT_CODE_COND(_sc, _parent, _name, true, _flags, _code) 27 28 #else /* !DRIVER_FAILPOINTS */ 29 30 #define ICE_FAIL_POINT_CODE_COND(_sc, _parent, _name, _cond, _flags, _code...) \ 31 do { } while (0) 32 #define ICE_FAIL_POINT_CODE(_sc, _parent, _name, _flags, _code...) \ 33 do { } while (0) 34 35 #endif /* DRIVER_FAILPOINTS */ 36 37 #endif /* _ICE_FAULT_H_ */ 38