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