Lines Matching refs:aq
402 struct ap_queue *aq = from_timer(aq, t, timeout); in ap_request_timeout() local
404 spin_lock_bh(&aq->lock); in ap_request_timeout()
405 ap_wait(ap_sm_event(aq, AP_SM_EVENT_TIMEOUT)); in ap_request_timeout()
406 spin_unlock_bh(&aq->lock); in ap_request_timeout()
440 struct ap_queue *aq; in ap_tasklet_fn() local
451 hash_for_each(ap_queues, bkt, aq, hnode) { in ap_tasklet_fn()
452 spin_lock_bh(&aq->lock); in ap_tasklet_fn()
453 wait = min(wait, ap_sm_event_loop(aq, AP_SM_EVENT_POLL)); in ap_tasklet_fn()
454 spin_unlock_bh(&aq->lock); in ap_tasklet_fn()
464 struct ap_queue *aq; in ap_pending_requests() local
467 hash_for_each(ap_queues, bkt, aq, hnode) { in ap_pending_requests()
468 if (aq->queue_count == 0) in ap_pending_requests()
761 struct ap_queue *aq; in ap_get_qdev() local
764 hash_for_each(ap_queues, bkt, aq, hnode) { in ap_get_qdev()
765 if (aq->qid == qid) { in ap_get_qdev()
766 get_device(&aq->ap_dev.device); in ap_get_qdev()
768 return aq; in ap_get_qdev()
1326 struct ap_queue *aq; in ap_scan_domains() local
1340 aq = dev ? to_ap_queue(dev) : NULL; in ap_scan_domains()
1352 if (aq) { in ap_scan_domains()
1362 if (!aq) { in ap_scan_domains()
1363 aq = ap_queue_create(qid, ac->ap_dev.device_type); in ap_scan_domains()
1364 if (!aq) { in ap_scan_domains()
1369 aq->card = ac; in ap_scan_domains()
1370 aq->config = !decfg; in ap_scan_domains()
1371 dev = &aq->ap_dev.device; in ap_scan_domains()
1393 spin_lock_bh(&aq->lock); in ap_scan_domains()
1394 if (decfg && aq->config) { in ap_scan_domains()
1396 aq->config = false; in ap_scan_domains()
1397 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) { in ap_scan_domains()
1398 aq->dev_state = AP_DEV_STATE_ERROR; in ap_scan_domains()
1399 aq->last_err_rc = AP_RESPONSE_DECONFIGURED; in ap_scan_domains()
1401 spin_unlock_bh(&aq->lock); in ap_scan_domains()
1405 ap_flush_queue(aq); in ap_scan_domains()
1408 if (!decfg && !aq->config) { in ap_scan_domains()
1410 aq->config = true; in ap_scan_domains()
1411 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) { in ap_scan_domains()
1412 aq->dev_state = AP_DEV_STATE_OPERATING; in ap_scan_domains()
1413 aq->sm_state = AP_SM_STATE_RESET_START; in ap_scan_domains()
1415 spin_unlock_bh(&aq->lock); in ap_scan_domains()
1421 if (!decfg && aq->dev_state == AP_DEV_STATE_ERROR) { in ap_scan_domains()
1422 spin_unlock_bh(&aq->lock); in ap_scan_domains()
1424 ap_flush_queue(aq); in ap_scan_domains()
1426 ap_queue_init_state(aq); in ap_scan_domains()
1431 spin_unlock_bh(&aq->lock); in ap_scan_domains()