Lines Matching refs:aq

448 	struct ap_queue *aq = from_timer(aq, t, timeout);
450 spin_lock_bh(&aq->lock);
451 ap_wait(ap_sm_event(aq, AP_SM_EVENT_TIMEOUT));
452 spin_unlock_bh(&aq->lock);
488 struct ap_queue *aq;
499 hash_for_each(ap_queues, bkt, aq, hnode) {
500 spin_lock_bh(&aq->lock);
501 wait = min(wait, ap_sm_event_loop(aq, AP_SM_EVENT_POLL));
502 spin_unlock_bh(&aq->lock);
512 struct ap_queue *aq;
515 hash_for_each(ap_queues, bkt, aq, hnode) {
516 if (aq->queue_count == 0)
657 struct ap_queue *aq = to_ap_queue(&ap_dev->device);
660 if (ap_test_bit(&aq->card->functions, AP_FUNC_ACCEL))
662 else if (ap_test_bit(&aq->card->functions, AP_FUNC_COPRO))
664 else if (ap_test_bit(&aq->card->functions, AP_FUNC_EP11))
989 struct ap_queue *aq;
992 hash_for_each(ap_queues, bkt, aq, hnode) {
993 if (aq->qid == qid) {
994 get_device(&aq->ap_dev.device);
996 return aq;
1807 struct ap_queue *aq;
1823 aq = dev ? to_ap_queue(dev) : NULL;
1849 if (!aq) {
1850 aq = ap_queue_create(qid, ac->ap_dev.device_type);
1851 if (!aq) {
1856 aq->card = ac;
1857 aq->config = !decfg;
1858 aq->chkstop = chkstop;
1859 dev = &aq->ap_dev.device;
1880 ap_queue_init_state(aq);
1887 spin_lock_bh(&aq->lock);
1889 if (chkstop && !aq->chkstop) {
1891 aq->chkstop = true;
1892 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) {
1893 aq->dev_state = AP_DEV_STATE_ERROR;
1894 aq->last_err_rc = AP_RESPONSE_CHECKSTOPPED;
1896 spin_unlock_bh(&aq->lock);
1900 ap_flush_queue(aq);
1902 } else if (!chkstop && aq->chkstop) {
1904 aq->chkstop = false;
1905 if (aq->dev_state > AP_DEV_STATE_UNINITIATED)
1906 _ap_queue_init_state(aq);
1907 spin_unlock_bh(&aq->lock);
1913 if (decfg && aq->config) {
1915 aq->config = false;
1916 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) {
1917 aq->dev_state = AP_DEV_STATE_ERROR;
1918 aq->last_err_rc = AP_RESPONSE_DECONFIGURED;
1920 spin_unlock_bh(&aq->lock);
1923 ap_send_config_uevent(&aq->ap_dev, aq->config);
1925 ap_flush_queue(aq);
1927 } else if (!decfg && !aq->config) {
1929 aq->config = true;
1930 if (aq->dev_state > AP_DEV_STATE_UNINITIATED)
1931 _ap_queue_init_state(aq);
1932 spin_unlock_bh(&aq->lock);
1935 ap_send_config_uevent(&aq->ap_dev, aq->config);
1939 if (!decfg && aq->dev_state == AP_DEV_STATE_ERROR) {
1940 spin_unlock_bh(&aq->lock);
1942 ap_flush_queue(aq);
1944 ap_queue_init_state(aq);
1949 spin_unlock_bh(&aq->lock);
2250 /* set up the AP permissions (ioctls, ap and aq masks) */