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()
245 static int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_wait() argument
255 dprintk(DBGLVL_CMD, "%s(seqno=%d)\n", __func__, seqno); in saa7164_cmd_wait()
258 if ((dev->cmds[seqno].inuse == 1) && in saa7164_cmd_wait()
259 (dev->cmds[seqno].seqno == seqno)) { in saa7164_cmd_wait()
260 q = &dev->cmds[seqno].wait; in saa7164_cmd_wait()
266 if (dev->cmds[seqno].signalled == 0) { in saa7164_cmd_wait()
270 __func__, seqno, dev->cmds[seqno].signalled); in saa7164_cmd_wait()
279 wait_event_timeout(*q, dev->cmds[seqno].signalled, in saa7164_cmd_wait()
285 saa7164_cmd_timeout_seqno(dev, seqno); in saa7164_cmd_wait()
288 __func__, seqno, r, in saa7164_cmd_wait()
289 dev->cmds[seqno].signalled); in saa7164_cmd_wait()
294 __func__, seqno); in saa7164_cmd_wait()
299 void saa7164_cmd_signal(struct saa7164_dev *dev, u8 seqno) in saa7164_cmd_signal() argument
309 dev->cmds[i].seqno, in saa7164_cmd_signal()
366 command_t.seqno = (u8)ret; in saa7164_cmd_send()
373 __func__, pcommand_t->seqno); in saa7164_cmd_send()
383 saa7164_cmd_free_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
387 saa7164_cmd_timeout_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
398 ret = saa7164_cmd_wait(dev, pcommand_t->seqno); in saa7164_cmd_send()
405 saa7164_cmd_timeout_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
426 __func__, presponse_t->seqno); in saa7164_cmd_send()
435 if (presponse_t->seqno != pcommand_t->seqno) { in saa7164_cmd_send()
439 presponse_t->seqno, pcommand_t->seqno); in saa7164_cmd_send()
465 saa7164_cmd_free_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()
555 saa7164_cmd_free_seqno(dev, pcommand_t->seqno); in saa7164_cmd_send()