Line data Source code
1 :
2 : struct device;
3 :
4 : void *ldv_dev_get_drvdata(const struct device *dev);
5 : int ldv_dev_set_drvdata(struct device *dev, void *data);
6 :
7 : struct spi_master;
8 : struct device;
9 : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
10 :
11 : #include <linux/ldv/err.h>
12 :
13 : #include <linux/types.h>
14 : void *ldv_kzalloc(size_t size, gfp_t flags);
15 :
16 : struct clk;
17 :
18 : extern void ldv_clk_disable(struct clk *clk);
19 : extern int ldv_clk_enable(void);
20 :
21 : #include <linux/ldv/common.h>
22 : #include <linux/ldv/irq.h>
23 : #include <verifier/common.h>
24 : #include <verifier/nondet.h>
25 : #include <verifier/memory.h>
26 : #include <verifier/thread.h>
27 :
28 : #include <linux/device.h>
29 : #include <linux/platform_device.h>
30 : #include <linux/pm.h>
31 : #include <scsi/scsi_host.h>
32 :
33 :
34 : struct ldv_struct_partially_ordered_scenario_1 {
35 : struct device_driver *arg0;
36 : int signal_pending;
37 : };
38 1 :
39 : struct ldv_struct_platform_instance_9 {
40 : int signal_pending;
41 : };
42 :
43 : /* EMG Function declarations */
44 : void ldv_dispatch_default_deregister_5_10_4(void);
45 : void ldv_dispatch_default_register_5_10_5(void);
46 : void ldv_dispatch_deregister_11_1(struct device_driver *);
47 : void ldv_dispatch_insmod_deregister_13_2(void);
48 : void ldv_dispatch_insmod_register_13_3(void);
49 : void ldv_dispatch_pm_deregister_9_5(void);
50 : void ldv_dispatch_pm_register_9_6(void);
51 : void ldv_dispatch_register_12_3(struct device_driver *);
52 : void ldv_emg_driver_unregister(struct device_driver *);
53 : int ldv_emg_scsi_register_driver(struct device_driver *);
54 : void ldv_insmod_10(void *);
55 : void ldv_insmod_exit_sd_10_2(void (*)(void));
56 : int ldv_insmod_init_sd_10_9(int (*)(void));
57 : void ldv_main_13(void *);
58 : void ldv_partially_ordered_scenario_1(void *);
59 : void ldv_partially_ordered_scenario_2(void *);
60 : void ldv_partially_ordered_scenario_3(void *);
61 : void ldv_partially_ordered_scenario_4(void *);
62 : void ldv_partially_ordered_scenario_5(void *);
63 : void ldv_partially_ordered_scenario_6(void *);
64 : void ldv_partially_ordered_scenario_7(void *);
65 : void ldv_partially_ordered_scenario_callback_1_20(void (*)(struct device *), struct device *);
66 : void ldv_partially_ordered_scenario_callback_1_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
67 : void ldv_partially_ordered_scenario_callback_1_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
68 : void ldv_partially_ordered_scenario_callback_1_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
69 : void ldv_partially_ordered_scenario_callback_1_26(int (*)(struct gendisk *), struct gendisk *);
70 : void ldv_partially_ordered_scenario_callback_1_27(int (*)(struct device *), struct device *);
71 : void ldv_partially_ordered_scenario_callback_1_28(void (*)(struct device *), struct device *);
72 : void ldv_partially_ordered_scenario_callback_1_29(int (*)(struct device *), struct device *);
73 : void ldv_partially_ordered_scenario_callback_1_30(int (*)(struct gendisk *), struct gendisk *);
74 : void ldv_partially_ordered_scenario_callback_1_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
75 : void ldv_partially_ordered_scenario_callback_1_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
76 : void ldv_partially_ordered_scenario_callback_1_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
77 : void ldv_partially_ordered_scenario_callback_1_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
78 : void ldv_partially_ordered_scenario_callback_2_20(void (*)(struct device *), struct device *);
79 : void ldv_partially_ordered_scenario_callback_2_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
80 : void ldv_partially_ordered_scenario_callback_2_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
81 : void ldv_partially_ordered_scenario_callback_2_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
82 : void ldv_partially_ordered_scenario_callback_2_26(int (*)(struct gendisk *), struct gendisk *);
83 : void ldv_partially_ordered_scenario_callback_2_27(int (*)(struct device *), struct device *);
84 : void ldv_partially_ordered_scenario_callback_2_28(void (*)(struct device *), struct device *);
85 : void ldv_partially_ordered_scenario_callback_2_29(int (*)(struct device *), struct device *);
86 : void ldv_partially_ordered_scenario_callback_2_30(int (*)(struct gendisk *), struct gendisk *);
87 : void ldv_partially_ordered_scenario_callback_2_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
88 : void ldv_partially_ordered_scenario_callback_2_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
89 : void ldv_partially_ordered_scenario_callback_2_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
90 : void ldv_partially_ordered_scenario_callback_2_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
91 : void ldv_partially_ordered_scenario_callback_3_20(void (*)(struct device *), struct device *);
92 : void ldv_partially_ordered_scenario_callback_3_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
93 : void ldv_partially_ordered_scenario_callback_3_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
94 : void ldv_partially_ordered_scenario_callback_3_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
95 : void ldv_partially_ordered_scenario_callback_3_26(int (*)(struct gendisk *), struct gendisk *);
96 : void ldv_partially_ordered_scenario_callback_3_27(int (*)(struct device *), struct device *);
97 : void ldv_partially_ordered_scenario_callback_3_28(void (*)(struct device *), struct device *);
98 : void ldv_partially_ordered_scenario_callback_3_29(int (*)(struct device *), struct device *);
99 : void ldv_partially_ordered_scenario_callback_3_30(int (*)(struct gendisk *), struct gendisk *);
100 : void ldv_partially_ordered_scenario_callback_3_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
101 : void ldv_partially_ordered_scenario_callback_3_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
102 : void ldv_partially_ordered_scenario_callback_3_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
103 : void ldv_partially_ordered_scenario_callback_3_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
104 : void ldv_partially_ordered_scenario_callback_4_20(void (*)(struct device *), struct device *);
105 : void ldv_partially_ordered_scenario_callback_4_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
106 : void ldv_partially_ordered_scenario_callback_4_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
107 : void ldv_partially_ordered_scenario_callback_4_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
108 : void ldv_partially_ordered_scenario_callback_4_26(int (*)(struct gendisk *), struct gendisk *);
109 : void ldv_partially_ordered_scenario_callback_4_27(int (*)(struct device *), struct device *);
110 : void ldv_partially_ordered_scenario_callback_4_28(void (*)(struct device *), struct device *);
111 : void ldv_partially_ordered_scenario_callback_4_29(int (*)(struct device *), struct device *);
112 : void ldv_partially_ordered_scenario_callback_4_30(int (*)(struct gendisk *), struct gendisk *);
113 : void ldv_partially_ordered_scenario_callback_4_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
114 : void ldv_partially_ordered_scenario_callback_4_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
115 : void ldv_partially_ordered_scenario_callback_4_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
116 : void ldv_partially_ordered_scenario_callback_4_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
117 : void ldv_partially_ordered_scenario_callback_5_20(void (*)(struct device *), struct device *);
118 : void ldv_partially_ordered_scenario_callback_5_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
119 : void ldv_partially_ordered_scenario_callback_5_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
120 : void ldv_partially_ordered_scenario_callback_5_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
121 : void ldv_partially_ordered_scenario_callback_5_26(int (*)(struct gendisk *), struct gendisk *);
122 : void ldv_partially_ordered_scenario_callback_5_27(int (*)(struct device *), struct device *);
123 : void ldv_partially_ordered_scenario_callback_5_28(void (*)(struct device *), struct device *);
124 : void ldv_partially_ordered_scenario_callback_5_29(int (*)(struct device *), struct device *);
125 : void ldv_partially_ordered_scenario_callback_5_30(int (*)(struct gendisk *), struct gendisk *);
126 : void ldv_partially_ordered_scenario_callback_5_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
127 : void ldv_partially_ordered_scenario_callback_5_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
128 : void ldv_partially_ordered_scenario_callback_5_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
129 : void ldv_partially_ordered_scenario_callback_5_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
130 : void ldv_partially_ordered_scenario_callback_6_20(void (*)(struct device *), struct device *);
131 : void ldv_partially_ordered_scenario_callback_6_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
132 : void ldv_partially_ordered_scenario_callback_6_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
133 : void ldv_partially_ordered_scenario_callback_6_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
134 : void ldv_partially_ordered_scenario_callback_6_26(int (*)(struct gendisk *), struct gendisk *);
135 : void ldv_partially_ordered_scenario_callback_6_27(int (*)(struct device *), struct device *);
136 : void ldv_partially_ordered_scenario_callback_6_28(void (*)(struct device *), struct device *);
137 : void ldv_partially_ordered_scenario_callback_6_29(int (*)(struct device *), struct device *);
138 : void ldv_partially_ordered_scenario_callback_6_30(int (*)(struct gendisk *), struct gendisk *);
139 : void ldv_partially_ordered_scenario_callback_6_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
140 : void ldv_partially_ordered_scenario_callback_6_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
141 : void ldv_partially_ordered_scenario_callback_6_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
142 : void ldv_partially_ordered_scenario_callback_6_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
143 : void ldv_partially_ordered_scenario_callback_7_20(void (*)(struct device *), struct device *);
144 : void ldv_partially_ordered_scenario_callback_7_21(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
145 : void ldv_partially_ordered_scenario_callback_7_22(int (*)(struct block_device *, struct hd_geometry *), struct block_device *, struct hd_geometry *);
146 : void ldv_partially_ordered_scenario_callback_7_23(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
147 : void ldv_partially_ordered_scenario_callback_7_26(int (*)(struct gendisk *), struct gendisk *);
148 : void ldv_partially_ordered_scenario_callback_7_27(int (*)(struct device *), struct device *);
149 : void ldv_partially_ordered_scenario_callback_7_28(void (*)(struct device *), struct device *);
150 : void ldv_partially_ordered_scenario_callback_7_29(int (*)(struct device *), struct device *);
151 : void ldv_partially_ordered_scenario_callback_7_30(int (*)(struct gendisk *), struct gendisk *);
152 : void ldv_partially_ordered_scenario_callback_7_31(ssize_t (*)(struct device *, struct device_attribute *, char *), struct device *, struct device_attribute *, char *);
153 : void ldv_partially_ordered_scenario_callback_7_34(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
154 : void ldv_partially_ordered_scenario_callback_7_37(int (*)(struct device *, pm_message_t ), struct device *, struct pm_message);
155 : void ldv_partially_ordered_scenario_callback_7_4(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
156 : int ldv_partially_ordered_scenario_probe_1_11(int (*)(struct device *), struct device *);
157 : int ldv_partially_ordered_scenario_probe_1_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
158 : int ldv_partially_ordered_scenario_probe_2_11(int (*)(struct device *), struct device *);
159 : int ldv_partially_ordered_scenario_probe_2_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
160 : int ldv_partially_ordered_scenario_probe_3_11(int (*)(struct device *), struct device *);
161 : int ldv_partially_ordered_scenario_probe_3_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
162 : int ldv_partially_ordered_scenario_probe_4_11(int (*)(struct device *), struct device *);
163 : int ldv_partially_ordered_scenario_probe_4_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
164 : int ldv_partially_ordered_scenario_probe_5_11(int (*)(struct device *), struct device *);
165 : int ldv_partially_ordered_scenario_probe_5_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
166 : int ldv_partially_ordered_scenario_probe_6_11(int (*)(struct device *), struct device *);
167 : int ldv_partially_ordered_scenario_probe_6_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
168 : int ldv_partially_ordered_scenario_probe_7_11(int (*)(struct device *), struct device *);
169 : int ldv_partially_ordered_scenario_probe_7_38(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
170 : void ldv_partially_ordered_scenario_release_1_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
171 : void ldv_partially_ordered_scenario_release_1_2(void (*)(struct device *), struct device *);
172 : void ldv_partially_ordered_scenario_release_2_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
173 : void ldv_partially_ordered_scenario_release_2_2(void (*)(struct device *), struct device *);
174 : void ldv_partially_ordered_scenario_release_3_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
175 : void ldv_partially_ordered_scenario_release_3_2(void (*)(struct device *), struct device *);
176 : void ldv_partially_ordered_scenario_release_4_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
177 : void ldv_partially_ordered_scenario_release_4_2(void (*)(struct device *), struct device *);
178 : void ldv_partially_ordered_scenario_release_5_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
179 : void ldv_partially_ordered_scenario_release_5_2(void (*)(struct device *), struct device *);
180 : void ldv_partially_ordered_scenario_release_6_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
181 : void ldv_partially_ordered_scenario_release_6_2(void (*)(struct device *), struct device *);
182 : void ldv_partially_ordered_scenario_release_7_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
183 : void ldv_partially_ordered_scenario_release_7_2(void (*)(struct device *), struct device *);
184 : void ldv_platform_instance_9(void *);
185 : int ldv_platform_instance_probe_9_15(int (*)(struct platform_device *), struct platform_device *);
186 : void ldv_platform_instance_release_9_3(int (*)(struct platform_device *), struct platform_device *);
187 : void ldv_pm_ops_scenario_8(void *);
188 : void ldv_pm_ops_scenario_complete_8_3(void (*)(struct device *), struct device *);
189 : void ldv_pm_ops_scenario_freeze_8_13(int (*)(struct device *), struct device *);
190 : void ldv_pm_ops_scenario_freeze_noirq_8_11(int (*)(struct device *), struct device *);
191 : void ldv_pm_ops_scenario_poweroff_8_8(int (*)(struct device *), struct device *);
192 : void ldv_pm_ops_scenario_poweroff_noirq_8_7(int (*)(struct device *), struct device *);
193 : void ldv_pm_ops_scenario_prepare_8_19(int (*)(struct device *), struct device *);
194 : void ldv_pm_ops_scenario_restore_8_4(int (*)(struct device *), struct device *);
195 : void ldv_pm_ops_scenario_restore_noirq_8_6(int (*)(struct device *), struct device *);
196 : void ldv_pm_ops_scenario_resume_8_14(int (*)(struct device *), struct device *);
197 : void ldv_pm_ops_scenario_resume_noirq_8_16(int (*)(struct device *), struct device *);
198 : void ldv_pm_ops_scenario_runtime_idle_8_24(int (*)(struct device *), struct device *);
199 : void ldv_pm_ops_scenario_runtime_resume_8_21(int (*)(struct device *), struct device *);
200 : void ldv_pm_ops_scenario_runtime_suspend_8_22(int (*)(struct device *), struct device *);
201 : void ldv_pm_ops_scenario_suspend_8_18(int (*)(struct device *), struct device *);
202 : void ldv_pm_ops_scenario_suspend_noirq_8_17(int (*)(struct device *), struct device *);
203 : void ldv_pm_ops_scenario_thaw_8_9(int (*)(struct device *), struct device *);
204 : void ldv_pm_ops_scenario_thaw_noirq_8_10(int (*)(struct device *), struct device *);
205 : int main(void);
206 :
207 : /* EMG variable declarations */
208 1 : struct ldv_thread ldv_thread_1;
209 1 : struct ldv_thread ldv_thread_10;
210 1 : struct ldv_thread ldv_thread_13;
211 1 : struct ldv_thread ldv_thread_2;
212 1 : struct ldv_thread ldv_thread_3;
213 1 : struct ldv_thread ldv_thread_4;
214 1 : struct ldv_thread ldv_thread_5;
215 1 : struct ldv_thread ldv_thread_6;
216 1 : struct ldv_thread ldv_thread_7;
217 1 : struct ldv_thread ldv_thread_8;
218 1 : struct ldv_thread ldv_thread_9;
219 :
220 : /* EMG variable initialization */
221 :
222 : /* EMG function definitions */
223 : /* AUX_FUNC ldv_dispatch_default_deregister_5_10_4 */
224 : void ldv_dispatch_default_deregister_5_10_4() {
225 : struct ldv_struct_platform_instance_9 *cf_arg_9;
226 : /* Skip thread join call */
227 1 : return;
228 : }
229 :
230 : /* AUX_FUNC ldv_dispatch_default_register_5_10_5 */
231 : void ldv_dispatch_default_register_5_10_5() {
232 : struct ldv_struct_platform_instance_9 *cf_arg_9;
233 4 : cf_arg_9 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_9));
234 3 : ldv_platform_instance_9(cf_arg_9);
235 1 : return;
236 : }
237 :
238 : /* AUX_FUNC ldv_dispatch_deregister_11_1 */
239 : void ldv_dispatch_deregister_11_1(struct device_driver *arg0) {
240 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_1;
241 2 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_2;
242 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_3;
243 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_4;
244 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_5;
245 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_6;
246 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_7;
247 4 : switch (ldv_undef_int()) {
248 6 : case 0: {
249 : /* Skip thread join call */
250 2 : break;
251 2 : };
252 6 : case 1: {
253 : /* Skip thread join call */
254 2 : break;
255 2 : };
256 6 : case 2: {
257 : /* Skip thread join call */
258 2 : break;
259 2 : };
260 6 : case 3: {
261 : /* Skip thread join call */
262 2 : break;
263 2 : };
264 6 : case 4: {
265 : /* Skip thread join call */
266 2 : break;
267 2 : };
268 6 : case 5: {
269 : /* Skip thread join call */
270 2 : break;
271 2 : };
272 6 : case 6: {
273 : /* Skip thread join call */
274 2 : break;
275 2 : };
276 4 : default: ldv_stop();
277 2 : };
278 2 : return;
279 : }
280 0 :
281 : /* AUX_FUNC ldv_dispatch_insmod_deregister_13_2 */
282 : void ldv_dispatch_insmod_deregister_13_2() {
283 : struct ldv_struct_platform_instance_9 *cf_arg_10;
284 : /* Skip thread join call */
285 1 : return;
286 : }
287 :
288 : /* AUX_FUNC ldv_dispatch_insmod_register_13_3 */
289 : void ldv_dispatch_insmod_register_13_3() {
290 : struct ldv_struct_platform_instance_9 *cf_arg_10;
291 4 : cf_arg_10 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_9));
292 4 : ldv_insmod_10(cf_arg_10);
293 1 : return;
294 : }
295 :
296 : /* AUX_FUNC ldv_dispatch_pm_deregister_9_5 */
297 : void ldv_dispatch_pm_deregister_9_5() {
298 : struct ldv_struct_platform_instance_9 *cf_arg_8;
299 : /* Skip thread join call */
300 1 : return;
301 : }
302 :
303 : /* AUX_FUNC ldv_dispatch_pm_register_9_6 */
304 : void ldv_dispatch_pm_register_9_6() {
305 : struct ldv_struct_platform_instance_9 *cf_arg_8;
306 4 : cf_arg_8 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_9));
307 3 : ldv_pm_ops_scenario_8(cf_arg_8);
308 1 : return;
309 : }
310 :
311 : /* AUX_FUNC ldv_dispatch_register_12_3 */
312 : void ldv_dispatch_register_12_3(struct device_driver *arg0) {
313 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_1;
314 1 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_2;
315 1 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_3;
316 1 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_4;
317 1 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_5;
318 1 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_6;
319 1 : struct ldv_struct_partially_ordered_scenario_1 *cf_arg_7;
320 3 : switch (ldv_undef_int()) {
321 4 : case 0: {
322 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
323 2 : cf_arg_1->arg0 = arg0;
324 3 : ldv_partially_ordered_scenario_1(cf_arg_1);
325 2 : break;
326 2 : };
327 4 : case 1: {
328 4 : cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
329 1 : cf_arg_2->arg0 = arg0;
330 2 : ldv_partially_ordered_scenario_2(cf_arg_2);
331 1 : break;
332 1 : };
333 3 : case 2: {
334 3 : cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
335 1 : cf_arg_3->arg0 = arg0;
336 2 : ldv_partially_ordered_scenario_3(cf_arg_3);
337 1 : break;
338 1 : };
339 3 : case 3: {
340 3 : cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
341 1 : cf_arg_4->arg0 = arg0;
342 2 : ldv_partially_ordered_scenario_4(cf_arg_4);
343 1 : break;
344 1 : };
345 3 : case 4: {
346 3 : cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
347 1 : cf_arg_5->arg0 = arg0;
348 2 : ldv_partially_ordered_scenario_5(cf_arg_5);
349 1 : break;
350 1 : };
351 3 : case 5: {
352 3 : cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
353 1 : cf_arg_6->arg0 = arg0;
354 2 : ldv_partially_ordered_scenario_6(cf_arg_6);
355 1 : break;
356 1 : };
357 3 : case 6: {
358 3 : cf_arg_7 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
359 1 : cf_arg_7->arg0 = arg0;
360 2 : ldv_partially_ordered_scenario_7(cf_arg_7);
361 1 : break;
362 1 : };
363 2 : default: ldv_stop();
364 1 : };
365 7 : return;
366 : }
367 0 :
368 : /* AUX_FUNC ldv_emg_driver_unregister */
369 : void ldv_emg_driver_unregister(struct device_driver *arg0) {
370 : /* LDV {"comment": "Control function 'driver_unregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_driver_unregister"} */
371 2 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
372 : struct device_driver *ldv_11_device_driver_device_driver;
373 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
374 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'device_driver' callbacks to deregister."} */
375 2 : ldv_11_device_driver_device_driver = arg0;
376 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
377 :
378 : /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister DEVICE_DRIVER callbacks."} */
379 4 : ldv_dispatch_deregister_11_1(ldv_11_device_driver_device_driver);
380 : /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
381 :
382 : /* Exit function at a terminal state */
383 2 : return;
384 : /* End of the process */
385 : return;
386 : /* LDV {"comment": "End of control function based on process 'driver_unregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_driver_unregister"} */
387 : }
388 :
389 : /* AUX_FUNC ldv_emg_scsi_register_driver */
390 : int ldv_emg_scsi_register_driver(struct device_driver *arg0) {
391 : /* LDV {"comment": "Control function 'scsi_register_driver'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_scsi_register_driver"} */
392 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
393 1 : struct device_driver *ldv_12_device_driver_device_driver;
394 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
395 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
396 :
397 4 : if (ldv_undef_int()) {
398 : /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'device_driver' callbacks to register."} */
399 1 : ldv_12_device_driver_device_driver = arg0;
400 : /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
401 :
402 : /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register DEVICE_DRIVER callbacks."} */
403 8 : ldv_dispatch_register_12_3(ldv_12_device_driver_device_driver);
404 : /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
405 :
406 : /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'device_driver' callbacks."} */
407 3 : return ldv_undef_int_negative();
408 : /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
409 :
410 : /* Exit function at a terminal state */
411 : }
412 : else {
413 : /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'device_driver' callbacks has been successful."} */
414 1 : return 0;
415 : /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
416 :
417 : /* Exit function at a terminal state */
418 : }
419 : /* End of the process */
420 : /* LDV {"comment": "End of control function based on process 'scsi_register_driver'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_scsi_register_driver"} */
421 : }
422 :
423 : /* AUX_FUNC ldv_insmod_10 */
424 : void ldv_insmod_10(void *arg0) {
425 : /* LDV {"thread": 10, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_10"} */
426 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
427 1 : void (*ldv_10_exit_sd_default)(void);
428 1 : int (*ldv_10_init_sd_default)(void);
429 1 : int ldv_10_ret_default;
430 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
431 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
432 2 : ldv_free(arg0);
433 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
434 :
435 : /* LDV {"action": "INIT_SD", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'init_sd' function. Invoke callback init_sd from ARTIFICIAL."} */
436 : /* LDV {"type": "CALLBACK", "call": "ldv_10_ret_default = (init_sd)();", "comment": "init_sd"} */
437 2 : ldv_10_ret_default = ldv_insmod_init_sd_10_9(ldv_10_init_sd_default);
438 : /* Callback post-call */
439 2 : ldv_10_ret_default = ldv_post_init(ldv_10_ret_default);
440 : /* LDV {"action": "INIT_SD", "type": "CALL_END"} */
441 :
442 4 : if (ldv_undef_int()) {
443 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
444 2 : ldv_assume(ldv_10_ret_default != 0);
445 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
446 :
447 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
448 : /* Skip a non-replicative signal receiving */
449 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
450 :
451 : /* Exit function at a terminal state */
452 1 : return;
453 : }
454 : else {
455 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
456 2 : ldv_assume(ldv_10_ret_default == 0);
457 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
458 :
459 4 : if (ldv_undef_int()) {
460 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Register 'PM' callbacks with unknown registration function."} */
461 2 : ldv_dispatch_default_register_5_10_5();
462 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_END"} */
463 :
464 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Deregister 'PM' callbacks with unknown deregistration function."} */
465 2 : ldv_dispatch_default_deregister_5_10_4();
466 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_END"} */
467 :
468 : }
469 : else {
470 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
471 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
472 :
473 : }
474 : /* LDV {"action": "EXIT_SD", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'exit_sd' function. Invoke callback exit_sd from ARTIFICIAL."} */
475 : /* LDV {"type": "CALLBACK", "call": "(exit_sd)();", "comment": "exit_sd"} */
476 4 : ldv_insmod_exit_sd_10_2(ldv_10_exit_sd_default);
477 : /* LDV {"action": "EXIT_SD", "type": "CALL_END"} */
478 :
479 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
480 : /* Skip a non-replicative signal receiving */
481 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
482 :
483 : /* Exit function at a terminal state */
484 1 : return;
485 : }
486 : /* End of the process */
487 : return;
488 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_10"} */
489 : }
490 :
491 : /* AUX_FUNC_CALLBACK ldv_insmod_exit_sd_10_2 */
492 : void ldv_insmod_exit_sd_10_2(void (*arg0)(void)) {
493 4 : (exit_sd)();
494 2 : }
495 :
496 : /* AUX_FUNC_CALLBACK ldv_insmod_init_sd_10_9 */
497 : int ldv_insmod_init_sd_10_9(int (*arg0)(void)) {
498 5 : return (init_sd)();
499 1 : }
500 :
501 : /* AUX_FUNC ldv_main_13 */
502 : void ldv_main_13(void *arg0) {
503 : /* LDV {"thread": 13, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_13"} */
504 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
505 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
506 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
507 1 : ldv_initialize();
508 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
509 :
510 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
511 2 : ldv_dispatch_insmod_register_13_3();
512 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
513 :
514 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
515 2 : ldv_dispatch_insmod_deregister_13_2();
516 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
517 :
518 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
519 1 : ldv_check_final_state();
520 1 : ldv_stop();
521 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
522 :
523 : /* Exit function at a terminal state */
524 0 : return;
525 : /* End of the process */
526 : return;
527 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_13"} */
528 : }
529 :
530 : /* AUX_FUNC ldv_partially_ordered_scenario_1 */
531 : void ldv_partially_ordered_scenario_1(void *arg0) {
532 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_1"} */
533 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
534 : int (*ldv_1_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
535 1 : void (*ldv_1_callback_dev_release)(struct device *);
536 1 : int (*ldv_1_callback_done)(struct scsi_cmnd *);
537 1 : int (*ldv_1_callback_getgeo)(struct block_device *, struct hd_geometry *);
538 1 : int (*ldv_1_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
539 : int (*ldv_1_callback_media_changed)(struct gendisk *);
540 1 : int (*ldv_1_callback_remove)(struct device *);
541 1 : void (*ldv_1_callback_rescan)(struct device *);
542 1 : int (*ldv_1_callback_resume)(struct device *);
543 1 : int (*ldv_1_callback_revalidate_disk)(struct gendisk *);
544 1 : ssize_t (*ldv_1_callback_show)(struct device *, struct device_attribute *, char *);
545 1 : ssize_t (*ldv_1_callback_store)(struct device *, struct device_attribute *, char *, size_t );
546 1 : int (*ldv_1_callback_suspend)(struct device *, pm_message_t );
547 : struct device_driver *ldv_1_container_device_driver;
548 1 : struct block_device_operations *ldv_1_container_struct_block_device_operations;
549 1 : unsigned int ldv_1_ldv_param_15_1_default;
550 1 : unsigned int ldv_1_ldv_param_23_1_default;
551 1 : unsigned int ldv_1_ldv_param_23_2_default;
552 1 : long unsigned int ldv_1_ldv_param_23_3_default;
553 1 : char *ldv_1_ldv_param_31_2_default;
554 1 : char *ldv_1_ldv_param_34_2_default;
555 1 : long unsigned int ldv_1_ldv_param_34_3_default;
556 1 : unsigned int ldv_1_ldv_param_38_1_default;
557 1 : unsigned int ldv_1_ldv_param_4_1_default;
558 1 : unsigned int ldv_1_ldv_param_4_2_default;
559 1 : long unsigned int ldv_1_ldv_param_4_3_default;
560 1 : struct block_device *ldv_1_resource_struct_block_device_ptr;
561 1 : struct device_attribute *ldv_1_resource_struct_device_attribute;
562 1 : struct device *ldv_1_resource_struct_device_ptr;
563 1 : struct gendisk *ldv_1_resource_struct_gendisk_ptr;
564 1 : struct hd_geometry *ldv_1_resource_struct_hd_geometry_ptr;
565 1 : struct pm_message ldv_1_resource_struct_pm_message;
566 1 : struct scsi_cmnd *ldv_1_resource_struct_scsi_cmnd_ptr;
567 1 : int ldv_1_ret_default;
568 1 : /* Received labels */
569 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
570 1 :
571 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
572 1 : /* Initialize automaton variables */
573 2 : ldv_1_ret_default = 1;
574 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
575 1 : /* Assign recieved labels */
576 3 : if (data) {
577 2 : ldv_1_container_device_driver = data->arg0;
578 3 : ldv_free(data);
579 1 : }
580 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
581 1 :
582 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
583 6 : ldv_1_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
584 3 : ldv_1_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
585 3 : ldv_1_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
586 3 : ldv_1_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
587 3 : ldv_1_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
588 3 : ldv_1_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
589 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
590 :
591 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
592 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
593 :
594 : /* Jump to a subprocess 'main' initial state */
595 1 : goto ldv_main_1;
596 : /* End of the process */
597 : return;
598 1 :
599 : /* Sbprocess main */
600 : ldv_main_1:
601 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
602 :
603 4 : if (ldv_undef_int()) {
604 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
605 2 : ldv_free(ldv_1_resource_struct_block_device_ptr);
606 2 : ldv_free(ldv_1_resource_struct_device_attribute);
607 2 : ldv_free(ldv_1_resource_struct_device_ptr);
608 2 : ldv_free(ldv_1_resource_struct_gendisk_ptr);
609 2 : ldv_free(ldv_1_resource_struct_hd_geometry_ptr);
610 2 : ldv_free(ldv_1_resource_struct_scsi_cmnd_ptr);
611 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
612 :
613 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
614 : /* Skip a non-replicative signal receiving */
615 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
616 :
617 : /* Exit function at a terminal state */
618 1 : return;
619 : }
620 : else {
621 4 : if (ldv_undef_int()) {
622 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
623 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
624 :
625 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
626 : /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& sd_open))(ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_38_1_default);", "comment": "probe"} */
627 2 : ldv_1_ret_default = ldv_partially_ordered_scenario_probe_1_38(ldv_1_container_struct_block_device_operations->open, ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_38_1_default);
628 : /* Callback post-call */
629 2 : ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
630 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
631 :
632 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
633 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
634 :
635 : }
636 : else {
637 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
638 : /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& sd_probe))(ldv_1_resource_struct_device_ptr);", "comment": "probe"} */
639 2 : ldv_1_ret_default = ldv_partially_ordered_scenario_probe_1_11(ldv_1_container_device_driver->probe, ldv_1_resource_struct_device_ptr);
640 : /* Callback post-call */
641 2 : ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
642 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
643 :
644 : }
645 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
646 :
647 6 : if (ldv_undef_int()) {
648 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
649 2 : ldv_assume(ldv_1_ret_default == 0);
650 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
651 :
652 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
653 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
654 :
655 : /* Jump to a subprocess 'call' initial state */
656 1 : goto ldv_call_1;
657 : }
658 : else {
659 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
660 2 : ldv_assume(ldv_1_ret_default != 0);
661 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
662 :
663 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
664 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
665 :
666 : /* Jump to a subprocess 'main' initial state */
667 1 : goto ldv_main_1;
668 : }
669 : }
670 : /* End of the subprocess 'main' */
671 : return;
672 1 :
673 : /* Sbprocess call */
674 : ldv_call_1:
675 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
676 :
677 2 : switch (ldv_undef_int()) {
678 3 : case 1: {
679 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
680 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
681 :
682 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
683 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_1_resource_struct_gendisk_ptr, ldv_1_ldv_param_15_1_default);", "comment": "release"} */
684 2 : ldv_partially_ordered_scenario_release_1_15(ldv_1_container_struct_block_device_operations->release, ldv_1_resource_struct_gendisk_ptr, ldv_1_ldv_param_15_1_default);
685 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
686 :
687 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
688 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
689 :
690 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
691 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
692 :
693 : /* Jump to a subprocess 'main' initial state */
694 1 : goto ldv_main_1;
695 1 : break;
696 : }
697 3 : case 2: {
698 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
699 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_1_resource_struct_device_ptr);", "comment": "release"} */
700 2 : ldv_partially_ordered_scenario_release_1_2(ldv_1_container_device_driver->shutdown, ldv_1_resource_struct_device_ptr);
701 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
702 :
703 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
704 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
705 :
706 : /* Jump to a subprocess 'main' initial state */
707 1 : goto ldv_main_1;
708 : /* Jump to a subprocess 'main' initial state */
709 : goto ldv_main_1;
710 1 : break;
711 : }
712 3 : case 3: {
713 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
714 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
715 :
716 2 : switch (ldv_undef_int()) {
717 3 : case 1: {
718 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
719 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_1_resource_struct_device_ptr, ldv_1_resource_struct_pm_message);", "comment": "callback"} */
720 2 : ldv_partially_ordered_scenario_callback_1_37(ldv_1_callback_suspend, ldv_1_resource_struct_device_ptr, ldv_1_resource_struct_pm_message);
721 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
722 :
723 1 : break;
724 1 : }
725 3 : case 2: {
726 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
727 3 : ldv_1_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
728 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
729 :
730 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
731 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_allow_restart))(ldv_1_resource_struct_device_ptr, ldv_1_resource_struct_device_attribute, ldv_1_ldv_param_34_2_default, ldv_1_ldv_param_34_3_default);", "comment": "callback"} */
732 2 : ldv_partially_ordered_scenario_callback_1_34(ldv_1_callback_store, ldv_1_resource_struct_device_ptr, ldv_1_resource_struct_device_attribute, ldv_1_ldv_param_34_2_default, ldv_1_ldv_param_34_3_default);
733 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
734 :
735 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
736 2 : ldv_free(ldv_1_ldv_param_34_2_default);
737 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
738 :
739 1 : break;
740 1 : }
741 3 : case 3: {
742 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
743 3 : ldv_1_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
744 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
745 :
746 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
747 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_allow_restart))(ldv_1_resource_struct_device_ptr, ldv_1_resource_struct_device_attribute, ldv_1_ldv_param_31_2_default);", "comment": "callback"} */
748 2 : ldv_partially_ordered_scenario_callback_1_31(ldv_1_callback_show, ldv_1_resource_struct_device_ptr, ldv_1_resource_struct_device_attribute, ldv_1_ldv_param_31_2_default);
749 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
750 :
751 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
752 2 : ldv_free(ldv_1_ldv_param_31_2_default);
753 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
754 :
755 1 : break;
756 1 : }
757 3 : case 4: {
758 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
759 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_1_resource_struct_gendisk_ptr);", "comment": "callback"} */
760 2 : ldv_partially_ordered_scenario_callback_1_30(ldv_1_callback_revalidate_disk, ldv_1_resource_struct_gendisk_ptr);
761 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
762 :
763 1 : break;
764 1 : }
765 3 : case 5: {
766 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
767 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_1_resource_struct_device_ptr);", "comment": "callback"} */
768 2 : ldv_partially_ordered_scenario_callback_1_29(ldv_1_callback_resume, ldv_1_resource_struct_device_ptr);
769 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
770 :
771 1 : break;
772 1 : }
773 3 : case 6: {
774 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
775 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_1_resource_struct_device_ptr);", "comment": "callback"} */
776 2 : ldv_partially_ordered_scenario_callback_1_28(ldv_1_callback_rescan, ldv_1_resource_struct_device_ptr);
777 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
778 :
779 1 : break;
780 1 : }
781 3 : case 7: {
782 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
783 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_1_resource_struct_device_ptr);", "comment": "callback"} */
784 2 : ldv_partially_ordered_scenario_callback_1_27(ldv_1_callback_remove, ldv_1_resource_struct_device_ptr);
785 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
786 :
787 1 : break;
788 1 : }
789 3 : case 8: {
790 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
791 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_1_resource_struct_gendisk_ptr);", "comment": "callback"} */
792 2 : ldv_partially_ordered_scenario_callback_1_26(ldv_1_callback_media_changed, ldv_1_resource_struct_gendisk_ptr);
793 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
794 :
795 1 : break;
796 1 : }
797 3 : case 9: {
798 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
799 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
800 :
801 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
802 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_23_1_default, ldv_1_ldv_param_23_2_default, ldv_1_ldv_param_23_3_default);", "comment": "callback"} */
803 2 : ldv_partially_ordered_scenario_callback_1_23(ldv_1_callback_locked_ioctl, ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_23_1_default, ldv_1_ldv_param_23_2_default, ldv_1_ldv_param_23_3_default);
804 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
805 :
806 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
807 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
808 :
809 1 : break;
810 1 : }
811 3 : case 10: {
812 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
813 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_1_resource_struct_block_device_ptr, ldv_1_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
814 2 : ldv_partially_ordered_scenario_callback_1_22(ldv_1_callback_getgeo, ldv_1_resource_struct_block_device_ptr, ldv_1_resource_struct_hd_geometry_ptr);
815 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
816 :
817 1 : break;
818 1 : }
819 3 : case 11: {
820 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
821 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_1_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
822 2 : ldv_partially_ordered_scenario_callback_1_21(ldv_1_callback_done, ldv_1_resource_struct_scsi_cmnd_ptr);
823 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
824 :
825 1 : break;
826 1 : }
827 3 : case 12: {
828 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
829 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_1_resource_struct_device_ptr);", "comment": "callback"} */
830 2 : ldv_partially_ordered_scenario_callback_1_20(ldv_1_callback_dev_release, ldv_1_resource_struct_device_ptr);
831 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
832 :
833 1 : break;
834 1 : }
835 3 : case 13: {
836 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
837 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_4_1_default, ldv_1_ldv_param_4_2_default, ldv_1_ldv_param_4_3_default);", "comment": "callback"} */
838 2 : ldv_partially_ordered_scenario_callback_1_4(ldv_1_callback_compat_ioctl, ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_4_1_default, ldv_1_ldv_param_4_2_default, ldv_1_ldv_param_4_3_default);
839 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
840 :
841 1 : break;
842 1 : }
843 2 : default: ldv_stop();
844 1 : }
845 13 : break;
846 1 : }
847 2 : default: ldv_stop();
848 1 : }
849 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
850 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
851 0 :
852 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
853 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
854 :
855 : /* Jump to a subprocess 'call' initial state */
856 13 : goto ldv_call_1;
857 : /* End of the subprocess 'call' */
858 : return;
859 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_1"} */
860 : }
861 :
862 : /* AUX_FUNC ldv_partially_ordered_scenario_2 */
863 : void ldv_partially_ordered_scenario_2(void *arg0) {
864 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_2"} */
865 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
866 : int (*ldv_2_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
867 1 : void (*ldv_2_callback_dev_release)(struct device *);
868 1 : int (*ldv_2_callback_done)(struct scsi_cmnd *);
869 1 : int (*ldv_2_callback_getgeo)(struct block_device *, struct hd_geometry *);
870 1 : int (*ldv_2_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
871 : int (*ldv_2_callback_media_changed)(struct gendisk *);
872 1 : int (*ldv_2_callback_remove)(struct device *);
873 1 : void (*ldv_2_callback_rescan)(struct device *);
874 1 : int (*ldv_2_callback_resume)(struct device *);
875 1 : int (*ldv_2_callback_revalidate_disk)(struct gendisk *);
876 1 : ssize_t (*ldv_2_callback_show)(struct device *, struct device_attribute *, char *);
877 1 : ssize_t (*ldv_2_callback_store)(struct device *, struct device_attribute *, char *, size_t );
878 1 : int (*ldv_2_callback_suspend)(struct device *, pm_message_t );
879 : struct device_driver *ldv_2_container_device_driver;
880 1 : struct block_device_operations *ldv_2_container_struct_block_device_operations;
881 1 : unsigned int ldv_2_ldv_param_15_1_default;
882 1 : unsigned int ldv_2_ldv_param_23_1_default;
883 1 : unsigned int ldv_2_ldv_param_23_2_default;
884 1 : long unsigned int ldv_2_ldv_param_23_3_default;
885 1 : char *ldv_2_ldv_param_31_2_default;
886 1 : char *ldv_2_ldv_param_34_2_default;
887 1 : long unsigned int ldv_2_ldv_param_34_3_default;
888 1 : unsigned int ldv_2_ldv_param_38_1_default;
889 1 : unsigned int ldv_2_ldv_param_4_1_default;
890 1 : unsigned int ldv_2_ldv_param_4_2_default;
891 1 : long unsigned int ldv_2_ldv_param_4_3_default;
892 1 : struct block_device *ldv_2_resource_struct_block_device_ptr;
893 1 : struct device_attribute *ldv_2_resource_struct_device_attribute;
894 1 : struct device *ldv_2_resource_struct_device_ptr;
895 1 : struct gendisk *ldv_2_resource_struct_gendisk_ptr;
896 1 : struct hd_geometry *ldv_2_resource_struct_hd_geometry_ptr;
897 1 : struct pm_message ldv_2_resource_struct_pm_message;
898 1 : struct scsi_cmnd *ldv_2_resource_struct_scsi_cmnd_ptr;
899 1 : int ldv_2_ret_default;
900 1 : /* Received labels */
901 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
902 1 :
903 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
904 1 : /* Initialize automaton variables */
905 2 : ldv_2_ret_default = 1;
906 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
907 1 : /* Assign recieved labels */
908 3 : if (data) {
909 2 : ldv_2_container_device_driver = data->arg0;
910 3 : ldv_free(data);
911 1 : }
912 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
913 1 :
914 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
915 6 : ldv_2_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
916 3 : ldv_2_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
917 3 : ldv_2_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
918 3 : ldv_2_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
919 3 : ldv_2_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
920 3 : ldv_2_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
921 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
922 :
923 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
924 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
925 :
926 : /* Jump to a subprocess 'main' initial state */
927 1 : goto ldv_main_2;
928 : /* End of the process */
929 : return;
930 1 :
931 : /* Sbprocess main */
932 : ldv_main_2:
933 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
934 :
935 4 : if (ldv_undef_int()) {
936 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
937 2 : ldv_free(ldv_2_resource_struct_block_device_ptr);
938 2 : ldv_free(ldv_2_resource_struct_device_attribute);
939 2 : ldv_free(ldv_2_resource_struct_device_ptr);
940 2 : ldv_free(ldv_2_resource_struct_gendisk_ptr);
941 2 : ldv_free(ldv_2_resource_struct_hd_geometry_ptr);
942 2 : ldv_free(ldv_2_resource_struct_scsi_cmnd_ptr);
943 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
944 :
945 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
946 : /* Skip a non-replicative signal receiving */
947 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
948 :
949 : /* Exit function at a terminal state */
950 1 : return;
951 : }
952 : else {
953 4 : if (ldv_undef_int()) {
954 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
955 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
956 :
957 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
958 : /* LDV {"type": "CALLBACK", "call": "ldv_2_ret_default = ((& sd_open))(ldv_2_resource_struct_block_device_ptr, ldv_2_ldv_param_38_1_default);", "comment": "probe"} */
959 2 : ldv_2_ret_default = ldv_partially_ordered_scenario_probe_2_38(ldv_2_container_struct_block_device_operations->open, ldv_2_resource_struct_block_device_ptr, ldv_2_ldv_param_38_1_default);
960 : /* Callback post-call */
961 2 : ldv_2_ret_default = ldv_filter_err_code(ldv_2_ret_default);
962 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
963 :
964 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
965 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
966 :
967 : }
968 : else {
969 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
970 : /* LDV {"type": "CALLBACK", "call": "ldv_2_ret_default = ((& sd_probe))(ldv_2_resource_struct_device_ptr);", "comment": "probe"} */
971 2 : ldv_2_ret_default = ldv_partially_ordered_scenario_probe_2_11(ldv_2_container_device_driver->probe, ldv_2_resource_struct_device_ptr);
972 : /* Callback post-call */
973 2 : ldv_2_ret_default = ldv_filter_err_code(ldv_2_ret_default);
974 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
975 :
976 : }
977 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
978 :
979 6 : if (ldv_undef_int()) {
980 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
981 2 : ldv_assume(ldv_2_ret_default == 0);
982 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
983 :
984 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
985 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
986 :
987 : /* Jump to a subprocess 'call' initial state */
988 1 : goto ldv_call_2;
989 : }
990 : else {
991 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
992 2 : ldv_assume(ldv_2_ret_default != 0);
993 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
994 :
995 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
996 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
997 :
998 : /* Jump to a subprocess 'main' initial state */
999 1 : goto ldv_main_2;
1000 : }
1001 : }
1002 : /* End of the subprocess 'main' */
1003 : return;
1004 1 :
1005 : /* Sbprocess call */
1006 : ldv_call_2:
1007 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1008 :
1009 2 : switch (ldv_undef_int()) {
1010 3 : case 1: {
1011 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1012 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
1013 :
1014 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
1015 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_2_resource_struct_gendisk_ptr, ldv_2_ldv_param_15_1_default);", "comment": "release"} */
1016 2 : ldv_partially_ordered_scenario_release_2_15(ldv_2_container_struct_block_device_operations->release, ldv_2_resource_struct_gendisk_ptr, ldv_2_ldv_param_15_1_default);
1017 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
1018 :
1019 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1020 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
1021 :
1022 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1023 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1024 :
1025 : /* Jump to a subprocess 'main' initial state */
1026 1 : goto ldv_main_2;
1027 1 : break;
1028 : }
1029 3 : case 2: {
1030 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
1031 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_2_resource_struct_device_ptr);", "comment": "release"} */
1032 2 : ldv_partially_ordered_scenario_release_2_2(ldv_2_container_device_driver->shutdown, ldv_2_resource_struct_device_ptr);
1033 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
1034 :
1035 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1036 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1037 :
1038 : /* Jump to a subprocess 'main' initial state */
1039 1 : goto ldv_main_2;
1040 : /* Jump to a subprocess 'main' initial state */
1041 : goto ldv_main_2;
1042 1 : break;
1043 : }
1044 3 : case 3: {
1045 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1046 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1047 :
1048 2 : switch (ldv_undef_int()) {
1049 3 : case 1: {
1050 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
1051 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_2_resource_struct_device_ptr, ldv_2_resource_struct_pm_message);", "comment": "callback"} */
1052 2 : ldv_partially_ordered_scenario_callback_2_37(ldv_2_callback_suspend, ldv_2_resource_struct_device_ptr, ldv_2_resource_struct_pm_message);
1053 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1054 :
1055 1 : break;
1056 1 : }
1057 3 : case 2: {
1058 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1059 3 : ldv_2_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
1060 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
1061 :
1062 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1063 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_manage_start_stop))(ldv_2_resource_struct_device_ptr, ldv_2_resource_struct_device_attribute, ldv_2_ldv_param_34_2_default, ldv_2_ldv_param_34_3_default);", "comment": "callback"} */
1064 2 : ldv_partially_ordered_scenario_callback_2_34(ldv_2_callback_store, ldv_2_resource_struct_device_ptr, ldv_2_resource_struct_device_attribute, ldv_2_ldv_param_34_2_default, ldv_2_ldv_param_34_3_default);
1065 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1066 :
1067 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1068 2 : ldv_free(ldv_2_ldv_param_34_2_default);
1069 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
1070 :
1071 1 : break;
1072 1 : }
1073 3 : case 3: {
1074 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1075 3 : ldv_2_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
1076 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
1077 :
1078 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1079 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_app_tag_own))(ldv_2_resource_struct_device_ptr, ldv_2_resource_struct_device_attribute, ldv_2_ldv_param_31_2_default);", "comment": "callback"} */
1080 2 : ldv_partially_ordered_scenario_callback_2_31(ldv_2_callback_show, ldv_2_resource_struct_device_ptr, ldv_2_resource_struct_device_attribute, ldv_2_ldv_param_31_2_default);
1081 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1082 :
1083 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1084 2 : ldv_free(ldv_2_ldv_param_31_2_default);
1085 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
1086 :
1087 1 : break;
1088 1 : }
1089 3 : case 4: {
1090 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
1091 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_2_resource_struct_gendisk_ptr);", "comment": "callback"} */
1092 2 : ldv_partially_ordered_scenario_callback_2_30(ldv_2_callback_revalidate_disk, ldv_2_resource_struct_gendisk_ptr);
1093 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1094 :
1095 1 : break;
1096 1 : }
1097 3 : case 5: {
1098 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
1099 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_2_resource_struct_device_ptr);", "comment": "callback"} */
1100 2 : ldv_partially_ordered_scenario_callback_2_29(ldv_2_callback_resume, ldv_2_resource_struct_device_ptr);
1101 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1102 :
1103 1 : break;
1104 1 : }
1105 3 : case 6: {
1106 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
1107 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_2_resource_struct_device_ptr);", "comment": "callback"} */
1108 2 : ldv_partially_ordered_scenario_callback_2_28(ldv_2_callback_rescan, ldv_2_resource_struct_device_ptr);
1109 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1110 :
1111 1 : break;
1112 1 : }
1113 3 : case 7: {
1114 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
1115 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_2_resource_struct_device_ptr);", "comment": "callback"} */
1116 2 : ldv_partially_ordered_scenario_callback_2_27(ldv_2_callback_remove, ldv_2_resource_struct_device_ptr);
1117 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1118 :
1119 1 : break;
1120 1 : }
1121 3 : case 8: {
1122 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
1123 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_2_resource_struct_gendisk_ptr);", "comment": "callback"} */
1124 2 : ldv_partially_ordered_scenario_callback_2_26(ldv_2_callback_media_changed, ldv_2_resource_struct_gendisk_ptr);
1125 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1126 :
1127 1 : break;
1128 1 : }
1129 3 : case 9: {
1130 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1131 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
1132 :
1133 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
1134 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_2_resource_struct_block_device_ptr, ldv_2_ldv_param_23_1_default, ldv_2_ldv_param_23_2_default, ldv_2_ldv_param_23_3_default);", "comment": "callback"} */
1135 2 : ldv_partially_ordered_scenario_callback_2_23(ldv_2_callback_locked_ioctl, ldv_2_resource_struct_block_device_ptr, ldv_2_ldv_param_23_1_default, ldv_2_ldv_param_23_2_default, ldv_2_ldv_param_23_3_default);
1136 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1137 :
1138 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1139 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
1140 :
1141 1 : break;
1142 1 : }
1143 3 : case 10: {
1144 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
1145 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_2_resource_struct_block_device_ptr, ldv_2_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
1146 2 : ldv_partially_ordered_scenario_callback_2_22(ldv_2_callback_getgeo, ldv_2_resource_struct_block_device_ptr, ldv_2_resource_struct_hd_geometry_ptr);
1147 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1148 :
1149 1 : break;
1150 1 : }
1151 3 : case 11: {
1152 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
1153 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_2_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
1154 2 : ldv_partially_ordered_scenario_callback_2_21(ldv_2_callback_done, ldv_2_resource_struct_scsi_cmnd_ptr);
1155 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1156 :
1157 1 : break;
1158 1 : }
1159 3 : case 12: {
1160 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
1161 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_2_resource_struct_device_ptr);", "comment": "callback"} */
1162 2 : ldv_partially_ordered_scenario_callback_2_20(ldv_2_callback_dev_release, ldv_2_resource_struct_device_ptr);
1163 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1164 :
1165 1 : break;
1166 1 : }
1167 3 : case 13: {
1168 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
1169 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_2_resource_struct_block_device_ptr, ldv_2_ldv_param_4_1_default, ldv_2_ldv_param_4_2_default, ldv_2_ldv_param_4_3_default);", "comment": "callback"} */
1170 2 : ldv_partially_ordered_scenario_callback_2_4(ldv_2_callback_compat_ioctl, ldv_2_resource_struct_block_device_ptr, ldv_2_ldv_param_4_1_default, ldv_2_ldv_param_4_2_default, ldv_2_ldv_param_4_3_default);
1171 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1172 :
1173 1 : break;
1174 1 : }
1175 2 : default: ldv_stop();
1176 1 : }
1177 13 : break;
1178 1 : }
1179 2 : default: ldv_stop();
1180 1 : }
1181 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1182 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1183 0 :
1184 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
1185 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1186 :
1187 : /* Jump to a subprocess 'call' initial state */
1188 13 : goto ldv_call_2;
1189 : /* End of the subprocess 'call' */
1190 : return;
1191 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_2"} */
1192 : }
1193 :
1194 : /* AUX_FUNC ldv_partially_ordered_scenario_3 */
1195 : void ldv_partially_ordered_scenario_3(void *arg0) {
1196 : /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_3"} */
1197 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1198 : int (*ldv_3_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
1199 1 : void (*ldv_3_callback_dev_release)(struct device *);
1200 1 : int (*ldv_3_callback_done)(struct scsi_cmnd *);
1201 1 : int (*ldv_3_callback_getgeo)(struct block_device *, struct hd_geometry *);
1202 1 : int (*ldv_3_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
1203 : int (*ldv_3_callback_media_changed)(struct gendisk *);
1204 1 : int (*ldv_3_callback_remove)(struct device *);
1205 1 : void (*ldv_3_callback_rescan)(struct device *);
1206 1 : int (*ldv_3_callback_resume)(struct device *);
1207 1 : int (*ldv_3_callback_revalidate_disk)(struct gendisk *);
1208 1 : ssize_t (*ldv_3_callback_show)(struct device *, struct device_attribute *, char *);
1209 1 : ssize_t (*ldv_3_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1210 1 : int (*ldv_3_callback_suspend)(struct device *, pm_message_t );
1211 : struct device_driver *ldv_3_container_device_driver;
1212 1 : struct block_device_operations *ldv_3_container_struct_block_device_operations;
1213 1 : unsigned int ldv_3_ldv_param_15_1_default;
1214 1 : unsigned int ldv_3_ldv_param_23_1_default;
1215 1 : unsigned int ldv_3_ldv_param_23_2_default;
1216 1 : long unsigned int ldv_3_ldv_param_23_3_default;
1217 1 : char *ldv_3_ldv_param_31_2_default;
1218 1 : char *ldv_3_ldv_param_34_2_default;
1219 1 : long unsigned int ldv_3_ldv_param_34_3_default;
1220 1 : unsigned int ldv_3_ldv_param_38_1_default;
1221 1 : unsigned int ldv_3_ldv_param_4_1_default;
1222 1 : unsigned int ldv_3_ldv_param_4_2_default;
1223 1 : long unsigned int ldv_3_ldv_param_4_3_default;
1224 1 : struct block_device *ldv_3_resource_struct_block_device_ptr;
1225 1 : struct device_attribute *ldv_3_resource_struct_device_attribute;
1226 1 : struct device *ldv_3_resource_struct_device_ptr;
1227 1 : struct gendisk *ldv_3_resource_struct_gendisk_ptr;
1228 1 : struct hd_geometry *ldv_3_resource_struct_hd_geometry_ptr;
1229 1 : struct pm_message ldv_3_resource_struct_pm_message;
1230 1 : struct scsi_cmnd *ldv_3_resource_struct_scsi_cmnd_ptr;
1231 1 : int ldv_3_ret_default;
1232 1 : /* Received labels */
1233 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
1234 1 :
1235 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1236 1 : /* Initialize automaton variables */
1237 2 : ldv_3_ret_default = 1;
1238 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
1239 1 : /* Assign recieved labels */
1240 3 : if (data) {
1241 2 : ldv_3_container_device_driver = data->arg0;
1242 3 : ldv_free(data);
1243 1 : }
1244 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
1245 1 :
1246 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
1247 6 : ldv_3_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
1248 3 : ldv_3_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1249 3 : ldv_3_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1250 3 : ldv_3_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
1251 3 : ldv_3_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
1252 3 : ldv_3_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
1253 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
1254 :
1255 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1256 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1257 :
1258 : /* Jump to a subprocess 'main' initial state */
1259 1 : goto ldv_main_3;
1260 : /* End of the process */
1261 : return;
1262 1 :
1263 : /* Sbprocess main */
1264 : ldv_main_3:
1265 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1266 :
1267 4 : if (ldv_undef_int()) {
1268 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
1269 2 : ldv_free(ldv_3_resource_struct_block_device_ptr);
1270 2 : ldv_free(ldv_3_resource_struct_device_attribute);
1271 2 : ldv_free(ldv_3_resource_struct_device_ptr);
1272 2 : ldv_free(ldv_3_resource_struct_gendisk_ptr);
1273 2 : ldv_free(ldv_3_resource_struct_hd_geometry_ptr);
1274 2 : ldv_free(ldv_3_resource_struct_scsi_cmnd_ptr);
1275 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
1276 :
1277 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
1278 : /* Skip a non-replicative signal receiving */
1279 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
1280 :
1281 : /* Exit function at a terminal state */
1282 1 : return;
1283 : }
1284 : else {
1285 4 : if (ldv_undef_int()) {
1286 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1287 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
1288 :
1289 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
1290 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& sd_open))(ldv_3_resource_struct_block_device_ptr, ldv_3_ldv_param_38_1_default);", "comment": "probe"} */
1291 2 : ldv_3_ret_default = ldv_partially_ordered_scenario_probe_3_38(ldv_3_container_struct_block_device_operations->open, ldv_3_resource_struct_block_device_ptr, ldv_3_ldv_param_38_1_default);
1292 : /* Callback post-call */
1293 2 : ldv_3_ret_default = ldv_filter_err_code(ldv_3_ret_default);
1294 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
1295 :
1296 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1297 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
1298 :
1299 : }
1300 : else {
1301 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
1302 : /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = ((& sd_probe))(ldv_3_resource_struct_device_ptr);", "comment": "probe"} */
1303 2 : ldv_3_ret_default = ldv_partially_ordered_scenario_probe_3_11(ldv_3_container_device_driver->probe, ldv_3_resource_struct_device_ptr);
1304 : /* Callback post-call */
1305 2 : ldv_3_ret_default = ldv_filter_err_code(ldv_3_ret_default);
1306 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
1307 :
1308 : }
1309 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1310 :
1311 6 : if (ldv_undef_int()) {
1312 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
1313 2 : ldv_assume(ldv_3_ret_default == 0);
1314 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
1315 :
1316 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
1317 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1318 :
1319 : /* Jump to a subprocess 'call' initial state */
1320 1 : goto ldv_call_3;
1321 : }
1322 : else {
1323 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
1324 2 : ldv_assume(ldv_3_ret_default != 0);
1325 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
1326 :
1327 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1328 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1329 :
1330 : /* Jump to a subprocess 'main' initial state */
1331 1 : goto ldv_main_3;
1332 : }
1333 : }
1334 : /* End of the subprocess 'main' */
1335 : return;
1336 1 :
1337 : /* Sbprocess call */
1338 : ldv_call_3:
1339 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1340 :
1341 2 : switch (ldv_undef_int()) {
1342 3 : case 1: {
1343 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1344 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
1345 :
1346 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
1347 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_3_resource_struct_gendisk_ptr, ldv_3_ldv_param_15_1_default);", "comment": "release"} */
1348 2 : ldv_partially_ordered_scenario_release_3_15(ldv_3_container_struct_block_device_operations->release, ldv_3_resource_struct_gendisk_ptr, ldv_3_ldv_param_15_1_default);
1349 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
1350 :
1351 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1352 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
1353 :
1354 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1355 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1356 :
1357 : /* Jump to a subprocess 'main' initial state */
1358 1 : goto ldv_main_3;
1359 1 : break;
1360 : }
1361 3 : case 2: {
1362 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
1363 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_3_resource_struct_device_ptr);", "comment": "release"} */
1364 2 : ldv_partially_ordered_scenario_release_3_2(ldv_3_container_device_driver->shutdown, ldv_3_resource_struct_device_ptr);
1365 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
1366 :
1367 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1368 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1369 :
1370 : /* Jump to a subprocess 'main' initial state */
1371 1 : goto ldv_main_3;
1372 : /* Jump to a subprocess 'main' initial state */
1373 : goto ldv_main_3;
1374 1 : break;
1375 : }
1376 3 : case 3: {
1377 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1378 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1379 :
1380 2 : switch (ldv_undef_int()) {
1381 3 : case 1: {
1382 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
1383 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_3_resource_struct_device_ptr, ldv_3_resource_struct_pm_message);", "comment": "callback"} */
1384 2 : ldv_partially_ordered_scenario_callback_3_37(ldv_3_callback_suspend, ldv_3_resource_struct_device_ptr, ldv_3_resource_struct_pm_message);
1385 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1386 :
1387 1 : break;
1388 1 : }
1389 3 : case 2: {
1390 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1391 3 : ldv_3_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
1392 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
1393 :
1394 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1395 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_cache_type))(ldv_3_resource_struct_device_ptr, ldv_3_resource_struct_device_attribute, ldv_3_ldv_param_34_2_default, ldv_3_ldv_param_34_3_default);", "comment": "callback"} */
1396 2 : ldv_partially_ordered_scenario_callback_3_34(ldv_3_callback_store, ldv_3_resource_struct_device_ptr, ldv_3_resource_struct_device_attribute, ldv_3_ldv_param_34_2_default, ldv_3_ldv_param_34_3_default);
1397 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1398 :
1399 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1400 2 : ldv_free(ldv_3_ldv_param_34_2_default);
1401 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
1402 :
1403 1 : break;
1404 1 : }
1405 3 : case 3: {
1406 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1407 3 : ldv_3_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
1408 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
1409 :
1410 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1411 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_cache_type))(ldv_3_resource_struct_device_ptr, ldv_3_resource_struct_device_attribute, ldv_3_ldv_param_31_2_default);", "comment": "callback"} */
1412 2 : ldv_partially_ordered_scenario_callback_3_31(ldv_3_callback_show, ldv_3_resource_struct_device_ptr, ldv_3_resource_struct_device_attribute, ldv_3_ldv_param_31_2_default);
1413 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1414 :
1415 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1416 2 : ldv_free(ldv_3_ldv_param_31_2_default);
1417 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
1418 :
1419 1 : break;
1420 1 : }
1421 3 : case 4: {
1422 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
1423 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_3_resource_struct_gendisk_ptr);", "comment": "callback"} */
1424 2 : ldv_partially_ordered_scenario_callback_3_30(ldv_3_callback_revalidate_disk, ldv_3_resource_struct_gendisk_ptr);
1425 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1426 :
1427 1 : break;
1428 1 : }
1429 3 : case 5: {
1430 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
1431 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_3_resource_struct_device_ptr);", "comment": "callback"} */
1432 2 : ldv_partially_ordered_scenario_callback_3_29(ldv_3_callback_resume, ldv_3_resource_struct_device_ptr);
1433 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1434 :
1435 1 : break;
1436 1 : }
1437 3 : case 6: {
1438 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
1439 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_3_resource_struct_device_ptr);", "comment": "callback"} */
1440 2 : ldv_partially_ordered_scenario_callback_3_28(ldv_3_callback_rescan, ldv_3_resource_struct_device_ptr);
1441 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1442 :
1443 1 : break;
1444 1 : }
1445 3 : case 7: {
1446 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
1447 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_3_resource_struct_device_ptr);", "comment": "callback"} */
1448 2 : ldv_partially_ordered_scenario_callback_3_27(ldv_3_callback_remove, ldv_3_resource_struct_device_ptr);
1449 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1450 :
1451 1 : break;
1452 1 : }
1453 3 : case 8: {
1454 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
1455 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_3_resource_struct_gendisk_ptr);", "comment": "callback"} */
1456 2 : ldv_partially_ordered_scenario_callback_3_26(ldv_3_callback_media_changed, ldv_3_resource_struct_gendisk_ptr);
1457 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1458 :
1459 1 : break;
1460 1 : }
1461 3 : case 9: {
1462 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1463 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
1464 :
1465 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
1466 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_3_resource_struct_block_device_ptr, ldv_3_ldv_param_23_1_default, ldv_3_ldv_param_23_2_default, ldv_3_ldv_param_23_3_default);", "comment": "callback"} */
1467 2 : ldv_partially_ordered_scenario_callback_3_23(ldv_3_callback_locked_ioctl, ldv_3_resource_struct_block_device_ptr, ldv_3_ldv_param_23_1_default, ldv_3_ldv_param_23_2_default, ldv_3_ldv_param_23_3_default);
1468 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1469 :
1470 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1471 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
1472 :
1473 1 : break;
1474 1 : }
1475 3 : case 10: {
1476 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
1477 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_3_resource_struct_block_device_ptr, ldv_3_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
1478 2 : ldv_partially_ordered_scenario_callback_3_22(ldv_3_callback_getgeo, ldv_3_resource_struct_block_device_ptr, ldv_3_resource_struct_hd_geometry_ptr);
1479 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1480 :
1481 1 : break;
1482 1 : }
1483 3 : case 11: {
1484 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
1485 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_3_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
1486 2 : ldv_partially_ordered_scenario_callback_3_21(ldv_3_callback_done, ldv_3_resource_struct_scsi_cmnd_ptr);
1487 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1488 :
1489 1 : break;
1490 1 : }
1491 3 : case 12: {
1492 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
1493 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_3_resource_struct_device_ptr);", "comment": "callback"} */
1494 2 : ldv_partially_ordered_scenario_callback_3_20(ldv_3_callback_dev_release, ldv_3_resource_struct_device_ptr);
1495 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1496 :
1497 1 : break;
1498 1 : }
1499 3 : case 13: {
1500 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
1501 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_3_resource_struct_block_device_ptr, ldv_3_ldv_param_4_1_default, ldv_3_ldv_param_4_2_default, ldv_3_ldv_param_4_3_default);", "comment": "callback"} */
1502 2 : ldv_partially_ordered_scenario_callback_3_4(ldv_3_callback_compat_ioctl, ldv_3_resource_struct_block_device_ptr, ldv_3_ldv_param_4_1_default, ldv_3_ldv_param_4_2_default, ldv_3_ldv_param_4_3_default);
1503 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1504 :
1505 1 : break;
1506 1 : }
1507 2 : default: ldv_stop();
1508 1 : }
1509 13 : break;
1510 1 : }
1511 2 : default: ldv_stop();
1512 1 : }
1513 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1514 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1515 0 :
1516 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
1517 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1518 :
1519 : /* Jump to a subprocess 'call' initial state */
1520 13 : goto ldv_call_3;
1521 : /* End of the subprocess 'call' */
1522 : return;
1523 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_3"} */
1524 : }
1525 :
1526 : /* AUX_FUNC ldv_partially_ordered_scenario_4 */
1527 : void ldv_partially_ordered_scenario_4(void *arg0) {
1528 : /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_4"} */
1529 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1530 : int (*ldv_4_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
1531 1 : void (*ldv_4_callback_dev_release)(struct device *);
1532 1 : int (*ldv_4_callback_done)(struct scsi_cmnd *);
1533 1 : int (*ldv_4_callback_getgeo)(struct block_device *, struct hd_geometry *);
1534 1 : int (*ldv_4_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
1535 : int (*ldv_4_callback_media_changed)(struct gendisk *);
1536 1 : int (*ldv_4_callback_remove)(struct device *);
1537 1 : void (*ldv_4_callback_rescan)(struct device *);
1538 1 : int (*ldv_4_callback_resume)(struct device *);
1539 1 : int (*ldv_4_callback_revalidate_disk)(struct gendisk *);
1540 1 : ssize_t (*ldv_4_callback_show)(struct device *, struct device_attribute *, char *);
1541 1 : ssize_t (*ldv_4_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1542 1 : int (*ldv_4_callback_suspend)(struct device *, pm_message_t );
1543 : struct device_driver *ldv_4_container_device_driver;
1544 1 : struct block_device_operations *ldv_4_container_struct_block_device_operations;
1545 1 : unsigned int ldv_4_ldv_param_15_1_default;
1546 1 : unsigned int ldv_4_ldv_param_23_1_default;
1547 1 : unsigned int ldv_4_ldv_param_23_2_default;
1548 1 : long unsigned int ldv_4_ldv_param_23_3_default;
1549 1 : char *ldv_4_ldv_param_31_2_default;
1550 1 : char *ldv_4_ldv_param_34_2_default;
1551 1 : long unsigned int ldv_4_ldv_param_34_3_default;
1552 1 : unsigned int ldv_4_ldv_param_38_1_default;
1553 1 : unsigned int ldv_4_ldv_param_4_1_default;
1554 1 : unsigned int ldv_4_ldv_param_4_2_default;
1555 1 : long unsigned int ldv_4_ldv_param_4_3_default;
1556 1 : struct block_device *ldv_4_resource_struct_block_device_ptr;
1557 1 : struct device_attribute *ldv_4_resource_struct_device_attribute;
1558 1 : struct device *ldv_4_resource_struct_device_ptr;
1559 1 : struct gendisk *ldv_4_resource_struct_gendisk_ptr;
1560 1 : struct hd_geometry *ldv_4_resource_struct_hd_geometry_ptr;
1561 1 : struct pm_message ldv_4_resource_struct_pm_message;
1562 1 : struct scsi_cmnd *ldv_4_resource_struct_scsi_cmnd_ptr;
1563 1 : int ldv_4_ret_default;
1564 1 : /* Received labels */
1565 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
1566 1 :
1567 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1568 1 : /* Initialize automaton variables */
1569 2 : ldv_4_ret_default = 1;
1570 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
1571 1 : /* Assign recieved labels */
1572 3 : if (data) {
1573 2 : ldv_4_container_device_driver = data->arg0;
1574 3 : ldv_free(data);
1575 1 : }
1576 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
1577 1 :
1578 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
1579 6 : ldv_4_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
1580 3 : ldv_4_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1581 3 : ldv_4_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1582 3 : ldv_4_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
1583 3 : ldv_4_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
1584 3 : ldv_4_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
1585 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
1586 :
1587 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1588 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1589 :
1590 : /* Jump to a subprocess 'main' initial state */
1591 1 : goto ldv_main_4;
1592 : /* End of the process */
1593 : return;
1594 1 :
1595 : /* Sbprocess main */
1596 : ldv_main_4:
1597 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1598 :
1599 4 : if (ldv_undef_int()) {
1600 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
1601 2 : ldv_free(ldv_4_resource_struct_block_device_ptr);
1602 2 : ldv_free(ldv_4_resource_struct_device_attribute);
1603 2 : ldv_free(ldv_4_resource_struct_device_ptr);
1604 2 : ldv_free(ldv_4_resource_struct_gendisk_ptr);
1605 2 : ldv_free(ldv_4_resource_struct_hd_geometry_ptr);
1606 2 : ldv_free(ldv_4_resource_struct_scsi_cmnd_ptr);
1607 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
1608 :
1609 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
1610 : /* Skip a non-replicative signal receiving */
1611 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
1612 :
1613 : /* Exit function at a terminal state */
1614 1 : return;
1615 : }
1616 : else {
1617 4 : if (ldv_undef_int()) {
1618 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1619 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
1620 :
1621 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
1622 : /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = ((& sd_open))(ldv_4_resource_struct_block_device_ptr, ldv_4_ldv_param_38_1_default);", "comment": "probe"} */
1623 2 : ldv_4_ret_default = ldv_partially_ordered_scenario_probe_4_38(ldv_4_container_struct_block_device_operations->open, ldv_4_resource_struct_block_device_ptr, ldv_4_ldv_param_38_1_default);
1624 : /* Callback post-call */
1625 2 : ldv_4_ret_default = ldv_filter_err_code(ldv_4_ret_default);
1626 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
1627 :
1628 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1629 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
1630 :
1631 : }
1632 : else {
1633 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
1634 : /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = ((& sd_probe))(ldv_4_resource_struct_device_ptr);", "comment": "probe"} */
1635 2 : ldv_4_ret_default = ldv_partially_ordered_scenario_probe_4_11(ldv_4_container_device_driver->probe, ldv_4_resource_struct_device_ptr);
1636 : /* Callback post-call */
1637 2 : ldv_4_ret_default = ldv_filter_err_code(ldv_4_ret_default);
1638 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
1639 :
1640 : }
1641 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1642 :
1643 6 : if (ldv_undef_int()) {
1644 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
1645 2 : ldv_assume(ldv_4_ret_default == 0);
1646 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
1647 :
1648 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
1649 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1650 :
1651 : /* Jump to a subprocess 'call' initial state */
1652 1 : goto ldv_call_4;
1653 : }
1654 : else {
1655 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
1656 2 : ldv_assume(ldv_4_ret_default != 0);
1657 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
1658 :
1659 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1660 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1661 :
1662 : /* Jump to a subprocess 'main' initial state */
1663 1 : goto ldv_main_4;
1664 : }
1665 : }
1666 : /* End of the subprocess 'main' */
1667 : return;
1668 1 :
1669 : /* Sbprocess call */
1670 : ldv_call_4:
1671 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1672 :
1673 2 : switch (ldv_undef_int()) {
1674 3 : case 1: {
1675 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1676 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
1677 :
1678 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
1679 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_4_resource_struct_gendisk_ptr, ldv_4_ldv_param_15_1_default);", "comment": "release"} */
1680 2 : ldv_partially_ordered_scenario_release_4_15(ldv_4_container_struct_block_device_operations->release, ldv_4_resource_struct_gendisk_ptr, ldv_4_ldv_param_15_1_default);
1681 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
1682 :
1683 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1684 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
1685 :
1686 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1687 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1688 :
1689 : /* Jump to a subprocess 'main' initial state */
1690 1 : goto ldv_main_4;
1691 1 : break;
1692 : }
1693 3 : case 2: {
1694 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
1695 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_4_resource_struct_device_ptr);", "comment": "release"} */
1696 2 : ldv_partially_ordered_scenario_release_4_2(ldv_4_container_device_driver->shutdown, ldv_4_resource_struct_device_ptr);
1697 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
1698 :
1699 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1700 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1701 :
1702 : /* Jump to a subprocess 'main' initial state */
1703 1 : goto ldv_main_4;
1704 : /* Jump to a subprocess 'main' initial state */
1705 : goto ldv_main_4;
1706 1 : break;
1707 : }
1708 3 : case 3: {
1709 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1710 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1711 :
1712 2 : switch (ldv_undef_int()) {
1713 3 : case 1: {
1714 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
1715 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_4_resource_struct_device_ptr, ldv_4_resource_struct_pm_message);", "comment": "callback"} */
1716 2 : ldv_partially_ordered_scenario_callback_4_37(ldv_4_callback_suspend, ldv_4_resource_struct_device_ptr, ldv_4_resource_struct_pm_message);
1717 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1718 :
1719 1 : break;
1720 1 : }
1721 3 : case 2: {
1722 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1723 3 : ldv_4_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
1724 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
1725 :
1726 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
1727 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_manage_start_stop))(ldv_4_resource_struct_device_ptr, ldv_4_resource_struct_device_attribute, ldv_4_ldv_param_34_2_default, ldv_4_ldv_param_34_3_default);", "comment": "callback"} */
1728 2 : ldv_partially_ordered_scenario_callback_4_34(ldv_4_callback_store, ldv_4_resource_struct_device_ptr, ldv_4_resource_struct_device_attribute, ldv_4_ldv_param_34_2_default, ldv_4_ldv_param_34_3_default);
1729 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1730 :
1731 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1732 2 : ldv_free(ldv_4_ldv_param_34_2_default);
1733 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
1734 :
1735 1 : break;
1736 1 : }
1737 3 : case 3: {
1738 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1739 3 : ldv_4_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
1740 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
1741 :
1742 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
1743 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_fua))(ldv_4_resource_struct_device_ptr, ldv_4_resource_struct_device_attribute, ldv_4_ldv_param_31_2_default);", "comment": "callback"} */
1744 2 : ldv_partially_ordered_scenario_callback_4_31(ldv_4_callback_show, ldv_4_resource_struct_device_ptr, ldv_4_resource_struct_device_attribute, ldv_4_ldv_param_31_2_default);
1745 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1746 :
1747 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1748 2 : ldv_free(ldv_4_ldv_param_31_2_default);
1749 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
1750 :
1751 1 : break;
1752 1 : }
1753 3 : case 4: {
1754 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
1755 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_4_resource_struct_gendisk_ptr);", "comment": "callback"} */
1756 2 : ldv_partially_ordered_scenario_callback_4_30(ldv_4_callback_revalidate_disk, ldv_4_resource_struct_gendisk_ptr);
1757 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1758 :
1759 1 : break;
1760 1 : }
1761 3 : case 5: {
1762 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
1763 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_4_resource_struct_device_ptr);", "comment": "callback"} */
1764 2 : ldv_partially_ordered_scenario_callback_4_29(ldv_4_callback_resume, ldv_4_resource_struct_device_ptr);
1765 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1766 :
1767 1 : break;
1768 1 : }
1769 3 : case 6: {
1770 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
1771 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_4_resource_struct_device_ptr);", "comment": "callback"} */
1772 2 : ldv_partially_ordered_scenario_callback_4_28(ldv_4_callback_rescan, ldv_4_resource_struct_device_ptr);
1773 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1774 :
1775 1 : break;
1776 1 : }
1777 3 : case 7: {
1778 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
1779 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_4_resource_struct_device_ptr);", "comment": "callback"} */
1780 2 : ldv_partially_ordered_scenario_callback_4_27(ldv_4_callback_remove, ldv_4_resource_struct_device_ptr);
1781 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1782 :
1783 1 : break;
1784 1 : }
1785 3 : case 8: {
1786 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
1787 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_4_resource_struct_gendisk_ptr);", "comment": "callback"} */
1788 2 : ldv_partially_ordered_scenario_callback_4_26(ldv_4_callback_media_changed, ldv_4_resource_struct_gendisk_ptr);
1789 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1790 :
1791 1 : break;
1792 1 : }
1793 3 : case 9: {
1794 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1795 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
1796 :
1797 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
1798 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_4_resource_struct_block_device_ptr, ldv_4_ldv_param_23_1_default, ldv_4_ldv_param_23_2_default, ldv_4_ldv_param_23_3_default);", "comment": "callback"} */
1799 2 : ldv_partially_ordered_scenario_callback_4_23(ldv_4_callback_locked_ioctl, ldv_4_resource_struct_block_device_ptr, ldv_4_ldv_param_23_1_default, ldv_4_ldv_param_23_2_default, ldv_4_ldv_param_23_3_default);
1800 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1801 :
1802 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1803 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
1804 :
1805 1 : break;
1806 1 : }
1807 3 : case 10: {
1808 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
1809 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_4_resource_struct_block_device_ptr, ldv_4_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
1810 2 : ldv_partially_ordered_scenario_callback_4_22(ldv_4_callback_getgeo, ldv_4_resource_struct_block_device_ptr, ldv_4_resource_struct_hd_geometry_ptr);
1811 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1812 :
1813 1 : break;
1814 1 : }
1815 3 : case 11: {
1816 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
1817 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_4_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
1818 2 : ldv_partially_ordered_scenario_callback_4_21(ldv_4_callback_done, ldv_4_resource_struct_scsi_cmnd_ptr);
1819 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1820 :
1821 1 : break;
1822 1 : }
1823 3 : case 12: {
1824 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
1825 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_4_resource_struct_device_ptr);", "comment": "callback"} */
1826 2 : ldv_partially_ordered_scenario_callback_4_20(ldv_4_callback_dev_release, ldv_4_resource_struct_device_ptr);
1827 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1828 :
1829 1 : break;
1830 1 : }
1831 3 : case 13: {
1832 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
1833 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_4_resource_struct_block_device_ptr, ldv_4_ldv_param_4_1_default, ldv_4_ldv_param_4_2_default, ldv_4_ldv_param_4_3_default);", "comment": "callback"} */
1834 2 : ldv_partially_ordered_scenario_callback_4_4(ldv_4_callback_compat_ioctl, ldv_4_resource_struct_block_device_ptr, ldv_4_ldv_param_4_1_default, ldv_4_ldv_param_4_2_default, ldv_4_ldv_param_4_3_default);
1835 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1836 :
1837 1 : break;
1838 1 : }
1839 2 : default: ldv_stop();
1840 1 : }
1841 13 : break;
1842 1 : }
1843 2 : default: ldv_stop();
1844 1 : }
1845 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1846 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1847 0 :
1848 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
1849 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1850 :
1851 : /* Jump to a subprocess 'call' initial state */
1852 13 : goto ldv_call_4;
1853 : /* End of the subprocess 'call' */
1854 : return;
1855 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_4"} */
1856 : }
1857 :
1858 : /* AUX_FUNC ldv_partially_ordered_scenario_5 */
1859 : void ldv_partially_ordered_scenario_5(void *arg0) {
1860 : /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_5"} */
1861 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1862 : int (*ldv_5_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
1863 1 : void (*ldv_5_callback_dev_release)(struct device *);
1864 1 : int (*ldv_5_callback_done)(struct scsi_cmnd *);
1865 1 : int (*ldv_5_callback_getgeo)(struct block_device *, struct hd_geometry *);
1866 1 : int (*ldv_5_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
1867 : int (*ldv_5_callback_media_changed)(struct gendisk *);
1868 1 : int (*ldv_5_callback_remove)(struct device *);
1869 1 : void (*ldv_5_callback_rescan)(struct device *);
1870 1 : int (*ldv_5_callback_resume)(struct device *);
1871 1 : int (*ldv_5_callback_revalidate_disk)(struct gendisk *);
1872 1 : ssize_t (*ldv_5_callback_show)(struct device *, struct device_attribute *, char *);
1873 1 : ssize_t (*ldv_5_callback_store)(struct device *, struct device_attribute *, char *, size_t );
1874 1 : int (*ldv_5_callback_suspend)(struct device *, pm_message_t );
1875 : struct device_driver *ldv_5_container_device_driver;
1876 1 : struct block_device_operations *ldv_5_container_struct_block_device_operations;
1877 1 : unsigned int ldv_5_ldv_param_15_1_default;
1878 1 : unsigned int ldv_5_ldv_param_23_1_default;
1879 1 : unsigned int ldv_5_ldv_param_23_2_default;
1880 1 : long unsigned int ldv_5_ldv_param_23_3_default;
1881 1 : char *ldv_5_ldv_param_31_2_default;
1882 1 : char *ldv_5_ldv_param_34_2_default;
1883 1 : long unsigned int ldv_5_ldv_param_34_3_default;
1884 1 : unsigned int ldv_5_ldv_param_38_1_default;
1885 1 : unsigned int ldv_5_ldv_param_4_1_default;
1886 1 : unsigned int ldv_5_ldv_param_4_2_default;
1887 1 : long unsigned int ldv_5_ldv_param_4_3_default;
1888 1 : struct block_device *ldv_5_resource_struct_block_device_ptr;
1889 1 : struct device_attribute *ldv_5_resource_struct_device_attribute;
1890 1 : struct device *ldv_5_resource_struct_device_ptr;
1891 1 : struct gendisk *ldv_5_resource_struct_gendisk_ptr;
1892 1 : struct hd_geometry *ldv_5_resource_struct_hd_geometry_ptr;
1893 1 : struct pm_message ldv_5_resource_struct_pm_message;
1894 1 : struct scsi_cmnd *ldv_5_resource_struct_scsi_cmnd_ptr;
1895 1 : int ldv_5_ret_default;
1896 1 : /* Received labels */
1897 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
1898 1 :
1899 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1900 1 : /* Initialize automaton variables */
1901 2 : ldv_5_ret_default = 1;
1902 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
1903 1 : /* Assign recieved labels */
1904 3 : if (data) {
1905 2 : ldv_5_container_device_driver = data->arg0;
1906 3 : ldv_free(data);
1907 1 : }
1908 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
1909 1 :
1910 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
1911 6 : ldv_5_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
1912 3 : ldv_5_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
1913 3 : ldv_5_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
1914 3 : ldv_5_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
1915 3 : ldv_5_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
1916 3 : ldv_5_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
1917 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
1918 :
1919 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1920 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1921 :
1922 : /* Jump to a subprocess 'main' initial state */
1923 1 : goto ldv_main_5;
1924 : /* End of the process */
1925 : return;
1926 1 :
1927 : /* Sbprocess main */
1928 : ldv_main_5:
1929 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1930 :
1931 4 : if (ldv_undef_int()) {
1932 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
1933 2 : ldv_free(ldv_5_resource_struct_block_device_ptr);
1934 2 : ldv_free(ldv_5_resource_struct_device_attribute);
1935 2 : ldv_free(ldv_5_resource_struct_device_ptr);
1936 2 : ldv_free(ldv_5_resource_struct_gendisk_ptr);
1937 2 : ldv_free(ldv_5_resource_struct_hd_geometry_ptr);
1938 2 : ldv_free(ldv_5_resource_struct_scsi_cmnd_ptr);
1939 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
1940 :
1941 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
1942 : /* Skip a non-replicative signal receiving */
1943 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
1944 :
1945 : /* Exit function at a terminal state */
1946 1 : return;
1947 : }
1948 : else {
1949 4 : if (ldv_undef_int()) {
1950 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1951 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
1952 :
1953 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
1954 : /* LDV {"type": "CALLBACK", "call": "ldv_5_ret_default = ((& sd_open))(ldv_5_resource_struct_block_device_ptr, ldv_5_ldv_param_38_1_default);", "comment": "probe"} */
1955 2 : ldv_5_ret_default = ldv_partially_ordered_scenario_probe_5_38(ldv_5_container_struct_block_device_operations->open, ldv_5_resource_struct_block_device_ptr, ldv_5_ldv_param_38_1_default);
1956 : /* Callback post-call */
1957 2 : ldv_5_ret_default = ldv_filter_err_code(ldv_5_ret_default);
1958 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
1959 :
1960 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1961 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
1962 :
1963 : }
1964 : else {
1965 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
1966 : /* LDV {"type": "CALLBACK", "call": "ldv_5_ret_default = ((& sd_probe))(ldv_5_resource_struct_device_ptr);", "comment": "probe"} */
1967 2 : ldv_5_ret_default = ldv_partially_ordered_scenario_probe_5_11(ldv_5_container_device_driver->probe, ldv_5_resource_struct_device_ptr);
1968 : /* Callback post-call */
1969 2 : ldv_5_ret_default = ldv_filter_err_code(ldv_5_ret_default);
1970 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
1971 :
1972 : }
1973 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1974 :
1975 6 : if (ldv_undef_int()) {
1976 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
1977 2 : ldv_assume(ldv_5_ret_default == 0);
1978 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
1979 :
1980 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
1981 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1982 :
1983 : /* Jump to a subprocess 'call' initial state */
1984 1 : goto ldv_call_5;
1985 : }
1986 : else {
1987 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
1988 2 : ldv_assume(ldv_5_ret_default != 0);
1989 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
1990 :
1991 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
1992 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
1993 :
1994 : /* Jump to a subprocess 'main' initial state */
1995 1 : goto ldv_main_5;
1996 : }
1997 : }
1998 : /* End of the subprocess 'main' */
1999 : return;
2000 1 :
2001 : /* Sbprocess call */
2002 : ldv_call_5:
2003 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2004 :
2005 2 : switch (ldv_undef_int()) {
2006 3 : case 1: {
2007 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2008 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
2009 :
2010 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
2011 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_5_resource_struct_gendisk_ptr, ldv_5_ldv_param_15_1_default);", "comment": "release"} */
2012 2 : ldv_partially_ordered_scenario_release_5_15(ldv_5_container_struct_block_device_operations->release, ldv_5_resource_struct_gendisk_ptr, ldv_5_ldv_param_15_1_default);
2013 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2014 :
2015 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2016 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
2017 :
2018 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2019 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2020 :
2021 : /* Jump to a subprocess 'main' initial state */
2022 1 : goto ldv_main_5;
2023 1 : break;
2024 : }
2025 3 : case 2: {
2026 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
2027 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_5_resource_struct_device_ptr);", "comment": "release"} */
2028 2 : ldv_partially_ordered_scenario_release_5_2(ldv_5_container_device_driver->shutdown, ldv_5_resource_struct_device_ptr);
2029 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2030 :
2031 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2032 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2033 :
2034 : /* Jump to a subprocess 'main' initial state */
2035 1 : goto ldv_main_5;
2036 : /* Jump to a subprocess 'main' initial state */
2037 : goto ldv_main_5;
2038 1 : break;
2039 : }
2040 3 : case 3: {
2041 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2042 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2043 :
2044 2 : switch (ldv_undef_int()) {
2045 3 : case 1: {
2046 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
2047 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_5_resource_struct_device_ptr, ldv_5_resource_struct_pm_message);", "comment": "callback"} */
2048 2 : ldv_partially_ordered_scenario_callback_5_37(ldv_5_callback_suspend, ldv_5_resource_struct_device_ptr, ldv_5_resource_struct_pm_message);
2049 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2050 :
2051 1 : break;
2052 1 : }
2053 3 : case 2: {
2054 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2055 3 : ldv_5_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
2056 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
2057 :
2058 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
2059 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_manage_start_stop))(ldv_5_resource_struct_device_ptr, ldv_5_resource_struct_device_attribute, ldv_5_ldv_param_34_2_default, ldv_5_ldv_param_34_3_default);", "comment": "callback"} */
2060 2 : ldv_partially_ordered_scenario_callback_5_34(ldv_5_callback_store, ldv_5_resource_struct_device_ptr, ldv_5_resource_struct_device_attribute, ldv_5_ldv_param_34_2_default, ldv_5_ldv_param_34_3_default);
2061 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2062 :
2063 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2064 2 : ldv_free(ldv_5_ldv_param_34_2_default);
2065 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
2066 :
2067 1 : break;
2068 1 : }
2069 3 : case 3: {
2070 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2071 3 : ldv_5_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
2072 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
2073 :
2074 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2075 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_manage_start_stop))(ldv_5_resource_struct_device_ptr, ldv_5_resource_struct_device_attribute, ldv_5_ldv_param_31_2_default);", "comment": "callback"} */
2076 2 : ldv_partially_ordered_scenario_callback_5_31(ldv_5_callback_show, ldv_5_resource_struct_device_ptr, ldv_5_resource_struct_device_attribute, ldv_5_ldv_param_31_2_default);
2077 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2078 :
2079 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2080 2 : ldv_free(ldv_5_ldv_param_31_2_default);
2081 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
2082 :
2083 1 : break;
2084 1 : }
2085 3 : case 4: {
2086 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
2087 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_5_resource_struct_gendisk_ptr);", "comment": "callback"} */
2088 2 : ldv_partially_ordered_scenario_callback_5_30(ldv_5_callback_revalidate_disk, ldv_5_resource_struct_gendisk_ptr);
2089 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2090 :
2091 1 : break;
2092 1 : }
2093 3 : case 5: {
2094 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
2095 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_5_resource_struct_device_ptr);", "comment": "callback"} */
2096 2 : ldv_partially_ordered_scenario_callback_5_29(ldv_5_callback_resume, ldv_5_resource_struct_device_ptr);
2097 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2098 :
2099 1 : break;
2100 1 : }
2101 3 : case 6: {
2102 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
2103 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_5_resource_struct_device_ptr);", "comment": "callback"} */
2104 2 : ldv_partially_ordered_scenario_callback_5_28(ldv_5_callback_rescan, ldv_5_resource_struct_device_ptr);
2105 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2106 :
2107 1 : break;
2108 1 : }
2109 3 : case 7: {
2110 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
2111 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_5_resource_struct_device_ptr);", "comment": "callback"} */
2112 2 : ldv_partially_ordered_scenario_callback_5_27(ldv_5_callback_remove, ldv_5_resource_struct_device_ptr);
2113 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2114 :
2115 1 : break;
2116 1 : }
2117 3 : case 8: {
2118 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
2119 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_5_resource_struct_gendisk_ptr);", "comment": "callback"} */
2120 2 : ldv_partially_ordered_scenario_callback_5_26(ldv_5_callback_media_changed, ldv_5_resource_struct_gendisk_ptr);
2121 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2122 :
2123 1 : break;
2124 1 : }
2125 3 : case 9: {
2126 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2127 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
2128 :
2129 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
2130 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_5_resource_struct_block_device_ptr, ldv_5_ldv_param_23_1_default, ldv_5_ldv_param_23_2_default, ldv_5_ldv_param_23_3_default);", "comment": "callback"} */
2131 2 : ldv_partially_ordered_scenario_callback_5_23(ldv_5_callback_locked_ioctl, ldv_5_resource_struct_block_device_ptr, ldv_5_ldv_param_23_1_default, ldv_5_ldv_param_23_2_default, ldv_5_ldv_param_23_3_default);
2132 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2133 :
2134 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2135 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
2136 :
2137 1 : break;
2138 1 : }
2139 3 : case 10: {
2140 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
2141 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_5_resource_struct_block_device_ptr, ldv_5_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
2142 2 : ldv_partially_ordered_scenario_callback_5_22(ldv_5_callback_getgeo, ldv_5_resource_struct_block_device_ptr, ldv_5_resource_struct_hd_geometry_ptr);
2143 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2144 :
2145 1 : break;
2146 1 : }
2147 3 : case 11: {
2148 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
2149 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_5_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
2150 2 : ldv_partially_ordered_scenario_callback_5_21(ldv_5_callback_done, ldv_5_resource_struct_scsi_cmnd_ptr);
2151 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2152 :
2153 1 : break;
2154 1 : }
2155 3 : case 12: {
2156 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
2157 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_5_resource_struct_device_ptr);", "comment": "callback"} */
2158 2 : ldv_partially_ordered_scenario_callback_5_20(ldv_5_callback_dev_release, ldv_5_resource_struct_device_ptr);
2159 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2160 :
2161 1 : break;
2162 1 : }
2163 3 : case 13: {
2164 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
2165 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_5_resource_struct_block_device_ptr, ldv_5_ldv_param_4_1_default, ldv_5_ldv_param_4_2_default, ldv_5_ldv_param_4_3_default);", "comment": "callback"} */
2166 2 : ldv_partially_ordered_scenario_callback_5_4(ldv_5_callback_compat_ioctl, ldv_5_resource_struct_block_device_ptr, ldv_5_ldv_param_4_1_default, ldv_5_ldv_param_4_2_default, ldv_5_ldv_param_4_3_default);
2167 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2168 :
2169 1 : break;
2170 1 : }
2171 2 : default: ldv_stop();
2172 1 : }
2173 13 : break;
2174 1 : }
2175 2 : default: ldv_stop();
2176 1 : }
2177 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2178 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2179 0 :
2180 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
2181 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2182 :
2183 : /* Jump to a subprocess 'call' initial state */
2184 13 : goto ldv_call_5;
2185 : /* End of the subprocess 'call' */
2186 : return;
2187 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_5"} */
2188 : }
2189 :
2190 : /* AUX_FUNC ldv_partially_ordered_scenario_6 */
2191 : void ldv_partially_ordered_scenario_6(void *arg0) {
2192 : /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_6"} */
2193 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2194 : int (*ldv_6_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
2195 1 : void (*ldv_6_callback_dev_release)(struct device *);
2196 1 : int (*ldv_6_callback_done)(struct scsi_cmnd *);
2197 1 : int (*ldv_6_callback_getgeo)(struct block_device *, struct hd_geometry *);
2198 1 : int (*ldv_6_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
2199 : int (*ldv_6_callback_media_changed)(struct gendisk *);
2200 1 : int (*ldv_6_callback_remove)(struct device *);
2201 1 : void (*ldv_6_callback_rescan)(struct device *);
2202 1 : int (*ldv_6_callback_resume)(struct device *);
2203 1 : int (*ldv_6_callback_revalidate_disk)(struct gendisk *);
2204 1 : ssize_t (*ldv_6_callback_show)(struct device *, struct device_attribute *, char *);
2205 1 : ssize_t (*ldv_6_callback_store)(struct device *, struct device_attribute *, char *, size_t );
2206 1 : int (*ldv_6_callback_suspend)(struct device *, pm_message_t );
2207 : struct device_driver *ldv_6_container_device_driver;
2208 1 : struct block_device_operations *ldv_6_container_struct_block_device_operations;
2209 1 : unsigned int ldv_6_ldv_param_15_1_default;
2210 1 : unsigned int ldv_6_ldv_param_23_1_default;
2211 1 : unsigned int ldv_6_ldv_param_23_2_default;
2212 1 : long unsigned int ldv_6_ldv_param_23_3_default;
2213 1 : char *ldv_6_ldv_param_31_2_default;
2214 1 : char *ldv_6_ldv_param_34_2_default;
2215 1 : long unsigned int ldv_6_ldv_param_34_3_default;
2216 1 : unsigned int ldv_6_ldv_param_38_1_default;
2217 1 : unsigned int ldv_6_ldv_param_4_1_default;
2218 1 : unsigned int ldv_6_ldv_param_4_2_default;
2219 1 : long unsigned int ldv_6_ldv_param_4_3_default;
2220 1 : struct block_device *ldv_6_resource_struct_block_device_ptr;
2221 1 : struct device_attribute *ldv_6_resource_struct_device_attribute;
2222 1 : struct device *ldv_6_resource_struct_device_ptr;
2223 1 : struct gendisk *ldv_6_resource_struct_gendisk_ptr;
2224 1 : struct hd_geometry *ldv_6_resource_struct_hd_geometry_ptr;
2225 1 : struct pm_message ldv_6_resource_struct_pm_message;
2226 1 : struct scsi_cmnd *ldv_6_resource_struct_scsi_cmnd_ptr;
2227 1 : int ldv_6_ret_default;
2228 1 : /* Received labels */
2229 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
2230 1 :
2231 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2232 1 : /* Initialize automaton variables */
2233 2 : ldv_6_ret_default = 1;
2234 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
2235 1 : /* Assign recieved labels */
2236 3 : if (data) {
2237 2 : ldv_6_container_device_driver = data->arg0;
2238 3 : ldv_free(data);
2239 1 : }
2240 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
2241 1 :
2242 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
2243 6 : ldv_6_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
2244 3 : ldv_6_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2245 3 : ldv_6_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2246 3 : ldv_6_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
2247 3 : ldv_6_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
2248 3 : ldv_6_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
2249 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
2250 :
2251 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2252 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2253 :
2254 : /* Jump to a subprocess 'main' initial state */
2255 1 : goto ldv_main_6;
2256 : /* End of the process */
2257 : return;
2258 1 :
2259 : /* Sbprocess main */
2260 : ldv_main_6:
2261 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2262 :
2263 4 : if (ldv_undef_int()) {
2264 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
2265 2 : ldv_free(ldv_6_resource_struct_block_device_ptr);
2266 2 : ldv_free(ldv_6_resource_struct_device_attribute);
2267 2 : ldv_free(ldv_6_resource_struct_device_ptr);
2268 2 : ldv_free(ldv_6_resource_struct_gendisk_ptr);
2269 2 : ldv_free(ldv_6_resource_struct_hd_geometry_ptr);
2270 2 : ldv_free(ldv_6_resource_struct_scsi_cmnd_ptr);
2271 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
2272 :
2273 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
2274 : /* Skip a non-replicative signal receiving */
2275 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
2276 :
2277 : /* Exit function at a terminal state */
2278 1 : return;
2279 : }
2280 : else {
2281 4 : if (ldv_undef_int()) {
2282 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2283 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
2284 :
2285 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
2286 : /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = ((& sd_open))(ldv_6_resource_struct_block_device_ptr, ldv_6_ldv_param_38_1_default);", "comment": "probe"} */
2287 2 : ldv_6_ret_default = ldv_partially_ordered_scenario_probe_6_38(ldv_6_container_struct_block_device_operations->open, ldv_6_resource_struct_block_device_ptr, ldv_6_ldv_param_38_1_default);
2288 : /* Callback post-call */
2289 2 : ldv_6_ret_default = ldv_filter_err_code(ldv_6_ret_default);
2290 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
2291 :
2292 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2293 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
2294 :
2295 : }
2296 : else {
2297 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
2298 : /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = ((& sd_probe))(ldv_6_resource_struct_device_ptr);", "comment": "probe"} */
2299 2 : ldv_6_ret_default = ldv_partially_ordered_scenario_probe_6_11(ldv_6_container_device_driver->probe, ldv_6_resource_struct_device_ptr);
2300 : /* Callback post-call */
2301 2 : ldv_6_ret_default = ldv_filter_err_code(ldv_6_ret_default);
2302 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
2303 :
2304 : }
2305 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2306 :
2307 6 : if (ldv_undef_int()) {
2308 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
2309 2 : ldv_assume(ldv_6_ret_default == 0);
2310 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
2311 :
2312 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
2313 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2314 :
2315 : /* Jump to a subprocess 'call' initial state */
2316 1 : goto ldv_call_6;
2317 : }
2318 : else {
2319 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
2320 2 : ldv_assume(ldv_6_ret_default != 0);
2321 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
2322 :
2323 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2324 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2325 :
2326 : /* Jump to a subprocess 'main' initial state */
2327 1 : goto ldv_main_6;
2328 : }
2329 : }
2330 : /* End of the subprocess 'main' */
2331 : return;
2332 1 :
2333 : /* Sbprocess call */
2334 : ldv_call_6:
2335 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2336 :
2337 2 : switch (ldv_undef_int()) {
2338 3 : case 1: {
2339 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2340 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
2341 :
2342 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
2343 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_6_resource_struct_gendisk_ptr, ldv_6_ldv_param_15_1_default);", "comment": "release"} */
2344 2 : ldv_partially_ordered_scenario_release_6_15(ldv_6_container_struct_block_device_operations->release, ldv_6_resource_struct_gendisk_ptr, ldv_6_ldv_param_15_1_default);
2345 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2346 :
2347 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2348 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
2349 :
2350 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2351 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2352 :
2353 : /* Jump to a subprocess 'main' initial state */
2354 1 : goto ldv_main_6;
2355 1 : break;
2356 : }
2357 3 : case 2: {
2358 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
2359 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_6_resource_struct_device_ptr);", "comment": "release"} */
2360 2 : ldv_partially_ordered_scenario_release_6_2(ldv_6_container_device_driver->shutdown, ldv_6_resource_struct_device_ptr);
2361 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2362 :
2363 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2364 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2365 :
2366 : /* Jump to a subprocess 'main' initial state */
2367 1 : goto ldv_main_6;
2368 : /* Jump to a subprocess 'main' initial state */
2369 : goto ldv_main_6;
2370 1 : break;
2371 : }
2372 3 : case 3: {
2373 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2374 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2375 :
2376 2 : switch (ldv_undef_int()) {
2377 3 : case 1: {
2378 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
2379 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_6_resource_struct_device_ptr, ldv_6_resource_struct_pm_message);", "comment": "callback"} */
2380 2 : ldv_partially_ordered_scenario_callback_6_37(ldv_6_callback_suspend, ldv_6_resource_struct_device_ptr, ldv_6_resource_struct_pm_message);
2381 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2382 :
2383 1 : break;
2384 1 : }
2385 3 : case 2: {
2386 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2387 3 : ldv_6_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
2388 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
2389 :
2390 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
2391 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_manage_start_stop))(ldv_6_resource_struct_device_ptr, ldv_6_resource_struct_device_attribute, ldv_6_ldv_param_34_2_default, ldv_6_ldv_param_34_3_default);", "comment": "callback"} */
2392 2 : ldv_partially_ordered_scenario_callback_6_34(ldv_6_callback_store, ldv_6_resource_struct_device_ptr, ldv_6_resource_struct_device_attribute, ldv_6_ldv_param_34_2_default, ldv_6_ldv_param_34_3_default);
2393 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2394 :
2395 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2396 2 : ldv_free(ldv_6_ldv_param_34_2_default);
2397 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
2398 :
2399 1 : break;
2400 1 : }
2401 3 : case 3: {
2402 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2403 3 : ldv_6_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
2404 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
2405 :
2406 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2407 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_protection_type))(ldv_6_resource_struct_device_ptr, ldv_6_resource_struct_device_attribute, ldv_6_ldv_param_31_2_default);", "comment": "callback"} */
2408 2 : ldv_partially_ordered_scenario_callback_6_31(ldv_6_callback_show, ldv_6_resource_struct_device_ptr, ldv_6_resource_struct_device_attribute, ldv_6_ldv_param_31_2_default);
2409 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2410 :
2411 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2412 2 : ldv_free(ldv_6_ldv_param_31_2_default);
2413 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
2414 :
2415 1 : break;
2416 1 : }
2417 3 : case 4: {
2418 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
2419 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_6_resource_struct_gendisk_ptr);", "comment": "callback"} */
2420 2 : ldv_partially_ordered_scenario_callback_6_30(ldv_6_callback_revalidate_disk, ldv_6_resource_struct_gendisk_ptr);
2421 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2422 :
2423 1 : break;
2424 1 : }
2425 3 : case 5: {
2426 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
2427 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_6_resource_struct_device_ptr);", "comment": "callback"} */
2428 2 : ldv_partially_ordered_scenario_callback_6_29(ldv_6_callback_resume, ldv_6_resource_struct_device_ptr);
2429 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2430 :
2431 1 : break;
2432 1 : }
2433 3 : case 6: {
2434 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
2435 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_6_resource_struct_device_ptr);", "comment": "callback"} */
2436 2 : ldv_partially_ordered_scenario_callback_6_28(ldv_6_callback_rescan, ldv_6_resource_struct_device_ptr);
2437 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2438 :
2439 1 : break;
2440 1 : }
2441 3 : case 7: {
2442 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
2443 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_6_resource_struct_device_ptr);", "comment": "callback"} */
2444 2 : ldv_partially_ordered_scenario_callback_6_27(ldv_6_callback_remove, ldv_6_resource_struct_device_ptr);
2445 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2446 :
2447 1 : break;
2448 1 : }
2449 3 : case 8: {
2450 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
2451 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_6_resource_struct_gendisk_ptr);", "comment": "callback"} */
2452 2 : ldv_partially_ordered_scenario_callback_6_26(ldv_6_callback_media_changed, ldv_6_resource_struct_gendisk_ptr);
2453 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2454 :
2455 1 : break;
2456 1 : }
2457 3 : case 9: {
2458 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2459 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
2460 :
2461 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
2462 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_6_resource_struct_block_device_ptr, ldv_6_ldv_param_23_1_default, ldv_6_ldv_param_23_2_default, ldv_6_ldv_param_23_3_default);", "comment": "callback"} */
2463 2 : ldv_partially_ordered_scenario_callback_6_23(ldv_6_callback_locked_ioctl, ldv_6_resource_struct_block_device_ptr, ldv_6_ldv_param_23_1_default, ldv_6_ldv_param_23_2_default, ldv_6_ldv_param_23_3_default);
2464 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2465 :
2466 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2467 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
2468 :
2469 1 : break;
2470 1 : }
2471 3 : case 10: {
2472 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
2473 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_6_resource_struct_block_device_ptr, ldv_6_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
2474 2 : ldv_partially_ordered_scenario_callback_6_22(ldv_6_callback_getgeo, ldv_6_resource_struct_block_device_ptr, ldv_6_resource_struct_hd_geometry_ptr);
2475 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2476 :
2477 1 : break;
2478 1 : }
2479 3 : case 11: {
2480 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
2481 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_6_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
2482 2 : ldv_partially_ordered_scenario_callback_6_21(ldv_6_callback_done, ldv_6_resource_struct_scsi_cmnd_ptr);
2483 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2484 :
2485 1 : break;
2486 1 : }
2487 3 : case 12: {
2488 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
2489 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_6_resource_struct_device_ptr);", "comment": "callback"} */
2490 2 : ldv_partially_ordered_scenario_callback_6_20(ldv_6_callback_dev_release, ldv_6_resource_struct_device_ptr);
2491 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2492 :
2493 1 : break;
2494 1 : }
2495 3 : case 13: {
2496 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
2497 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_6_resource_struct_block_device_ptr, ldv_6_ldv_param_4_1_default, ldv_6_ldv_param_4_2_default, ldv_6_ldv_param_4_3_default);", "comment": "callback"} */
2498 2 : ldv_partially_ordered_scenario_callback_6_4(ldv_6_callback_compat_ioctl, ldv_6_resource_struct_block_device_ptr, ldv_6_ldv_param_4_1_default, ldv_6_ldv_param_4_2_default, ldv_6_ldv_param_4_3_default);
2499 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2500 :
2501 1 : break;
2502 1 : }
2503 2 : default: ldv_stop();
2504 1 : }
2505 13 : break;
2506 1 : }
2507 2 : default: ldv_stop();
2508 1 : }
2509 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2510 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2511 0 :
2512 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
2513 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2514 :
2515 : /* Jump to a subprocess 'call' initial state */
2516 13 : goto ldv_call_6;
2517 : /* End of the subprocess 'call' */
2518 : return;
2519 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_6"} */
2520 : }
2521 :
2522 : /* AUX_FUNC ldv_partially_ordered_scenario_7 */
2523 : void ldv_partially_ordered_scenario_7(void *arg0) {
2524 : /* LDV {"thread": 7, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_7"} */
2525 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
2526 : int (*ldv_7_callback_compat_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
2527 1 : void (*ldv_7_callback_dev_release)(struct device *);
2528 1 : int (*ldv_7_callback_done)(struct scsi_cmnd *);
2529 1 : int (*ldv_7_callback_getgeo)(struct block_device *, struct hd_geometry *);
2530 1 : int (*ldv_7_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
2531 : int (*ldv_7_callback_media_changed)(struct gendisk *);
2532 1 : int (*ldv_7_callback_remove)(struct device *);
2533 1 : void (*ldv_7_callback_rescan)(struct device *);
2534 1 : int (*ldv_7_callback_resume)(struct device *);
2535 1 : int (*ldv_7_callback_revalidate_disk)(struct gendisk *);
2536 1 : ssize_t (*ldv_7_callback_show)(struct device *, struct device_attribute *, char *);
2537 1 : ssize_t (*ldv_7_callback_store)(struct device *, struct device_attribute *, char *, size_t );
2538 1 : int (*ldv_7_callback_suspend)(struct device *, pm_message_t );
2539 : struct device_driver *ldv_7_container_device_driver;
2540 1 : struct block_device_operations *ldv_7_container_struct_block_device_operations;
2541 1 : unsigned int ldv_7_ldv_param_15_1_default;
2542 1 : unsigned int ldv_7_ldv_param_23_1_default;
2543 1 : unsigned int ldv_7_ldv_param_23_2_default;
2544 1 : long unsigned int ldv_7_ldv_param_23_3_default;
2545 1 : char *ldv_7_ldv_param_31_2_default;
2546 1 : char *ldv_7_ldv_param_34_2_default;
2547 1 : long unsigned int ldv_7_ldv_param_34_3_default;
2548 1 : unsigned int ldv_7_ldv_param_38_1_default;
2549 1 : unsigned int ldv_7_ldv_param_4_1_default;
2550 1 : unsigned int ldv_7_ldv_param_4_2_default;
2551 1 : long unsigned int ldv_7_ldv_param_4_3_default;
2552 1 : struct block_device *ldv_7_resource_struct_block_device_ptr;
2553 1 : struct device_attribute *ldv_7_resource_struct_device_attribute;
2554 1 : struct device *ldv_7_resource_struct_device_ptr;
2555 1 : struct gendisk *ldv_7_resource_struct_gendisk_ptr;
2556 1 : struct hd_geometry *ldv_7_resource_struct_hd_geometry_ptr;
2557 1 : struct pm_message ldv_7_resource_struct_pm_message;
2558 1 : struct scsi_cmnd *ldv_7_resource_struct_scsi_cmnd_ptr;
2559 1 : int ldv_7_ret_default;
2560 1 : /* Received labels */
2561 2 : struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
2562 1 :
2563 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
2564 1 : /* Initialize automaton variables */
2565 2 : ldv_7_ret_default = 1;
2566 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
2567 1 : /* Assign recieved labels */
2568 3 : if (data) {
2569 2 : ldv_7_container_device_driver = data->arg0;
2570 3 : ldv_free(data);
2571 1 : }
2572 1 : /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
2573 1 :
2574 1 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
2575 6 : ldv_7_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
2576 3 : ldv_7_resource_struct_device_attribute = ldv_xmalloc_unknown_size(0);
2577 3 : ldv_7_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
2578 3 : ldv_7_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
2579 3 : ldv_7_resource_struct_hd_geometry_ptr = ldv_xmalloc_unknown_size(0);
2580 3 : ldv_7_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
2581 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
2582 :
2583 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2584 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2585 :
2586 : /* Jump to a subprocess 'main' initial state */
2587 1 : goto ldv_main_7;
2588 : /* End of the process */
2589 : return;
2590 1 :
2591 : /* Sbprocess main */
2592 : ldv_main_7:
2593 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2594 :
2595 4 : if (ldv_undef_int()) {
2596 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
2597 2 : ldv_free(ldv_7_resource_struct_block_device_ptr);
2598 2 : ldv_free(ldv_7_resource_struct_device_attribute);
2599 2 : ldv_free(ldv_7_resource_struct_device_ptr);
2600 2 : ldv_free(ldv_7_resource_struct_gendisk_ptr);
2601 2 : ldv_free(ldv_7_resource_struct_hd_geometry_ptr);
2602 2 : ldv_free(ldv_7_resource_struct_scsi_cmnd_ptr);
2603 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
2604 :
2605 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
2606 : /* Skip a non-replicative signal receiving */
2607 : /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
2608 :
2609 : /* Exit function at a terminal state */
2610 1 : return;
2611 : }
2612 : else {
2613 4 : if (ldv_undef_int()) {
2614 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2615 : /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
2616 :
2617 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
2618 : /* LDV {"type": "CALLBACK", "call": "ldv_7_ret_default = ((& sd_open))(ldv_7_resource_struct_block_device_ptr, ldv_7_ldv_param_38_1_default);", "comment": "probe"} */
2619 2 : ldv_7_ret_default = ldv_partially_ordered_scenario_probe_7_38(ldv_7_container_struct_block_device_operations->open, ldv_7_resource_struct_block_device_ptr, ldv_7_ldv_param_38_1_default);
2620 : /* Callback post-call */
2621 2 : ldv_7_ret_default = ldv_filter_err_code(ldv_7_ret_default);
2622 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
2623 :
2624 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2625 : /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
2626 :
2627 : }
2628 : else {
2629 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
2630 : /* LDV {"type": "CALLBACK", "call": "ldv_7_ret_default = ((& sd_probe))(ldv_7_resource_struct_device_ptr);", "comment": "probe"} */
2631 2 : ldv_7_ret_default = ldv_partially_ordered_scenario_probe_7_11(ldv_7_container_device_driver->probe, ldv_7_resource_struct_device_ptr);
2632 : /* Callback post-call */
2633 2 : ldv_7_ret_default = ldv_filter_err_code(ldv_7_ret_default);
2634 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
2635 :
2636 : }
2637 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2638 :
2639 6 : if (ldv_undef_int()) {
2640 : /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
2641 2 : ldv_assume(ldv_7_ret_default == 0);
2642 : /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
2643 :
2644 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
2645 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2646 :
2647 : /* Jump to a subprocess 'call' initial state */
2648 1 : goto ldv_call_7;
2649 : }
2650 : else {
2651 : /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
2652 2 : ldv_assume(ldv_7_ret_default != 0);
2653 : /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
2654 :
2655 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2656 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2657 :
2658 : /* Jump to a subprocess 'main' initial state */
2659 1 : goto ldv_main_7;
2660 : }
2661 : }
2662 : /* End of the subprocess 'main' */
2663 : return;
2664 1 :
2665 : /* Sbprocess call */
2666 : ldv_call_7:
2667 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
2668 :
2669 2 : switch (ldv_undef_int()) {
2670 3 : case 1: {
2671 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2672 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
2673 :
2674 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
2675 : /* LDV {"type": "CALLBACK", "call": "((& sd_release))(ldv_7_resource_struct_gendisk_ptr, ldv_7_ldv_param_15_1_default);", "comment": "release"} */
2676 2 : ldv_partially_ordered_scenario_release_7_15(ldv_7_container_struct_block_device_operations->release, ldv_7_resource_struct_gendisk_ptr, ldv_7_ldv_param_15_1_default);
2677 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2678 :
2679 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2680 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
2681 :
2682 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2683 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2684 :
2685 : /* Jump to a subprocess 'main' initial state */
2686 1 : goto ldv_main_7;
2687 1 : break;
2688 : }
2689 3 : case 2: {
2690 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback shutdown from device_driver."} */
2691 : /* LDV {"type": "CALLBACK", "call": "((& sd_shutdown))(ldv_7_resource_struct_device_ptr);", "comment": "release"} */
2692 2 : ldv_partially_ordered_scenario_release_7_2(ldv_7_container_device_driver->shutdown, ldv_7_resource_struct_device_ptr);
2693 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
2694 :
2695 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
2696 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
2697 :
2698 : /* Jump to a subprocess 'main' initial state */
2699 1 : goto ldv_main_7;
2700 : /* Jump to a subprocess 'main' initial state */
2701 : goto ldv_main_7;
2702 1 : break;
2703 : }
2704 3 : case 3: {
2705 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2706 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
2707 :
2708 2 : switch (ldv_undef_int()) {
2709 3 : case 1: {
2710 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from device_driver."} */
2711 : /* LDV {"type": "CALLBACK", "call": "((& sd_suspend))(ldv_7_resource_struct_device_ptr, ldv_7_resource_struct_pm_message);", "comment": "callback"} */
2712 2 : ldv_partially_ordered_scenario_callback_7_37(ldv_7_callback_suspend, ldv_7_resource_struct_device_ptr, ldv_7_resource_struct_pm_message);
2713 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2714 :
2715 1 : break;
2716 1 : }
2717 3 : case 2: {
2718 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2719 3 : ldv_7_ldv_param_34_2_default = ldv_xmalloc_unknown_size(0);
2720 : /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
2721 :
2722 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback store from device_attribute."} */
2723 : /* LDV {"type": "CALLBACK", "call": "((& sd_store_manage_start_stop))(ldv_7_resource_struct_device_ptr, ldv_7_resource_struct_device_attribute, ldv_7_ldv_param_34_2_default, ldv_7_ldv_param_34_3_default);", "comment": "callback"} */
2724 2 : ldv_partially_ordered_scenario_callback_7_34(ldv_7_callback_store, ldv_7_resource_struct_device_ptr, ldv_7_resource_struct_device_attribute, ldv_7_ldv_param_34_2_default, ldv_7_ldv_param_34_3_default);
2725 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2726 :
2727 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2728 2 : ldv_free(ldv_7_ldv_param_34_2_default);
2729 : /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
2730 :
2731 1 : break;
2732 1 : }
2733 3 : case 3: {
2734 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2735 3 : ldv_7_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
2736 : /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
2737 :
2738 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback show from device_attribute."} */
2739 : /* LDV {"type": "CALLBACK", "call": "((& sd_show_thin_provisioning))(ldv_7_resource_struct_device_ptr, ldv_7_resource_struct_device_attribute, ldv_7_ldv_param_31_2_default);", "comment": "callback"} */
2740 2 : ldv_partially_ordered_scenario_callback_7_31(ldv_7_callback_show, ldv_7_resource_struct_device_ptr, ldv_7_resource_struct_device_attribute, ldv_7_ldv_param_31_2_default);
2741 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2742 :
2743 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2744 2 : ldv_free(ldv_7_ldv_param_31_2_default);
2745 : /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
2746 :
2747 1 : break;
2748 1 : }
2749 3 : case 4: {
2750 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback revalidate_disk from block_device_operations."} */
2751 : /* LDV {"type": "CALLBACK", "call": "((& sd_revalidate_disk))(ldv_7_resource_struct_gendisk_ptr);", "comment": "callback"} */
2752 2 : ldv_partially_ordered_scenario_callback_7_30(ldv_7_callback_revalidate_disk, ldv_7_resource_struct_gendisk_ptr);
2753 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2754 :
2755 1 : break;
2756 1 : }
2757 3 : case 5: {
2758 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from device_driver."} */
2759 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_7_resource_struct_device_ptr);", "comment": "callback"} */
2760 2 : ldv_partially_ordered_scenario_callback_7_29(ldv_7_callback_resume, ldv_7_resource_struct_device_ptr);
2761 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2762 :
2763 1 : break;
2764 1 : }
2765 3 : case 6: {
2766 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback rescan from scsi_driver."} */
2767 : /* LDV {"type": "CALLBACK", "call": "((& sd_rescan))(ldv_7_resource_struct_device_ptr);", "comment": "callback"} */
2768 2 : ldv_partially_ordered_scenario_callback_7_28(ldv_7_callback_rescan, ldv_7_resource_struct_device_ptr);
2769 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2770 :
2771 1 : break;
2772 1 : }
2773 3 : case 7: {
2774 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from device_driver."} */
2775 : /* LDV {"type": "CALLBACK", "call": "((& sd_remove))(ldv_7_resource_struct_device_ptr);", "comment": "callback"} */
2776 2 : ldv_partially_ordered_scenario_callback_7_27(ldv_7_callback_remove, ldv_7_resource_struct_device_ptr);
2777 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2778 :
2779 1 : break;
2780 1 : }
2781 3 : case 8: {
2782 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
2783 : /* LDV {"type": "CALLBACK", "call": "((& sd_media_changed))(ldv_7_resource_struct_gendisk_ptr);", "comment": "callback"} */
2784 2 : ldv_partially_ordered_scenario_callback_7_26(ldv_7_callback_media_changed, ldv_7_resource_struct_gendisk_ptr);
2785 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2786 :
2787 1 : break;
2788 1 : }
2789 3 : case 9: {
2790 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
2791 : /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
2792 :
2793 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
2794 : /* LDV {"type": "CALLBACK", "call": "((& sd_ioctl))(ldv_7_resource_struct_block_device_ptr, ldv_7_ldv_param_23_1_default, ldv_7_ldv_param_23_2_default, ldv_7_ldv_param_23_3_default);", "comment": "callback"} */
2795 2 : ldv_partially_ordered_scenario_callback_7_23(ldv_7_callback_locked_ioctl, ldv_7_resource_struct_block_device_ptr, ldv_7_ldv_param_23_1_default, ldv_7_ldv_param_23_2_default, ldv_7_ldv_param_23_3_default);
2796 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2797 :
2798 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2799 : /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
2800 :
2801 1 : break;
2802 1 : }
2803 3 : case 10: {
2804 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback getgeo from block_device_operations."} */
2805 : /* LDV {"type": "CALLBACK", "call": "((& sd_getgeo))(ldv_7_resource_struct_block_device_ptr, ldv_7_resource_struct_hd_geometry_ptr);", "comment": "callback"} */
2806 2 : ldv_partially_ordered_scenario_callback_7_22(ldv_7_callback_getgeo, ldv_7_resource_struct_block_device_ptr, ldv_7_resource_struct_hd_geometry_ptr);
2807 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2808 :
2809 1 : break;
2810 1 : }
2811 3 : case 11: {
2812 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
2813 : /* LDV {"type": "CALLBACK", "call": "((& sd_done))(ldv_7_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
2814 2 : ldv_partially_ordered_scenario_callback_7_21(ldv_7_callback_done, ldv_7_resource_struct_scsi_cmnd_ptr);
2815 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2816 :
2817 1 : break;
2818 1 : }
2819 3 : case 12: {
2820 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback dev_release from class."} */
2821 : /* LDV {"type": "CALLBACK", "call": "((& scsi_disk_release))(ldv_7_resource_struct_device_ptr);", "comment": "callback"} */
2822 2 : ldv_partially_ordered_scenario_callback_7_20(ldv_7_callback_dev_release, ldv_7_resource_struct_device_ptr);
2823 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2824 :
2825 1 : break;
2826 1 : }
2827 3 : case 13: {
2828 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback compat_ioctl from block_device_operations."} */
2829 : /* LDV {"type": "CALLBACK", "call": "((& sd_compat_ioctl))(ldv_7_resource_struct_block_device_ptr, ldv_7_ldv_param_4_1_default, ldv_7_ldv_param_4_2_default, ldv_7_ldv_param_4_3_default);", "comment": "callback"} */
2830 2 : ldv_partially_ordered_scenario_callback_7_4(ldv_7_callback_compat_ioctl, ldv_7_resource_struct_block_device_ptr, ldv_7_ldv_param_4_1_default, ldv_7_ldv_param_4_2_default, ldv_7_ldv_param_4_3_default);
2831 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
2832 :
2833 1 : break;
2834 1 : }
2835 2 : default: ldv_stop();
2836 1 : }
2837 13 : break;
2838 1 : }
2839 2 : default: ldv_stop();
2840 1 : }
2841 0 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
2842 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
2843 0 :
2844 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
2845 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
2846 :
2847 : /* Jump to a subprocess 'call' initial state */
2848 13 : goto ldv_call_7;
2849 : /* End of the subprocess 'call' */
2850 : return;
2851 : /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_7"} */
2852 : }
2853 :
2854 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_20 */
2855 : void ldv_partially_ordered_scenario_callback_1_20(void (*arg0)(struct device *), struct device *arg1) {
2856 2 : ((& scsi_disk_release))(arg1);
2857 1 : }
2858 :
2859 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_21 */
2860 : void ldv_partially_ordered_scenario_callback_1_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
2861 2 : ((& sd_done))(arg1);
2862 1 : }
2863 :
2864 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_22 */
2865 : void ldv_partially_ordered_scenario_callback_1_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
2866 2 : ((& sd_getgeo))(arg1, arg2);
2867 1 : }
2868 :
2869 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_23 */
2870 : void ldv_partially_ordered_scenario_callback_1_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
2871 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
2872 1 : }
2873 :
2874 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_26 */
2875 : void ldv_partially_ordered_scenario_callback_1_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
2876 6 : ((& sd_media_changed))(arg1);
2877 1 : }
2878 :
2879 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_27 */
2880 : void ldv_partially_ordered_scenario_callback_1_27(int (*arg0)(struct device *), struct device *arg1) {
2881 2 : ((& sd_remove))(arg1);
2882 1 : }
2883 :
2884 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_28 */
2885 : void ldv_partially_ordered_scenario_callback_1_28(void (*arg0)(struct device *), struct device *arg1) {
2886 3 : ((& sd_rescan))(arg1);
2887 1 : }
2888 :
2889 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_29 */
2890 : void ldv_partially_ordered_scenario_callback_1_29(int (*arg0)(struct device *), struct device *arg1) {
2891 2 : ((& sd_resume))(arg1);
2892 1 : }
2893 :
2894 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_30 */
2895 : void ldv_partially_ordered_scenario_callback_1_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
2896 5 : ((& sd_revalidate_disk))(arg1);
2897 1 : }
2898 :
2899 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_31 */
2900 : void ldv_partially_ordered_scenario_callback_1_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2901 2 : ((& sd_show_allow_restart))(arg1, arg2, arg3);
2902 1 : }
2903 :
2904 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_34 */
2905 : void ldv_partially_ordered_scenario_callback_1_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
2906 2 : ((& sd_store_allow_restart))(arg1, arg2, arg3, arg4);
2907 1 : }
2908 :
2909 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_37 */
2910 : void ldv_partially_ordered_scenario_callback_1_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
2911 3 : ((& sd_suspend))(arg1, arg2);
2912 1 : }
2913 :
2914 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_4 */
2915 : void ldv_partially_ordered_scenario_callback_1_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
2916 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
2917 1 : }
2918 :
2919 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_20 */
2920 : void ldv_partially_ordered_scenario_callback_2_20(void (*arg0)(struct device *), struct device *arg1) {
2921 2 : ((& scsi_disk_release))(arg1);
2922 1 : }
2923 :
2924 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_21 */
2925 : void ldv_partially_ordered_scenario_callback_2_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
2926 2 : ((& sd_done))(arg1);
2927 1 : }
2928 :
2929 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_22 */
2930 : void ldv_partially_ordered_scenario_callback_2_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
2931 2 : ((& sd_getgeo))(arg1, arg2);
2932 1 : }
2933 :
2934 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_23 */
2935 : void ldv_partially_ordered_scenario_callback_2_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
2936 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
2937 1 : }
2938 :
2939 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_26 */
2940 : void ldv_partially_ordered_scenario_callback_2_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
2941 6 : ((& sd_media_changed))(arg1);
2942 1 : }
2943 :
2944 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_27 */
2945 : void ldv_partially_ordered_scenario_callback_2_27(int (*arg0)(struct device *), struct device *arg1) {
2946 2 : ((& sd_remove))(arg1);
2947 1 : }
2948 :
2949 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_28 */
2950 : void ldv_partially_ordered_scenario_callback_2_28(void (*arg0)(struct device *), struct device *arg1) {
2951 3 : ((& sd_rescan))(arg1);
2952 1 : }
2953 :
2954 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_29 */
2955 : void ldv_partially_ordered_scenario_callback_2_29(int (*arg0)(struct device *), struct device *arg1) {
2956 2 : ((& sd_resume))(arg1);
2957 1 : }
2958 :
2959 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_30 */
2960 : void ldv_partially_ordered_scenario_callback_2_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
2961 5 : ((& sd_revalidate_disk))(arg1);
2962 1 : }
2963 :
2964 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_31 */
2965 : void ldv_partially_ordered_scenario_callback_2_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
2966 2 : ((& sd_show_app_tag_own))(arg1, arg2, arg3);
2967 1 : }
2968 :
2969 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_34 */
2970 : void ldv_partially_ordered_scenario_callback_2_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
2971 2 : ((& sd_store_manage_start_stop))(arg1, arg2, arg3, arg4);
2972 1 : }
2973 :
2974 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_37 */
2975 : void ldv_partially_ordered_scenario_callback_2_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
2976 3 : ((& sd_suspend))(arg1, arg2);
2977 1 : }
2978 :
2979 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_4 */
2980 : void ldv_partially_ordered_scenario_callback_2_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
2981 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
2982 1 : }
2983 :
2984 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_20 */
2985 : void ldv_partially_ordered_scenario_callback_3_20(void (*arg0)(struct device *), struct device *arg1) {
2986 2 : ((& scsi_disk_release))(arg1);
2987 1 : }
2988 :
2989 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_21 */
2990 : void ldv_partially_ordered_scenario_callback_3_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
2991 2 : ((& sd_done))(arg1);
2992 1 : }
2993 :
2994 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_22 */
2995 : void ldv_partially_ordered_scenario_callback_3_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
2996 2 : ((& sd_getgeo))(arg1, arg2);
2997 1 : }
2998 :
2999 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_23 */
3000 : void ldv_partially_ordered_scenario_callback_3_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3001 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
3002 1 : }
3003 :
3004 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_26 */
3005 : void ldv_partially_ordered_scenario_callback_3_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3006 6 : ((& sd_media_changed))(arg1);
3007 1 : }
3008 :
3009 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_27 */
3010 : void ldv_partially_ordered_scenario_callback_3_27(int (*arg0)(struct device *), struct device *arg1) {
3011 2 : ((& sd_remove))(arg1);
3012 1 : }
3013 :
3014 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_28 */
3015 : void ldv_partially_ordered_scenario_callback_3_28(void (*arg0)(struct device *), struct device *arg1) {
3016 3 : ((& sd_rescan))(arg1);
3017 1 : }
3018 :
3019 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_29 */
3020 : void ldv_partially_ordered_scenario_callback_3_29(int (*arg0)(struct device *), struct device *arg1) {
3021 2 : ((& sd_resume))(arg1);
3022 1 : }
3023 :
3024 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_30 */
3025 : void ldv_partially_ordered_scenario_callback_3_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3026 5 : ((& sd_revalidate_disk))(arg1);
3027 1 : }
3028 :
3029 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_31 */
3030 : void ldv_partially_ordered_scenario_callback_3_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
3031 2 : ((& sd_show_cache_type))(arg1, arg2, arg3);
3032 1 : }
3033 :
3034 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_34 */
3035 : void ldv_partially_ordered_scenario_callback_3_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
3036 5 : ((& sd_store_cache_type))(arg1, arg2, arg3, arg4);
3037 1 : }
3038 :
3039 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_37 */
3040 : void ldv_partially_ordered_scenario_callback_3_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
3041 3 : ((& sd_suspend))(arg1, arg2);
3042 1 : }
3043 :
3044 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_3_4 */
3045 : void ldv_partially_ordered_scenario_callback_3_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3046 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
3047 1 : }
3048 :
3049 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_20 */
3050 : void ldv_partially_ordered_scenario_callback_4_20(void (*arg0)(struct device *), struct device *arg1) {
3051 2 : ((& scsi_disk_release))(arg1);
3052 1 : }
3053 :
3054 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_21 */
3055 : void ldv_partially_ordered_scenario_callback_4_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
3056 2 : ((& sd_done))(arg1);
3057 1 : }
3058 :
3059 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_22 */
3060 : void ldv_partially_ordered_scenario_callback_4_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
3061 2 : ((& sd_getgeo))(arg1, arg2);
3062 1 : }
3063 :
3064 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_23 */
3065 : void ldv_partially_ordered_scenario_callback_4_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3066 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
3067 1 : }
3068 :
3069 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_26 */
3070 : void ldv_partially_ordered_scenario_callback_4_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3071 6 : ((& sd_media_changed))(arg1);
3072 1 : }
3073 :
3074 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_27 */
3075 : void ldv_partially_ordered_scenario_callback_4_27(int (*arg0)(struct device *), struct device *arg1) {
3076 2 : ((& sd_remove))(arg1);
3077 1 : }
3078 :
3079 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_28 */
3080 : void ldv_partially_ordered_scenario_callback_4_28(void (*arg0)(struct device *), struct device *arg1) {
3081 3 : ((& sd_rescan))(arg1);
3082 1 : }
3083 :
3084 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_29 */
3085 : void ldv_partially_ordered_scenario_callback_4_29(int (*arg0)(struct device *), struct device *arg1) {
3086 2 : ((& sd_resume))(arg1);
3087 1 : }
3088 :
3089 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_30 */
3090 : void ldv_partially_ordered_scenario_callback_4_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3091 5 : ((& sd_revalidate_disk))(arg1);
3092 1 : }
3093 :
3094 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_31 */
3095 : void ldv_partially_ordered_scenario_callback_4_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
3096 2 : ((& sd_show_fua))(arg1, arg2, arg3);
3097 1 : }
3098 :
3099 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_34 */
3100 : void ldv_partially_ordered_scenario_callback_4_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
3101 2 : ((& sd_store_manage_start_stop))(arg1, arg2, arg3, arg4);
3102 1 : }
3103 :
3104 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_37 */
3105 : void ldv_partially_ordered_scenario_callback_4_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
3106 3 : ((& sd_suspend))(arg1, arg2);
3107 1 : }
3108 :
3109 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_4_4 */
3110 : void ldv_partially_ordered_scenario_callback_4_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3111 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
3112 1 : }
3113 :
3114 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_20 */
3115 : void ldv_partially_ordered_scenario_callback_5_20(void (*arg0)(struct device *), struct device *arg1) {
3116 2 : ((& scsi_disk_release))(arg1);
3117 1 : }
3118 :
3119 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_21 */
3120 : void ldv_partially_ordered_scenario_callback_5_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
3121 2 : ((& sd_done))(arg1);
3122 1 : }
3123 :
3124 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_22 */
3125 : void ldv_partially_ordered_scenario_callback_5_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
3126 2 : ((& sd_getgeo))(arg1, arg2);
3127 1 : }
3128 :
3129 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_23 */
3130 : void ldv_partially_ordered_scenario_callback_5_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3131 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
3132 1 : }
3133 :
3134 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_26 */
3135 : void ldv_partially_ordered_scenario_callback_5_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3136 6 : ((& sd_media_changed))(arg1);
3137 1 : }
3138 :
3139 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_27 */
3140 : void ldv_partially_ordered_scenario_callback_5_27(int (*arg0)(struct device *), struct device *arg1) {
3141 2 : ((& sd_remove))(arg1);
3142 1 : }
3143 :
3144 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_28 */
3145 : void ldv_partially_ordered_scenario_callback_5_28(void (*arg0)(struct device *), struct device *arg1) {
3146 3 : ((& sd_rescan))(arg1);
3147 1 : }
3148 :
3149 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_29 */
3150 : void ldv_partially_ordered_scenario_callback_5_29(int (*arg0)(struct device *), struct device *arg1) {
3151 2 : ((& sd_resume))(arg1);
3152 1 : }
3153 :
3154 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_30 */
3155 : void ldv_partially_ordered_scenario_callback_5_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3156 5 : ((& sd_revalidate_disk))(arg1);
3157 1 : }
3158 :
3159 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_31 */
3160 : void ldv_partially_ordered_scenario_callback_5_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
3161 2 : ((& sd_show_manage_start_stop))(arg1, arg2, arg3);
3162 1 : }
3163 :
3164 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_34 */
3165 : void ldv_partially_ordered_scenario_callback_5_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
3166 2 : ((& sd_store_manage_start_stop))(arg1, arg2, arg3, arg4);
3167 1 : }
3168 :
3169 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_37 */
3170 : void ldv_partially_ordered_scenario_callback_5_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
3171 3 : ((& sd_suspend))(arg1, arg2);
3172 1 : }
3173 :
3174 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_5_4 */
3175 : void ldv_partially_ordered_scenario_callback_5_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3176 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
3177 1 : }
3178 :
3179 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_20 */
3180 : void ldv_partially_ordered_scenario_callback_6_20(void (*arg0)(struct device *), struct device *arg1) {
3181 2 : ((& scsi_disk_release))(arg1);
3182 1 : }
3183 :
3184 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_21 */
3185 : void ldv_partially_ordered_scenario_callback_6_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
3186 2 : ((& sd_done))(arg1);
3187 1 : }
3188 :
3189 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_22 */
3190 : void ldv_partially_ordered_scenario_callback_6_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
3191 2 : ((& sd_getgeo))(arg1, arg2);
3192 1 : }
3193 :
3194 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_23 */
3195 : void ldv_partially_ordered_scenario_callback_6_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3196 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
3197 1 : }
3198 :
3199 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_26 */
3200 : void ldv_partially_ordered_scenario_callback_6_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3201 6 : ((& sd_media_changed))(arg1);
3202 1 : }
3203 :
3204 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_27 */
3205 : void ldv_partially_ordered_scenario_callback_6_27(int (*arg0)(struct device *), struct device *arg1) {
3206 2 : ((& sd_remove))(arg1);
3207 1 : }
3208 :
3209 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_28 */
3210 : void ldv_partially_ordered_scenario_callback_6_28(void (*arg0)(struct device *), struct device *arg1) {
3211 3 : ((& sd_rescan))(arg1);
3212 1 : }
3213 :
3214 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_29 */
3215 : void ldv_partially_ordered_scenario_callback_6_29(int (*arg0)(struct device *), struct device *arg1) {
3216 2 : ((& sd_resume))(arg1);
3217 1 : }
3218 :
3219 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_30 */
3220 : void ldv_partially_ordered_scenario_callback_6_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3221 5 : ((& sd_revalidate_disk))(arg1);
3222 1 : }
3223 :
3224 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_31 */
3225 : void ldv_partially_ordered_scenario_callback_6_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
3226 2 : ((& sd_show_protection_type))(arg1, arg2, arg3);
3227 1 : }
3228 :
3229 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_34 */
3230 : void ldv_partially_ordered_scenario_callback_6_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
3231 2 : ((& sd_store_manage_start_stop))(arg1, arg2, arg3, arg4);
3232 1 : }
3233 :
3234 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_37 */
3235 : void ldv_partially_ordered_scenario_callback_6_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
3236 3 : ((& sd_suspend))(arg1, arg2);
3237 1 : }
3238 :
3239 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_6_4 */
3240 : void ldv_partially_ordered_scenario_callback_6_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3241 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
3242 1 : }
3243 :
3244 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_20 */
3245 : void ldv_partially_ordered_scenario_callback_7_20(void (*arg0)(struct device *), struct device *arg1) {
3246 2 : ((& scsi_disk_release))(arg1);
3247 1 : }
3248 :
3249 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_21 */
3250 : void ldv_partially_ordered_scenario_callback_7_21(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
3251 2 : ((& sd_done))(arg1);
3252 1 : }
3253 :
3254 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_22 */
3255 : void ldv_partially_ordered_scenario_callback_7_22(int (*arg0)(struct block_device *, struct hd_geometry *), struct block_device *arg1, struct hd_geometry *arg2) {
3256 2 : ((& sd_getgeo))(arg1, arg2);
3257 1 : }
3258 :
3259 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_23 */
3260 : void ldv_partially_ordered_scenario_callback_7_23(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3261 2 : ((& sd_ioctl))(arg1, arg2, arg3, arg4);
3262 1 : }
3263 :
3264 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_26 */
3265 : void ldv_partially_ordered_scenario_callback_7_26(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3266 6 : ((& sd_media_changed))(arg1);
3267 1 : }
3268 :
3269 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_27 */
3270 : void ldv_partially_ordered_scenario_callback_7_27(int (*arg0)(struct device *), struct device *arg1) {
3271 2 : ((& sd_remove))(arg1);
3272 1 : }
3273 :
3274 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_28 */
3275 : void ldv_partially_ordered_scenario_callback_7_28(void (*arg0)(struct device *), struct device *arg1) {
3276 3 : ((& sd_rescan))(arg1);
3277 1 : }
3278 :
3279 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_29 */
3280 : void ldv_partially_ordered_scenario_callback_7_29(int (*arg0)(struct device *), struct device *arg1) {
3281 2 : ((& sd_resume))(arg1);
3282 1 : }
3283 :
3284 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_30 */
3285 : void ldv_partially_ordered_scenario_callback_7_30(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
3286 5 : ((& sd_revalidate_disk))(arg1);
3287 1 : }
3288 :
3289 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_31 */
3290 : void ldv_partially_ordered_scenario_callback_7_31(ssize_t (*arg0)(struct device *, struct device_attribute *, char *), struct device *arg1, struct device_attribute *arg2, char *arg3) {
3291 2 : ((& sd_show_thin_provisioning))(arg1, arg2, arg3);
3292 1 : }
3293 :
3294 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_34 */
3295 : void ldv_partially_ordered_scenario_callback_7_34(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
3296 2 : ((& sd_store_manage_start_stop))(arg1, arg2, arg3, arg4);
3297 1 : }
3298 :
3299 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_37 */
3300 : void ldv_partially_ordered_scenario_callback_7_37(int (*arg0)(struct device *, pm_message_t ), struct device *arg1, struct pm_message arg2) {
3301 3 : ((& sd_suspend))(arg1, arg2);
3302 1 : }
3303 :
3304 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_7_4 */
3305 : void ldv_partially_ordered_scenario_callback_7_4(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
3306 2 : ((& sd_compat_ioctl))(arg1, arg2, arg3, arg4);
3307 1 : }
3308 :
3309 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_1_11 */
3310 : int ldv_partially_ordered_scenario_probe_1_11(int (*arg0)(struct device *), struct device *arg1) {
3311 8 : return ((& sd_probe))(arg1);
3312 1 : }
3313 :
3314 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_1_38 */
3315 : int ldv_partially_ordered_scenario_probe_1_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3316 5 : return ((& sd_open))(arg1, arg2);
3317 : }
3318 :
3319 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_2_11 */
3320 : int ldv_partially_ordered_scenario_probe_2_11(int (*arg0)(struct device *), struct device *arg1) {
3321 8 : return ((& sd_probe))(arg1);
3322 1 : }
3323 :
3324 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_2_38 */
3325 : int ldv_partially_ordered_scenario_probe_2_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3326 5 : return ((& sd_open))(arg1, arg2);
3327 : }
3328 :
3329 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_3_11 */
3330 : int ldv_partially_ordered_scenario_probe_3_11(int (*arg0)(struct device *), struct device *arg1) {
3331 8 : return ((& sd_probe))(arg1);
3332 1 : }
3333 :
3334 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_3_38 */
3335 : int ldv_partially_ordered_scenario_probe_3_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3336 5 : return ((& sd_open))(arg1, arg2);
3337 : }
3338 :
3339 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_4_11 */
3340 : int ldv_partially_ordered_scenario_probe_4_11(int (*arg0)(struct device *), struct device *arg1) {
3341 8 : return ((& sd_probe))(arg1);
3342 1 : }
3343 :
3344 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_4_38 */
3345 : int ldv_partially_ordered_scenario_probe_4_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3346 5 : return ((& sd_open))(arg1, arg2);
3347 : }
3348 :
3349 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_5_11 */
3350 : int ldv_partially_ordered_scenario_probe_5_11(int (*arg0)(struct device *), struct device *arg1) {
3351 8 : return ((& sd_probe))(arg1);
3352 1 : }
3353 :
3354 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_5_38 */
3355 : int ldv_partially_ordered_scenario_probe_5_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3356 5 : return ((& sd_open))(arg1, arg2);
3357 : }
3358 :
3359 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_6_11 */
3360 : int ldv_partially_ordered_scenario_probe_6_11(int (*arg0)(struct device *), struct device *arg1) {
3361 8 : return ((& sd_probe))(arg1);
3362 1 : }
3363 :
3364 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_6_38 */
3365 : int ldv_partially_ordered_scenario_probe_6_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3366 5 : return ((& sd_open))(arg1, arg2);
3367 : }
3368 :
3369 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_7_11 */
3370 : int ldv_partially_ordered_scenario_probe_7_11(int (*arg0)(struct device *), struct device *arg1) {
3371 8 : return ((& sd_probe))(arg1);
3372 1 : }
3373 :
3374 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_7_38 */
3375 : int ldv_partially_ordered_scenario_probe_7_38(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
3376 5 : return ((& sd_open))(arg1, arg2);
3377 : }
3378 :
3379 1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_1_15 */
3380 : void ldv_partially_ordered_scenario_release_1_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3381 2 : ((& sd_release))(arg1, arg2);
3382 1 : }
3383 :
3384 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_1_2 */
3385 : void ldv_partially_ordered_scenario_release_1_2(void (*arg0)(struct device *), struct device *arg1) {
3386 3 : ((& sd_shutdown))(arg1);
3387 1 : }
3388 :
3389 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_2_15 */
3390 : void ldv_partially_ordered_scenario_release_2_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3391 2 : ((& sd_release))(arg1, arg2);
3392 1 : }
3393 :
3394 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_2_2 */
3395 : void ldv_partially_ordered_scenario_release_2_2(void (*arg0)(struct device *), struct device *arg1) {
3396 3 : ((& sd_shutdown))(arg1);
3397 1 : }
3398 :
3399 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_3_15 */
3400 : void ldv_partially_ordered_scenario_release_3_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3401 2 : ((& sd_release))(arg1, arg2);
3402 1 : }
3403 :
3404 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_3_2 */
3405 : void ldv_partially_ordered_scenario_release_3_2(void (*arg0)(struct device *), struct device *arg1) {
3406 3 : ((& sd_shutdown))(arg1);
3407 1 : }
3408 :
3409 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_4_15 */
3410 : void ldv_partially_ordered_scenario_release_4_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3411 2 : ((& sd_release))(arg1, arg2);
3412 1 : }
3413 :
3414 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_4_2 */
3415 : void ldv_partially_ordered_scenario_release_4_2(void (*arg0)(struct device *), struct device *arg1) {
3416 3 : ((& sd_shutdown))(arg1);
3417 1 : }
3418 :
3419 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_5_15 */
3420 : void ldv_partially_ordered_scenario_release_5_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3421 2 : ((& sd_release))(arg1, arg2);
3422 1 : }
3423 :
3424 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_5_2 */
3425 : void ldv_partially_ordered_scenario_release_5_2(void (*arg0)(struct device *), struct device *arg1) {
3426 3 : ((& sd_shutdown))(arg1);
3427 1 : }
3428 :
3429 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_6_15 */
3430 : void ldv_partially_ordered_scenario_release_6_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3431 2 : ((& sd_release))(arg1, arg2);
3432 1 : }
3433 :
3434 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_6_2 */
3435 : void ldv_partially_ordered_scenario_release_6_2(void (*arg0)(struct device *), struct device *arg1) {
3436 3 : ((& sd_shutdown))(arg1);
3437 1 : }
3438 :
3439 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_7_15 */
3440 : void ldv_partially_ordered_scenario_release_7_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
3441 2 : ((& sd_release))(arg1, arg2);
3442 1 : }
3443 :
3444 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_7_2 */
3445 : void ldv_partially_ordered_scenario_release_7_2(void (*arg0)(struct device *), struct device *arg1) {
3446 3 : ((& sd_shutdown))(arg1);
3447 1 : }
3448 :
3449 : /* AUX_FUNC ldv_platform_instance_9 */
3450 : void ldv_platform_instance_9(void *arg0) {
3451 : /* LDV {"thread": 9, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'platform_instance(pm)'", "function": "ldv_platform_instance_9"} */
3452 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
3453 1 : struct platform_driver *ldv_9_container_platform_driver;
3454 1 : struct platform_device *ldv_9_ldv_param_15_0_default;
3455 1 : struct platform_device *ldv_9_ldv_param_3_0_default;
3456 1 : int ldv_9_probed_default;
3457 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
3458 1 : /* Initialize automaton variables */
3459 2 : ldv_9_probed_default = 1;
3460 1 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Register a driver callbacks for platform-level device."} */
3461 3 : ldv_free(arg0);
3462 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
3463 :
3464 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
3465 3 : ldv_9_container_platform_driver = ldv_xmalloc_unknown_size(0);
3466 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
3467 :
3468 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for 'platform_device' structure."} */
3469 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
3470 :
3471 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
3472 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
3473 :
3474 : /* Jump to a subprocess 'main' initial state */
3475 1 : goto ldv_main_9;
3476 : /* End of the process */
3477 : return;
3478 1 :
3479 : /* Sbprocess main */
3480 : ldv_main_9:
3481 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
3482 :
3483 4 : if (ldv_undef_int()) {
3484 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
3485 3 : ldv_9_ldv_param_15_0_default = ldv_xmalloc_unknown_size(0);
3486 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
3487 :
3488 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Check that the device in the system and do driver initializations. Invoke callback probe from PM."} */
3489 : /* Callback pre-call */
3490 1 : ldv_pre_probe();
3491 3 : if (ldv_9_container_platform_driver->probe) {
3492 : /* LDV {"type": "CALLBACK", "call": "ldv_9_probed_default = (ldv_9_container_platform_driver->probe)(ldv_9_ldv_param_15_0_default);", "comment": "probe"} */
3493 2 : ldv_9_probed_default = ldv_platform_instance_probe_9_15(ldv_9_container_platform_driver->probe, ldv_9_ldv_param_15_0_default);
3494 : }
3495 : /* Callback post-call */
3496 4 : ldv_9_probed_default = ldv_post_probe(ldv_9_probed_default);
3497 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
3498 :
3499 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
3500 2 : ldv_free(ldv_9_ldv_param_15_0_default);
3501 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
3502 :
3503 4 : if (ldv_undef_int()) {
3504 : /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Platform device is probed successfully now."} */
3505 2 : ldv_assume(ldv_9_probed_default == 0);
3506 : /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_END"} */
3507 :
3508 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
3509 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
3510 :
3511 : /* Jump to a subprocess 'call' initial state */
3512 1 : goto ldv_call_9;
3513 : }
3514 : else {
3515 : /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Failed to probe the device."} */
3516 2 : ldv_assume(ldv_9_probed_default != 0);
3517 : /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_END"} */
3518 :
3519 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
3520 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
3521 :
3522 : /* Jump to a subprocess 'main' initial state */
3523 1 : goto ldv_main_9;
3524 : }
3525 : }
3526 : else {
3527 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for 'platform_device' structure."} */
3528 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
3529 :
3530 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
3531 2 : ldv_free(ldv_9_container_platform_driver);
3532 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
3533 :
3534 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish PM callbacks invocations scenario."} */
3535 : /* Skip a non-replicative signal receiving */
3536 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
3537 :
3538 : /* Exit function at a terminal state */
3539 1 : return;
3540 : }
3541 : /* End of the subprocess 'main' */
3542 : return;
3543 1 :
3544 : /* Sbprocess call */
3545 : ldv_call_9:
3546 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
3547 :
3548 2 : switch (ldv_undef_int()) {
3549 3 : case 1: {
3550 : /* LDV {"action": "PRE_CALL_3", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
3551 3 : ldv_9_ldv_param_3_0_default = ldv_xmalloc_unknown_size(0);
3552 : /* LDV {"action": "PRE_CALL_3", "type": "CONDITION_END"} */
3553 :
3554 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Remove device from the system. Invoke callback release from PM."} */
3555 3 : if (ldv_9_container_platform_driver->remove) {
3556 : /* LDV {"type": "CALLBACK", "call": "(ldv_9_container_platform_driver->remove)(ldv_9_ldv_param_3_0_default);", "comment": "release"} */
3557 2 : ldv_platform_instance_release_9_3(ldv_9_container_platform_driver->remove, ldv_9_ldv_param_3_0_default);
3558 : }
3559 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
3560 :
3561 : /* LDV {"action": "POST_CALL_3", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
3562 4 : ldv_free(ldv_9_ldv_param_3_0_default);
3563 : /* LDV {"action": "POST_CALL_3", "type": "CONDITION_END"} */
3564 :
3565 : /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_BEGIN", "comment": "Platform device is released now."} */
3566 1 : ldv_9_probed_default = 1;
3567 : /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_END"} */
3568 :
3569 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
3570 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
3571 :
3572 : /* Jump to a subprocess 'main' initial state */
3573 1 : goto ldv_main_9;
3574 1 : break;
3575 : }
3576 3 : case 2: {
3577 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "comment": "Call callback 'callback' of a process 'platform_instance' of an interface category 'pm'"} */
3578 : /* Skip callback without implementations */
3579 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
3580 :
3581 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
3582 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
3583 :
3584 : /* Jump to a subprocess 'call' initial state */
3585 1 : goto ldv_call_9;
3586 1 : break;
3587 : }
3588 3 : case 3: {
3589 : /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Proceed to a power management scenario."} */
3590 2 : ldv_dispatch_pm_register_9_6();
3591 : /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_END"} */
3592 :
3593 : /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Finish the power management scenario."} */
3594 2 : ldv_dispatch_pm_deregister_9_5();
3595 : /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_END"} */
3596 :
3597 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
3598 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
3599 :
3600 : /* Jump to a subprocess 'call' initial state */
3601 1 : goto ldv_call_9;
3602 : /* Jump to a subprocess 'call' initial state */
3603 : goto ldv_call_9;
3604 1 : break;
3605 : }
3606 2 : default: ldv_stop();
3607 1 : }
3608 0 : /* End of the subprocess 'call' */
3609 0 : return;
3610 : /* LDV {"comment": "End of control function based on process 'platform_instance(pm)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_platform_instance_9"} */
3611 : }
3612 :
3613 : /* AUX_FUNC_CALLBACK ldv_platform_instance_probe_9_15 */
3614 : int ldv_platform_instance_probe_9_15(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
3615 2 : return (*arg0)(arg1);
3616 1 : }
3617 :
3618 : /* AUX_FUNC_CALLBACK ldv_platform_instance_release_9_3 */
3619 : void ldv_platform_instance_release_9_3(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
3620 1 : (*arg0)(arg1);
3621 1 : }
3622 :
3623 : /* AUX_FUNC ldv_pm_ops_scenario_8 */
3624 : void ldv_pm_ops_scenario_8(void *arg0) {
3625 : /* LDV {"thread": 8, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'pm_ops_scenario(pm)'", "function": "ldv_pm_ops_scenario_8"} */
3626 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
3627 1 : struct device *ldv_8_device_device;
3628 1 : struct dev_pm_ops *ldv_8_pm_ops_dev_pm_ops;
3629 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
3630 1 : /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Ready for a power management scenarios."} */
3631 3 : ldv_free(arg0);
3632 1 : /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_END"} */
3633 :
3634 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
3635 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
3636 :
3637 : /* Jump to a subprocess 'do' initial state */
3638 1 : goto ldv_do_8;
3639 : /* End of the process */
3640 : return;
3641 1 :
3642 : /* Sbprocess do */
3643 : ldv_do_8:
3644 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
3645 :
3646 2 : switch (ldv_undef_int()) {
3647 3 : case 1: {
3648 : /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_BEGIN", "callback": true, "comment": "Device appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Invoke callback runtime_idle from PM."} */
3649 3 : if (ldv_8_pm_ops_dev_pm_ops->runtime_idle) {
3650 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->runtime_idle)(ldv_8_device_device);", "comment": "runtime_idle"} */
3651 2 : ldv_pm_ops_scenario_runtime_idle_8_24(ldv_8_pm_ops_dev_pm_ops->runtime_idle, ldv_8_device_device);
3652 : }
3653 : /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_END"} */
3654 :
3655 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
3656 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
3657 :
3658 : /* Jump to a subprocess 'do' initial state */
3659 2 : goto ldv_do_8;
3660 1 : break;
3661 : }
3662 3 : case 2: {
3663 : /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "The device should be put into a low-power state to prevent communication of the device with the CPU(s) and RAM. Invoke callback runtime_suspend from PM."} */
3664 3 : if (ldv_8_pm_ops_dev_pm_ops->runtime_suspend) {
3665 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->runtime_suspend)(ldv_8_device_device);", "comment": "runtime_suspend"} */
3666 2 : ldv_pm_ops_scenario_runtime_suspend_8_22(ldv_8_pm_ops_dev_pm_ops->runtime_suspend, ldv_8_device_device);
3667 : }
3668 : /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_END"} */
3669 :
3670 : /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Put the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. Invoke callback runtime_resume from PM."} */
3671 6 : if (ldv_8_pm_ops_dev_pm_ops->runtime_resume) {
3672 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->runtime_resume)(ldv_8_device_device);", "comment": "runtime_resume"} */
3673 4 : ldv_pm_ops_scenario_runtime_resume_8_21(ldv_8_pm_ops_dev_pm_ops->runtime_resume, ldv_8_device_device);
3674 : }
3675 : /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_END"} */
3676 :
3677 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
3678 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
3679 :
3680 : /* Jump to a subprocess 'do' initial state */
3681 3 : goto ldv_do_8;
3682 1 : break;
3683 : }
3684 3 : case 3: {
3685 : /* LDV {"action": "PREPARE", "type": "CALL_BEGIN", "callback": true, "comment": "Prevent new children of the device from being registered. Invoke callback prepare from PM."} */
3686 3 : if (ldv_8_pm_ops_dev_pm_ops->prepare) {
3687 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->prepare)(ldv_8_device_device);", "comment": "prepare"} */
3688 2 : ldv_pm_ops_scenario_prepare_8_19(ldv_8_pm_ops_dev_pm_ops->prepare, ldv_8_device_device);
3689 : }
3690 : /* LDV {"action": "PREPARE", "type": "CALL_END"} */
3691 :
3692 4 : switch (ldv_undef_int()) {
3693 3 : case 1: {
3694 : /* LDV {"action": "SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "Quiesce subsystem-level device before suspend. Invoke callback suspend from PM."} */
3695 3 : if (ldv_8_pm_ops_dev_pm_ops->suspend) {
3696 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->suspend)(ldv_8_device_device);", "comment": "suspend"} */
3697 2 : ldv_pm_ops_scenario_suspend_8_18(ldv_8_pm_ops_dev_pm_ops->suspend, ldv_8_device_device);
3698 : }
3699 : /* LDV {"action": "SUSPEND", "type": "CALL_END"} */
3700 :
3701 6 : if (ldv_undef_int()) {
3702 : /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Expect that the device will be in a low-power state. Invoke callback suspend_noirq from PM."} */
3703 3 : if (ldv_8_pm_ops_dev_pm_ops->suspend_noirq) {
3704 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->suspend_noirq)(ldv_8_device_device);", "comment": "suspend_noirq"} */
3705 2 : ldv_pm_ops_scenario_suspend_noirq_8_17(ldv_8_pm_ops_dev_pm_ops->suspend_noirq, ldv_8_device_device);
3706 : }
3707 : /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_END"} */
3708 :
3709 : /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the #resume() performing actions that might be racing with device's interrupt handler. Invoke callback resume_noirq from PM."} */
3710 6 : if (ldv_8_pm_ops_dev_pm_ops->resume_noirq) {
3711 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->resume_noirq)(ldv_8_device_device);", "comment": "resume_noirq"} */
3712 4 : ldv_pm_ops_scenario_resume_noirq_8_16(ldv_8_pm_ops_dev_pm_ops->resume_noirq, ldv_8_device_device);
3713 : }
3714 : /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_END"} */
3715 :
3716 : }
3717 : else {
3718 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
3719 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
3720 :
3721 : }
3722 : /* LDV {"action": "RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Make the device start working again after resume. Invoke callback resume from dev_pm_ops."} */
3723 : /* LDV {"type": "CALLBACK", "call": "((& sd_resume))(ldv_8_device_device);", "comment": "resume"} */
3724 6 : ldv_pm_ops_scenario_resume_8_14(ldv_8_pm_ops_dev_pm_ops->resume, ldv_8_device_device);
3725 : /* LDV {"action": "RESUME", "type": "CALL_END"} */
3726 :
3727 1 : break;
3728 1 : }
3729 3 : case 2: {
3730 : /* LDV {"action": "FREEZE", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for creating a hibernation image. Invoke callback freeze from PM."} */
3731 3 : if (ldv_8_pm_ops_dev_pm_ops->freeze) {
3732 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->freeze)(ldv_8_device_device);", "comment": "freeze"} */
3733 2 : ldv_pm_ops_scenario_freeze_8_13(ldv_8_pm_ops_dev_pm_ops->freeze, ldv_8_device_device);
3734 : }
3735 : /* LDV {"action": "FREEZE", "type": "CALL_END"} */
3736 :
3737 6 : if (ldv_undef_int()) {
3738 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
3739 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
3740 :
3741 : }
3742 : else {
3743 : /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #freeze() that might be racing with device's interrupt handler. Invoke callback freeze_noirq from PM."} */
3744 3 : if (ldv_8_pm_ops_dev_pm_ops->freeze_noirq) {
3745 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->freeze_noirq)(ldv_8_device_device);", "comment": "freeze_noirq"} */
3746 2 : ldv_pm_ops_scenario_freeze_noirq_8_11(ldv_8_pm_ops_dev_pm_ops->freeze_noirq, ldv_8_device_device);
3747 : }
3748 : /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_END"} */
3749 :
3750 : /* LDV {"action": "THAW_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #thaw() performing actions that might be racing with device's interrupt handler. Invoke callback thaw_noirq from PM."} */
3751 6 : if (ldv_8_pm_ops_dev_pm_ops->thaw_noirq) {
3752 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->thaw_noirq)(ldv_8_device_device);", "comment": "thaw_noirq"} */
3753 4 : ldv_pm_ops_scenario_thaw_noirq_8_10(ldv_8_pm_ops_dev_pm_ops->thaw_noirq, ldv_8_device_device);
3754 : }
3755 : /* LDV {"action": "THAW_NOIRQ", "type": "CALL_END"} */
3756 :
3757 : }
3758 : /* LDV {"action": "THAW", "type": "CALL_BEGIN", "callback": true, "comment": "The hibernation image has created or creation has failed. Invoke callback thaw from PM."} */
3759 9 : if (ldv_8_pm_ops_dev_pm_ops->thaw) {
3760 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->thaw)(ldv_8_device_device);", "comment": "thaw"} */
3761 6 : ldv_pm_ops_scenario_thaw_8_9(ldv_8_pm_ops_dev_pm_ops->thaw, ldv_8_device_device);
3762 : }
3763 : /* LDV {"action": "THAW", "type": "CALL_END"} */
3764 :
3765 4 : break;
3766 1 : }
3767 3 : case 3: {
3768 : /* LDV {"action": "POWEROFF", "type": "CALL_BEGIN", "callback": true, "comment": "Hibernation image has been created. Invoke callback poweroff from PM."} */
3769 3 : if (ldv_8_pm_ops_dev_pm_ops->poweroff) {
3770 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->poweroff)(ldv_8_device_device);", "comment": "poweroff"} */
3771 2 : ldv_pm_ops_scenario_poweroff_8_8(ldv_8_pm_ops_dev_pm_ops->poweroff, ldv_8_device_device);
3772 : }
3773 : /* LDV {"action": "POWEROFF", "type": "CALL_END"} */
3774 :
3775 6 : if (ldv_undef_int()) {
3776 : /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #poweroff(). Invoke callback poweroff_noirq from PM."} */
3777 3 : if (ldv_8_pm_ops_dev_pm_ops->poweroff_noirq) {
3778 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->poweroff_noirq)(ldv_8_device_device);", "comment": "poweroff_noirq"} */
3779 2 : ldv_pm_ops_scenario_poweroff_noirq_8_7(ldv_8_pm_ops_dev_pm_ops->poweroff_noirq, ldv_8_device_device);
3780 : }
3781 : /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_END"} */
3782 :
3783 : /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #restore() performing actions that might be racing with device's interrupt handler. Invoke callback restore_noirq from PM."} */
3784 6 : if (ldv_8_pm_ops_dev_pm_ops->restore_noirq) {
3785 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->restore_noirq)(ldv_8_device_device);", "comment": "restore_noirq"} */
3786 4 : ldv_pm_ops_scenario_restore_noirq_8_6(ldv_8_pm_ops_dev_pm_ops->restore_noirq, ldv_8_device_device);
3787 : }
3788 : /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_END"} */
3789 :
3790 : }
3791 : else {
3792 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
3793 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
3794 :
3795 : }
3796 : /* LDV {"action": "RESTORE", "type": "CALL_BEGIN", "callback": true, "comment": "Restoration of the contents of main memory from a hibernation image has been done. Invoke callback restore from PM."} */
3797 9 : if (ldv_8_pm_ops_dev_pm_ops->restore) {
3798 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->restore)(ldv_8_device_device);", "comment": "restore"} */
3799 6 : ldv_pm_ops_scenario_restore_8_4(ldv_8_pm_ops_dev_pm_ops->restore, ldv_8_device_device);
3800 : }
3801 : /* LDV {"action": "RESTORE", "type": "CALL_END"} */
3802 :
3803 4 : break;
3804 1 : }
3805 2 : default: ldv_stop();
3806 1 : }
3807 0 : /* LDV {"action": "COMPLETE", "type": "CALL_BEGIN", "callback": true, "comment": "Undo the changes made by #prepare(). Invoke callback complete from PM."} */
3808 27 : if (ldv_8_pm_ops_dev_pm_ops->complete) {
3809 0 : /* LDV {"type": "CALLBACK", "call": "(ldv_8_pm_ops_dev_pm_ops->complete)(ldv_8_device_device);", "comment": "complete"} */
3810 18 : ldv_pm_ops_scenario_complete_8_3(ldv_8_pm_ops_dev_pm_ops->complete, ldv_8_device_device);
3811 : }
3812 : /* LDV {"action": "COMPLETE", "type": "CALL_END"} */
3813 :
3814 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
3815 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
3816 :
3817 : /* Jump to a subprocess 'do' initial state */
3818 10 : goto ldv_do_8;
3819 1 : break;
3820 : }
3821 3 : case 4: {
3822 : /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Do not expect power management scenarios."} */
3823 : /* Skip a non-replicative signal receiving */
3824 : /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_END"} */
3825 :
3826 : /* Exit function at a terminal state */
3827 1 : return;
3828 1 : break;
3829 : }
3830 2 : default: ldv_stop();
3831 1 : }
3832 0 : /* End of the subprocess 'do' */
3833 0 : return;
3834 : /* LDV {"comment": "End of control function based on process 'pm_ops_scenario(pm)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_pm_ops_scenario_8"} */
3835 : }
3836 :
3837 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_complete_8_3 */
3838 : void ldv_pm_ops_scenario_complete_8_3(void (*arg0)(struct device *), struct device *arg1) {
3839 36 : (*arg0)(arg1);
3840 9 : }
3841 :
3842 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_8_13 */
3843 : void ldv_pm_ops_scenario_freeze_8_13(int (*arg0)(struct device *), struct device *arg1) {
3844 4 : (*arg0)(arg1);
3845 1 : }
3846 :
3847 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_noirq_8_11 */
3848 : void ldv_pm_ops_scenario_freeze_noirq_8_11(int (*arg0)(struct device *), struct device *arg1) {
3849 4 : (*arg0)(arg1);
3850 1 : }
3851 :
3852 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_8_8 */
3853 : void ldv_pm_ops_scenario_poweroff_8_8(int (*arg0)(struct device *), struct device *arg1) {
3854 4 : (*arg0)(arg1);
3855 1 : }
3856 :
3857 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_noirq_8_7 */
3858 : void ldv_pm_ops_scenario_poweroff_noirq_8_7(int (*arg0)(struct device *), struct device *arg1) {
3859 4 : (*arg0)(arg1);
3860 1 : }
3861 :
3862 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_prepare_8_19 */
3863 : void ldv_pm_ops_scenario_prepare_8_19(int (*arg0)(struct device *), struct device *arg1) {
3864 4 : (*arg0)(arg1);
3865 1 : }
3866 :
3867 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_8_4 */
3868 : void ldv_pm_ops_scenario_restore_8_4(int (*arg0)(struct device *), struct device *arg1) {
3869 12 : (*arg0)(arg1);
3870 3 : }
3871 :
3872 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_noirq_8_6 */
3873 : void ldv_pm_ops_scenario_restore_noirq_8_6(int (*arg0)(struct device *), struct device *arg1) {
3874 8 : (*arg0)(arg1);
3875 2 : }
3876 :
3877 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_8_14 */
3878 : void ldv_pm_ops_scenario_resume_8_14(int (*arg0)(struct device *), struct device *arg1) {
3879 6 : ((& sd_resume))(arg1);
3880 3 : }
3881 :
3882 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_noirq_8_16 */
3883 : void ldv_pm_ops_scenario_resume_noirq_8_16(int (*arg0)(struct device *), struct device *arg1) {
3884 8 : (*arg0)(arg1);
3885 2 : }
3886 :
3887 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_idle_8_24 */
3888 : void ldv_pm_ops_scenario_runtime_idle_8_24(int (*arg0)(struct device *), struct device *arg1) {
3889 4 : (*arg0)(arg1);
3890 1 : }
3891 :
3892 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_resume_8_21 */
3893 : void ldv_pm_ops_scenario_runtime_resume_8_21(int (*arg0)(struct device *), struct device *arg1) {
3894 8 : (*arg0)(arg1);
3895 2 : }
3896 :
3897 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_suspend_8_22 */
3898 : void ldv_pm_ops_scenario_runtime_suspend_8_22(int (*arg0)(struct device *), struct device *arg1) {
3899 4 : (*arg0)(arg1);
3900 1 : }
3901 :
3902 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_8_18 */
3903 : void ldv_pm_ops_scenario_suspend_8_18(int (*arg0)(struct device *), struct device *arg1) {
3904 4 : (*arg0)(arg1);
3905 1 : }
3906 :
3907 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_noirq_8_17 */
3908 : void ldv_pm_ops_scenario_suspend_noirq_8_17(int (*arg0)(struct device *), struct device *arg1) {
3909 4 : (*arg0)(arg1);
3910 1 : }
3911 :
3912 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_8_9 */
3913 : void ldv_pm_ops_scenario_thaw_8_9(int (*arg0)(struct device *), struct device *arg1) {
3914 12 : (*arg0)(arg1);
3915 3 : }
3916 :
3917 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_noirq_8_10 */
3918 : void ldv_pm_ops_scenario_thaw_noirq_8_10(int (*arg0)(struct device *), struct device *arg1) {
3919 8 : (*arg0)(arg1);
3920 2 : }
3921 :
3922 : /* AUX_FUNC main */
3923 : int main() {
3924 1 : ldv_main_13(0);
3925 0 : return 0;
3926 : }
3927 :
3928 :
3929 : /* AUX_FUNC ERR_PTR */
3930 : static inline void *ERR_PTR (long int error)
3931 : {
3932 :
3933 : return ldv_err_ptr(error);
3934 : }
3935 :
3936 : /* AUX_FUNC PTR_ERR */
3937 : static inline long int PTR_ERR (void const *ptr)
3938 : {
3939 :
3940 : return ldv_ptr_err(ptr);
3941 : }
3942 :
3943 : /* AUX_FUNC IS_ERR */
3944 : static inline long int IS_ERR (void const *ptr)
3945 : {
3946 :
3947 : return ldv_is_err(ptr);
3948 : }
3949 :
3950 : /* AUX_FUNC IS_ERR_OR_NULL */
3951 : static inline long int IS_ERR_OR_NULL (void const *ptr)
3952 : {
3953 :
3954 : return ldv_is_err_or_null(ptr);
3955 : }
3956 :
3957 : /* AUX_FUNC kzalloc */
3958 : static inline void *kzalloc (size_t size, gfp_t flags)
3959 : {
3960 14 :
3961 42 : return ldv_kzalloc(size, flags);
3962 : }
3963 :
3964 : /* AUX_FUNC ldv_dev_get_drvdata_6 */
3965 : void *ldv_dev_get_drvdata_6 (struct device const *dev)
3966 : {
3967 38 :
3968 114 : return ldv_dev_get_drvdata(dev);
3969 : }
3970 :
3971 : /* AUX_FUNC ldv_dev_get_drvdata_7 */
3972 : void *ldv_dev_get_drvdata_7 (struct device const *dev)
3973 : {
3974 7 :
3975 21 : return ldv_dev_get_drvdata(dev);
3976 : }
3977 :
3978 : /* AUX_FUNC ldv_scsi_register_driver_8 */
3979 : int ldv_scsi_register_driver_8 (struct device_driver *ldv_func_arg1)
3980 : {
3981 1 :
3982 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'scsi_register_driver'"} */
3983 4 : return ldv_emg_scsi_register_driver(ldv_func_arg1);
3984 : }
3985 :
3986 : /* AUX_FUNC ldv_driver_unregister_9 */
3987 : void ldv_driver_unregister_9 (struct device_driver *ldv_func_arg1)
3988 : {
3989 :
3990 : /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'driver_unregister'"} */
3991 4 : ldv_emg_driver_unregister(ldv_func_arg1);
3992 2 : }
|