Lines Matching refs:aq
393 struct ap_queue *aq = from_timer(aq, t, timeout); in ap_request_timeout() local
395 spin_lock_bh(&aq->lock); in ap_request_timeout()
396 ap_wait(ap_sm_event(aq, AP_SM_EVENT_TIMEOUT)); in ap_request_timeout()
397 spin_unlock_bh(&aq->lock); in ap_request_timeout()
431 struct ap_queue *aq; in ap_tasklet_fn() local
442 hash_for_each(ap_queues, bkt, aq, hnode) { in ap_tasklet_fn()
443 spin_lock_bh(&aq->lock); in ap_tasklet_fn()
444 wait = min(wait, ap_sm_event_loop(aq, AP_SM_EVENT_POLL)); in ap_tasklet_fn()
445 spin_unlock_bh(&aq->lock); in ap_tasklet_fn()
455 struct ap_queue *aq; in ap_pending_requests() local
458 hash_for_each(ap_queues, bkt, aq, hnode) { in ap_pending_requests()
459 if (aq->queue_count == 0) in ap_pending_requests()
752 struct ap_queue *aq; in ap_get_qdev() local
755 hash_for_each(ap_queues, bkt, aq, hnode) { in ap_get_qdev()
756 if (aq->qid == qid) { in ap_get_qdev()
757 get_device(&aq->ap_dev.device); in ap_get_qdev()
759 return aq; in ap_get_qdev()
1317 struct ap_queue *aq; in ap_scan_domains() local
1331 aq = dev ? to_ap_queue(dev) : NULL; in ap_scan_domains()
1343 if (aq) { in ap_scan_domains()
1353 if (!aq) { in ap_scan_domains()
1354 aq = ap_queue_create(qid, ac->ap_dev.device_type); in ap_scan_domains()
1355 if (!aq) { in ap_scan_domains()
1360 aq->card = ac; in ap_scan_domains()
1361 aq->config = !decfg; in ap_scan_domains()
1362 dev = &aq->ap_dev.device; in ap_scan_domains()
1384 spin_lock_bh(&aq->lock); in ap_scan_domains()
1385 if (decfg && aq->config) { in ap_scan_domains()
1387 aq->config = false; in ap_scan_domains()
1388 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) { in ap_scan_domains()
1389 aq->dev_state = AP_DEV_STATE_ERROR; in ap_scan_domains()
1390 aq->last_err_rc = AP_RESPONSE_DECONFIGURED; in ap_scan_domains()
1392 spin_unlock_bh(&aq->lock); in ap_scan_domains()
1396 ap_flush_queue(aq); in ap_scan_domains()
1399 if (!decfg && !aq->config) { in ap_scan_domains()
1401 aq->config = true; in ap_scan_domains()
1402 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) { in ap_scan_domains()
1403 aq->dev_state = AP_DEV_STATE_OPERATING; in ap_scan_domains()
1404 aq->sm_state = AP_SM_STATE_RESET_START; in ap_scan_domains()
1406 spin_unlock_bh(&aq->lock); in ap_scan_domains()
1412 if (!decfg && aq->dev_state == AP_DEV_STATE_ERROR) { in ap_scan_domains()
1413 spin_unlock_bh(&aq->lock); in ap_scan_domains()
1415 ap_flush_queue(aq); in ap_scan_domains()
1417 ap_queue_init_state(aq); in ap_scan_domains()
1422 spin_unlock_bh(&aq->lock); in ap_scan_domains()