• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/media/video/saa7164/

Lines Matching refs:msg

89 	dprintk(DBGLVL_BUS, "Dumping msg structure:\n");
111 int saa7164_bus_set(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf)
118 if (!msg) {
119 printk(KERN_ERR "%s() !msg\n", __func__);
125 msg->size = cpu_to_le16(msg->size);
126 msg->command = cpu_to_le16(msg->command);
127 msg->controlselector = cpu_to_le16(msg->controlselector);
129 if (msg->size > dev->bus.m_wMaxReqSize) {
135 if ((msg->size > 0) && (buf == 0)) {
143 bytes_to_write = sizeof(*msg) + msg->size;
166 /* Process the msg and write the content onto the bus */
213 dprintk(DBGLVL_BUS, "%s() sizeof(*msg) = %d\n", __func__,
214 (u32)sizeof(*msg));
216 if (space_rem < sizeof(*msg)) {
219 /* Split the msg into pieces as the ring wraps */
220 memcpy(bus->m_pdwSetRing + curr_swp, msg, space_rem);
221 memcpy(bus->m_pdwSetRing, (u8 *)msg + space_rem,
222 sizeof(*msg) - space_rem);
224 memcpy(bus->m_pdwSetRing + sizeof(*msg) - space_rem,
225 buf, msg->size);
227 } else if (space_rem == sizeof(*msg)) {
231 memcpy(bus->m_pdwSetRing + curr_swp, msg, sizeof(*msg));
232 memcpy(bus->m_pdwSetRing, buf, msg->size);
236 memcpy(bus->m_pdwSetRing + curr_swp, msg, sizeof(*msg));
237 if (msg->size > 0) {
239 sizeof(*msg), buf, space_rem -
240 sizeof(*msg));
242 space_rem - sizeof(*msg),
253 memcpy(bus->m_pdwSetRing + curr_swp, msg, sizeof(*msg));
254 memcpy(bus->m_pdwSetRing + curr_swp + sizeof(*msg), buf,
255 msg->size);
282 int saa7164_bus_get(struct saa7164_dev *dev, tmComResInfo_t* msg, void *buf,
291 if (msg == 0)
294 if (msg->size > dev->bus.m_wMaxReqSize) {
300 if ((peekonly == 0) && (msg->size > 0) && (buf == 0)) {
302 "%s() Missing msg buf, size should be %d bytes\n",
303 __func__, msg->size);
309 /* Peek the bus to see if a msg exists, if it's not what we're expecting
321 bytes_to_read = sizeof(*msg);
358 memcpy(msg, &msg_tmp, sizeof(*msg));
363 if ((msg_tmp.id != msg->id) || (msg_tmp.command != msg->command) ||
364 (msg_tmp.controlselector != msg->controlselector) ||
365 (msg_tmp.seqno != msg->seqno) || (msg_tmp.size != msg->size)) {
367 printk(KERN_ERR "%s() Unexpected msg miss-match\n", __func__);
368 saa7164_bus_dumpmsg(dev, msg, buf);
375 buf_size = msg->size;
377 bytes_to_read = sizeof(*msg) + msg->size;
388 printk(KERN_ERR "%s() Invalid bus state, missing msg "
402 if (space_rem < sizeof(*msg)) {
403 /* msg wraps around the ring */
404 memcpy(msg, bus->m_pdwGetRing + curr_grp, space_rem);
405 memcpy((u8 *)msg + space_rem, bus->m_pdwGetRing,
406 sizeof(*msg) - space_rem);
408 memcpy(buf, bus->m_pdwGetRing + sizeof(*msg) -
411 } else if (space_rem == sizeof(*msg)) {
412 memcpy(msg, bus->m_pdwGetRing + curr_grp, sizeof(*msg));
417 memcpy(msg, bus->m_pdwGetRing + curr_grp, sizeof(*msg));
420 sizeof(*msg), space_rem - sizeof(*msg));
421 memcpy(buf + space_rem - sizeof(*msg),
430 memcpy(msg, bus->m_pdwGetRing + curr_grp, sizeof(*msg));
432 memcpy(buf, bus->m_pdwGetRing + curr_grp + sizeof(*msg),
440 msg->size = le16_to_cpu(msg->size);
441 msg->command = le16_to_cpu(msg->command);
442 msg->controlselector = le16_to_cpu(msg->controlselector);