Lines Matching refs:port
23 int port; member
31 struct port_list *port; member
42 struct port_list *port; member
63 list_add(&conn->list, &conn->port->connections); in pipe_interrupt()
65 complete(&conn->port->done); in pipe_interrupt()
76 static int port_accept(struct port_list *port) in port_accept() argument
81 fd = port_connection(port->fd, socket, &pid); in port_accept()
100 .port = port }); in port_accept()
109 if (atomic_read(&port->wait_count) == 0) { in port_accept()
113 list_add(&conn->list, &port->pending); in port_accept()
130 struct port_list *port; in port_work_proc() local
136 port = list_entry(ele, struct port_list, list); in port_work_proc()
137 if (!port->has_connection) in port_work_proc()
140 reactivate_fd(port->fd, ACCEPT_IRQ); in port_work_proc()
141 while (port_accept(port)) in port_work_proc()
143 port->has_connection = 0; in port_work_proc()
152 struct port_list *port = data; in port_interrupt() local
154 port->has_connection = 1; in port_interrupt()
162 struct port_list *port; in port_data() local
168 port = list_entry(ele, struct port_list, list); in port_data()
169 if (port->port == port_num) in port_data()
172 port = kmalloc(sizeof(struct port_list), GFP_KERNEL); in port_data()
173 if (port == NULL) { in port_data()
186 IRQF_SHARED, "port", port)) { in port_data()
191 *port = ((struct port_list) in port_data()
192 { .list = LIST_HEAD_INIT(port->list), in port_data()
195 .port = port_num, in port_data()
197 .pending = LIST_HEAD_INIT(port->pending), in port_data()
198 .connections = LIST_HEAD_INIT(port->connections) }); in port_data()
199 spin_lock_init(&port->lock); in port_data()
200 init_completion(&port->done); in port_data()
201 list_add(&port->list, &ports); in port_data()
210 *dev = ((struct port_dev) { .port = port, in port_data()
218 kfree(port); in port_data()
228 struct port_list *port = dev->port; in port_wait() local
231 atomic_inc(&port->wait_count); in port_wait()
234 if (wait_for_completion_interruptible(&port->done)) in port_wait()
237 spin_lock(&port->lock); in port_wait()
239 conn = list_entry(port->connections.next, struct connection, in port_wait()
242 spin_unlock(&port->lock); in port_wait()
268 atomic_dec(&port->wait_count); in port_wait()
295 struct port_list *port; in free_port() local
298 port = list_entry(ele, struct port_list, list); in free_port()
299 free_irq_by_fd(port->fd); in free_port()
300 os_close_file(port->fd); in free_port()