Lines Matching refs:hv_err

88 static int n2rng_hv_err_trans(unsigned long hv_err)  in n2rng_hv_err_trans()  argument
90 switch (hv_err) { in n2rng_hv_err_trans()
112 unsigned long hv_err, state, ticks, watchdog_delta, watchdog_status; in n2rng_generic_read_control_v2() local
116 hv_err = sun4v_rng_ctl_read_v2(ra, unit, &state, in n2rng_generic_read_control_v2()
120 if (hv_err == HV_EOK) in n2rng_generic_read_control_v2()
123 if (hv_err == HV_EBUSY) { in n2rng_generic_read_control_v2()
128 } else if (hv_err == HV_EWOULDBLOCK) { in n2rng_generic_read_control_v2()
137 return hv_err; in n2rng_generic_read_control_v2()
160 unsigned long hv_err; in n2rng_write_ctl_one() local
163 hv_err = sun4v_rng_ctl_write_v1(control_ra, state, in n2rng_write_ctl_one()
166 hv_err = sun4v_rng_ctl_write_v2(control_ra, state, in n2rng_write_ctl_one()
168 if (hv_err == HV_EOK) in n2rng_write_ctl_one()
169 hv_err = n2rng_control_settle_v2(np, unit); in n2rng_write_ctl_one()
173 return hv_err; in n2rng_write_ctl_one()
178 unsigned long ticks, hv_err; in n2rng_generic_read_data() local
182 hv_err = sun4v_rng_data_read(data_ra, &ticks); in n2rng_generic_read_data()
183 if (hv_err == HV_EOK) in n2rng_generic_read_data()
186 if (hv_err == HV_EWOULDBLOCK) { in n2rng_generic_read_data()
190 } else if (hv_err == HV_ENOACCESS) { in n2rng_generic_read_data()
192 } else if (hv_err == HV_EIO) { in n2rng_generic_read_data()
207 unsigned long hv_err; in n2rng_read_diag_data_one() local
210 hv_err = sun4v_rng_data_read_diag_v1(data_ra, data_len, ticks); in n2rng_read_diag_data_one()
212 hv_err = sun4v_rng_data_read_diag_v2(data_ra, data_len, in n2rng_read_diag_data_one()
217 return hv_err; in n2rng_read_diag_data_one()
225 unsigned long ticks, hv_err; in n2rng_generic_read_diag_data() local
229 hv_err = n2rng_read_diag_data_one(np, unit, in n2rng_generic_read_diag_data()
232 if (hv_err == HV_EOK) in n2rng_generic_read_diag_data()
235 if (hv_err == HV_EWOULDBLOCK) { in n2rng_generic_read_diag_data()
239 } else if (hv_err == HV_ENOACCESS) { in n2rng_generic_read_diag_data()
241 } else if (hv_err == HV_EIO) { in n2rng_generic_read_diag_data()
254 unsigned long hv_err, ticks; in n2rng_generic_write_control() local
258 hv_err = n2rng_write_ctl_one(np, unit, state, control_ra, in n2rng_generic_write_control()
260 if (hv_err == HV_EOK) in n2rng_generic_write_control()
263 if (hv_err == HV_EWOULDBLOCK) { in n2rng_generic_write_control()
267 } else if (hv_err == HV_EBUSY) { in n2rng_generic_write_control()
281 unsigned long hv_err; in n2rng_try_read_ctl() local
285 hv_err = sun4v_rng_get_diag_ctl(); in n2rng_try_read_ctl()
292 hv_err = sun4v_rng_ctl_read_v2(0UL, ~0UL, &x, &x, &x, &x); in n2rng_try_read_ctl()
293 switch (hv_err) { in n2rng_try_read_ctl()
298 hv_err = HV_EOK; in n2rng_try_read_ctl()
303 return n2rng_hv_err_trans(hv_err); in n2rng_try_read_ctl()