Lines Matching refs:seqno
22 ret = dev->cmds[i].seqno; in saa7164_cmd_alloc_seqno()
31 static void saa7164_cmd_free_seqno(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_free_seqno() argument
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()
43 static void saa7164_cmd_timeout_seqno(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_timeout_seqno() argument
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()
53 static u32 saa7164_cmd_timeout_get(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_timeout_get() argument
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()
87 timeout = saa7164_cmd_timeout_get(dev, tRsp.seqno); in saa7164_irq_dequeue()
92 __func__, tRsp.seqno); 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()
140 timeout = saa7164_cmd_timeout_get(dev, tRsp.seqno); in saa7164_cmd_dequeue()
158 saa7164_cmd_free_seqno(dev, tRsp.seqno); in saa7164_cmd_dequeue()
165 __func__, tRsp.seqno); in saa7164_cmd_dequeue()
166 dev->cmds[tRsp.seqno].signalled = 1; in saa7164_cmd_dequeue()
244 static int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_wait() argument
254 dprintk(DBGLVL_CMD, "%s(seqno=%d)\n", __func__, seqno); in saa7164_cmd_wait()
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()
284 saa7164_cmd_timeout_seqno(dev, seqno); in saa7164_cmd_wait()
287 __func__, seqno, r, in saa7164_cmd_wait()
288 dev->cmds[seqno].signalled); in saa7164_cmd_wait()
293 __func__, seqno); in saa7164_cmd_wait()
298 void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_signal() argument
308 dev->cmds[i].seqno, in saa7164_cmd_signal()
365 command_t.seqno = (u8)ret; in saa7164_cmd_send()
372 __func__, pcommand_t->seqno); in saa7164_cmd_send()
382 saa7164_cmd_free_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
386 saa7164_cmd_timeout_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
397 ret = saa7164_cmd_wait(dev, pcommand_t->seqno); in saa7164_cmd_send()
404 saa7164_cmd_timeout_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
425 __func__, presponse_t->seqno); in saa7164_cmd_send()
434 if (presponse_t->seqno != pcommand_t->seqno) { in saa7164_cmd_send()
438 presponse_t->seqno, pcommand_t->seqno); in saa7164_cmd_send()
464 saa7164_cmd_free_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
554 saa7164_cmd_free_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()