• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/um/drivers/

Lines Matching defs:port

19 #include "port.h"
28 int port;
36 struct port_list *port;
47 struct port_list *port;
68 list_add(&conn->list, &conn->port->connections);
70 complete(&conn->port->done);
76 "There are currently no UML consoles waiting for port connections.\n" \
81 static int port_accept(struct port_list *port)
86 fd = port_connection(port->fd, socket, &pid);
105 .port = port });
115 if(atomic_read(&port->wait_count) == 0){
117 printk("No one waiting for port\n");
119 list_add(&conn->list, &port->pending);
137 struct port_list *port;
143 port = list_entry(ele, struct port_list, list);
144 if(!port->has_connection)
146 reactivate_fd(port->fd, ACCEPT_IRQ);
147 while(port_accept(port)) ;
148 port->has_connection = 0;
157 struct port_list *port = data;
159 port->has_connection = 1;
167 struct port_list *port;
173 port = list_entry(ele, struct port_list, list);
174 if(port->port == port_num) goto found;
176 port = kmalloc(sizeof(struct port_list), GFP_KERNEL);
177 if(port == NULL){
178 printk(KERN_ERR "Allocation of port list failed\n");
184 printk(KERN_ERR "binding to port %d failed, errno = %d\n",
190 "port", port)){
191 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
195 *port = ((struct port_list)
196 { .list = LIST_HEAD_INIT(port->list),
199 .port = port_num,
201 .pending = LIST_HEAD_INIT(port->pending),
202 .connections = LIST_HEAD_INIT(port->connections) });
203 spin_lock_init(&port->lock);
204 init_completion(&port->done);
205 list_add(&port->list, &ports);
210 printk(KERN_ERR "Allocation of port device entry failed\n");
214 *dev = ((struct port_dev) { .port = port,
220 kfree(port);
232 struct port_list *port = dev->port;
235 atomic_inc(&port->wait_count);
238 if(wait_for_completion_interruptible(&port->done))
241 spin_lock(&port->lock);
243 conn = list_entry(port->connections.next, struct connection,
246 spin_unlock(&port->lock);
271 atomic_dec(&port->wait_count);
298 struct port_list *port;
301 port = list_entry(ele, struct port_list, list);
302 free_irq_by_fd(port->fd);
303 os_close_file(port->fd);