Lines Matching refs:port

75 	struct inform_port	port[0];
91 struct inform_port *port;
126 static struct inform_group *inform_find(struct inform_port *port,
129 struct rb_node *node = port->table.rb_node;
144 static struct inform_group *inform_insert(struct inform_port *port,
147 struct rb_node **link = &port->table.rb_node;
162 rb_insert_color(&group->node, &port->table);
166 static void deref_port(struct inform_port *port)
168 if (atomic_dec_and_test(&port->refcount))
169 complete(&port->comp);
174 struct inform_port *port = group->port;
177 spin_lock_irqsave(&port->lock, flags);
179 rb_erase(&group->node, &port->table);
180 spin_unlock_irqrestore(&port->lock, flags);
182 deref_port(port);
184 spin_unlock_irqrestore(&port->lock, flags);
210 struct inform_port *port = group->port;
225 ret = ib_sa_informinfo_query(&sa_client, port->dev->device,
226 port->port_num, &inform, 3000, GFP_KERNEL,
237 struct inform_port *port = group->port;
251 ret = ib_sa_informinfo_query(&sa_client, port->dev->device,
252 port->port_num, &inform, 3000, GFP_KERNEL,
451 struct inform_port *port;
459 port = &dev->port[port_num - dev->start_port];
460 spin_lock_irq(&port->lock);
461 group = inform_find(port, __be16_to_cpu(notice->trap.
464 spin_unlock_irq(&port->lock);
469 spin_unlock_irq(&port->lock);
493 static struct inform_group *acquire_group(struct inform_port *port,
499 spin_lock_irqsave(&port->lock, flags);
500 group = inform_find(port, trap_number);
503 spin_unlock_irqrestore(&port->lock, flags);
509 group->port = port;
517 spin_lock_irqsave(&port->lock, flags);
518 cur_group = inform_insert(port, group);
523 atomic_inc(&port->refcount);
526 spin_unlock_irqrestore(&port->lock, flags);
568 member->group = acquire_group(&dev->port[port_num - dev->start_port],
623 static void inform_groups_lost(struct inform_port *port)
629 spin_lock_irqsave(&port->lock, flags);
630 for (node = rb_first(&port->table); node; node = rb_next(node)) {
640 spin_unlock_irqrestore(&port->lock, flags);
655 inform_groups_lost(&dev->port[event->element.port_num -
666 struct inform_port *port;
672 dev = kmalloc(sizeof *dev + device->phys_port_cnt * sizeof *port,
685 port = &dev->port[i];
686 port->dev = dev;
687 port->port_num = dev->start_port + i;
688 spin_lock_init(&port->lock);
689 port->table = RB_ROOT;
690 init_completion(&port->comp);
691 atomic_set(&port->refcount, 1);
704 struct inform_port *port;
715 port = &dev->port[i];
716 deref_port(port);
717 wait_for_completion(&port->comp);