Lines Matching refs:cmds

18 		if (dev->cmds[i].inuse == 0) {  in saa7164_cmd_alloc_seqno()
19 dev->cmds[i].inuse = 1; in saa7164_cmd_alloc_seqno()
20 dev->cmds[i].signalled = 0; in saa7164_cmd_alloc_seqno()
21 dev->cmds[i].timeout = 0; in saa7164_cmd_alloc_seqno()
22 ret = dev->cmds[i].seqno; in saa7164_cmd_alloc_seqno()
34 if ((dev->cmds[seqno].inuse == 1) && in saa7164_cmd_free_seqno()
35 (dev->cmds[seqno].seqno == seqno)) { in saa7164_cmd_free_seqno()
36 dev->cmds[seqno].inuse = 0; in saa7164_cmd_free_seqno()
37 dev->cmds[seqno].signalled = 0; in saa7164_cmd_free_seqno()
38 dev->cmds[seqno].timeout = 0; in saa7164_cmd_free_seqno()
46 if ((dev->cmds[seqno].inuse == 1) && in saa7164_cmd_timeout_seqno()
47 (dev->cmds[seqno].seqno == seqno)) { in saa7164_cmd_timeout_seqno()
48 dev->cmds[seqno].timeout = 1; in saa7164_cmd_timeout_seqno()
58 if ((dev->cmds[seqno].inuse == 1) && in saa7164_cmd_timeout_get()
59 (dev->cmds[seqno].seqno == seqno)) { in saa7164_cmd_timeout_get()
60 ret = dev->cmds[seqno].timeout; in saa7164_cmd_timeout_get()
86 q = &dev->cmds[tRsp.seqno].wait; in saa7164_irq_dequeue()
93 dev->cmds[tRsp.seqno].signalled = 1; in saa7164_irq_dequeue()
139 q = &dev->cmds[tRsp.seqno].wait; in saa7164_cmd_dequeue()
166 dev->cmds[tRsp.seqno].signalled = 1; in saa7164_cmd_dequeue()
178 u32 cmds; in saa7164_cmd_set() local
187 mutex_lock(&dev->cmds[msg->id].lock); in saa7164_cmd_set()
190 cmds = size / bus->m_wMaxReqSize; in saa7164_cmd_set()
192 cmds -= 1; in saa7164_cmd_set()
197 for (idx = 0; idx < cmds; idx++) { in saa7164_cmd_set()
237 mutex_unlock(&dev->cmds[msg->id].lock); in saa7164_cmd_set()
257 if ((dev->cmds[seqno].inuse == 1) && in saa7164_cmd_wait()
258 (dev->cmds[seqno].seqno == seqno)) { in saa7164_cmd_wait()
259 q = &dev->cmds[seqno].wait; in saa7164_cmd_wait()
265 if (dev->cmds[seqno].signalled == 0) { in saa7164_cmd_wait()
269 __func__, seqno, dev->cmds[seqno].signalled); in saa7164_cmd_wait()
278 wait_event_timeout(*q, dev->cmds[seqno].signalled, in saa7164_cmd_wait()
288 dev->cmds[seqno].signalled); in saa7164_cmd_wait()
305 if (dev->cmds[i].inuse == 1) { in saa7164_cmd_signal()
308 dev->cmds[i].seqno, in saa7164_cmd_signal()
309 dev->cmds[i].signalled, in saa7164_cmd_signal()
310 dev->cmds[i].timeout); in saa7164_cmd_signal()
315 if ((dev->cmds[i].inuse == 1) && ((i == 0) || in saa7164_cmd_signal()
316 (dev->cmds[i].signalled) || (dev->cmds[i].timeout))) { in saa7164_cmd_signal()
319 dev->cmds[i].signalled = 1; in saa7164_cmd_signal()
320 wake_up(&dev->cmds[i].wait); in saa7164_cmd_signal()