Lines Matching refs:chan

328 int iop_listen(uint iop_num, uint chan,  in iop_listen()  argument
333 if (chan >= NUM_IOP_CHAN) return -EINVAL; in iop_listen()
334 if (iop_listeners[iop_num][chan].handler && handler) return -EINVAL; in iop_listen()
335 iop_listeners[iop_num][chan].devname = devname; in iop_listen()
336 iop_listeners[iop_num][chan].handler = handler; in iop_listen()
349 int chan = msg->channel; in iop_complete_message() local
363 IOP_ADDR_RECV_STATE + chan, IOP_MSG_COMPLETE); in iop_complete_message()
394 static void iop_handle_send(uint iop_num, uint chan) in iop_handle_send() argument
401 printk("iop_handle_send: iop %d channel %d\n", iop_num, chan); in iop_handle_send()
404 iop_writeb(iop, IOP_ADDR_SEND_STATE + chan, IOP_MSG_IDLE); in iop_handle_send()
406 if (!(msg = iop_send_queue[iop_num][chan])) return; in iop_handle_send()
409 offset = IOP_ADDR_SEND_MSG + (chan * IOP_MSG_LEN); in iop_handle_send()
418 iop_send_queue[iop_num][chan] = msg; in iop_handle_send()
427 static void iop_handle_recv(uint iop_num, uint chan) in iop_handle_recv() argument
434 printk("iop_handle_recv: iop %d channel %d\n", iop_num, chan); in iop_handle_recv()
439 msg->channel = chan; in iop_handle_recv()
441 msg->handler = iop_listeners[iop_num][chan].handler; in iop_handle_recv()
443 offset = IOP_ADDR_RECV_MSG + (chan * IOP_MSG_LEN); in iop_handle_recv()
449 iop_writeb(iop, IOP_ADDR_RECV_STATE + chan, IOP_MSG_RCVD); in iop_handle_recv()
458 printk("iop_handle_recv: unclaimed message on iop %d channel %d\n", iop_num, chan); in iop_handle_recv()
477 int iop_send_message(uint iop_num, uint chan, void *privdata, in iop_send_message() argument
484 if (chan >= NUM_IOP_CHAN) return -EINVAL; in iop_send_message()
493 msg->channel = chan; in iop_send_message()
498 if (!(q = iop_send_queue[iop_num][chan])) { in iop_send_message()
499 iop_send_queue[iop_num][chan] = msg; in iop_send_message()
506 IOP_ADDR_SEND_STATE + chan) == IOP_MSG_IDLE) { in iop_send_message()