Lines Matching refs:port

199 	struct se_port *port;
217 port = lun->lun_sep;
218 if (!port) {
224 if (port->sep_rtpi != rtpi)
307 struct se_port *port = lun->lun_sep;
365 spin_lock_bh(&port->sep_alua_lock);
366 list_add_tail(&deve->alua_port_list, &port->sep_alua_list);
367 spin_unlock_bh(&port->sep_alua_lock);
384 struct se_port *port = lun->lun_sep;
389 * port->sep_alua_list must be removed now before clearing the
396 * port->sep_alua_list. This also means that active UAs and
400 spin_lock_bh(&port->sep_alua_lock);
402 spin_unlock_bh(&port->sep_alua_lock);
462 struct se_port *port, *port_tmp;
464 port = kzalloc(sizeof(struct se_port), GFP_KERNEL);
465 if (!port) {
469 INIT_LIST_HEAD(&port->sep_alua_list);
470 INIT_LIST_HEAD(&port->sep_list);
471 atomic_set(&port->sep_tg_pt_secondary_offline, 0);
472 spin_lock_init(&port->sep_alua_lock);
473 mutex_init(&port->sep_tg_pt_md_mutex);
491 * 1h Relative port 1, historically known as port A
492 * 2h Relative port 2, historically known as port B
493 * 3h to FFFFh Relative port 3 through 65 535
495 port->sep_rtpi = dev->dev_rpti_counter++;
496 if (!port->sep_rtpi)
504 if (port->sep_rtpi == port_tmp->sep_rtpi)
509 return port;
515 struct se_port *port,
522 port->sep_tpg = tpg;
523 port->sep_lun = lun;
524 lun->lun_sep = port;
527 list_add_tail(&port->sep_list, &dev->dev_sep_list);
532 tg_pt_gp_mem = core_alua_allocate_tg_pt_gp_mem(port);
548 port->sep_index = port->sep_rtpi; /* RELATIVE TARGET PORT IDENTIFIER */
554 static void core_release_port(struct se_device *dev, struct se_port *port)
558 * Wait for any port reference for PR ALL_TG_PT=1 operation
562 if (atomic_read(&port->sep_tg_pt_ref_cnt))
566 core_alua_free_tg_pt_gp_mem(port);
568 list_del(&port->sep_list);
570 kfree(port);
579 struct se_port *port;
581 port = core_alloc_port(dev);
582 if (IS_ERR(port))
583 return PTR_ERR(port);
591 core_export_port(dev, tpg, port, lun);
601 struct se_port *port = lun->lun_sep;
611 core_release_port(dev, port);