Lines Matching refs:ars_state

205 	struct ars_state {  struct
209 } ars_state; member
529 static void post_ars_status(struct ars_state *ars_state, in post_ars_status() argument
538 ars_state->deadline = jiffies + 1*HZ; in post_ars_status()
539 ars_status = ars_state->ars_status; in post_ars_status()
569 struct ars_state *ars_state, in nfit_test_cmd_ars_start() argument
576 spin_lock(&ars_state->lock); in nfit_test_cmd_ars_start()
577 if (time_before(jiffies, ars_state->deadline)) { in nfit_test_cmd_ars_start()
583 post_ars_status(ars_state, &t->badrange, ars_start->address, in nfit_test_cmd_ars_start()
587 spin_unlock(&ars_state->lock); in nfit_test_cmd_ars_start()
592 static int nfit_test_cmd_ars_status(struct ars_state *ars_state, in nfit_test_cmd_ars_status() argument
596 if (buf_len < ars_state->ars_status->out_length) in nfit_test_cmd_ars_status()
599 spin_lock(&ars_state->lock); in nfit_test_cmd_ars_status()
600 if (time_before(jiffies, ars_state->deadline)) { in nfit_test_cmd_ars_status()
606 memcpy(ars_status, ars_state->ars_status, in nfit_test_cmd_ars_status()
607 ars_state->ars_status->out_length); in nfit_test_cmd_ars_status()
610 spin_unlock(&ars_state->lock); in nfit_test_cmd_ars_status()
1515 struct ars_state *ars_state = &t->ars_state; in nfit_test_ctl() local
1576 rc = nfit_test_cmd_ars_start(t, ars_state, buf, in nfit_test_ctl()
1580 rc = nfit_test_cmd_ars_status(ars_state, buf, buf_len, in nfit_test_ctl()
1694 static int ars_state_init(struct device *dev, struct ars_state *ars_state) in ars_state_init() argument
1697 ars_state->ars_status = devm_kzalloc(dev, in ars_state_init()
1699 if (!ars_state->ars_status) in ars_state_init()
1701 spin_lock_init(&ars_state->lock); in ars_state_init()
1940 return ars_state_init(&t->pdev.dev, &t->ars_state); in nfit_test0_alloc()
1974 return ars_state_init(&t->pdev.dev, &t->ars_state); in nfit_test1_alloc()
2687 post_ars_status(&t->ars_state, &t->badrange, t->spa_set_dma[0], in nfit_test0_setup()
2829 post_ars_status(&t->ars_state, &t->badrange, t->spa_set_dma[0], in nfit_test1_setup()