• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/ocs_fc/

Lines Matching defs:vport

520 					 * If this is a vport, logout of the fabric controller so that it
521 * deletes the vport on the switch.
528 ocs_log_debug(ocs,"[%s] sport shutdown vport,sending logo to node\n",
621 ocs_log_debug(ocs, "vport: letting f/w select WWN\n");
625 ocs_log_debug(ocs, "vport: hard coding port id: %x\n", sport->fc_id);
796 /* Update the vport (if its not the physical sport) parameters */
913 * Use the vport specification to find the associated vports and start them.
924 ocs_vport_spec_t *vport;
930 ocs_list_foreach_safe(&xport->vport_list, vport, next) {
931 if (vport->domain_instance == domain->instance_index &&
932 vport->sport == NULL) {
933 /* If role not set, skip this vport */
934 if (!(vport->enable_ini || vport->enable_tgt)) {
939 vport->sport = sport = ocs_sport_alloc(domain, vport->wwpn, vport->wwnn, vport->fc_id,
940 vport->enable_ini, vport->enable_tgt);
945 sport->tgt_data = vport->tgt_data;
946 sport->ini_data = vport->ini_data;
959 * @brief Clear the sport reference in the vport specification.
962 * Clear the sport pointer on the vport specification when the vport is torn down. This allows it to be
972 ocs_vport_spec_t *vport;
975 ocs_list_foreach(&xport->vport_list, vport) {
976 if (vport->sport == sport) {
977 vport->sport = NULL;
1001 * @param restore_vport If TRUE, then the vport will be re-created automatically
1024 /* Create a vport spec if we need to recreate this vport after a link up event */
1027 ocs_log_test(domain->ocs, "failed to create vport object entry\n");
1051 ocs_sport_vport_alloc(ocs_domain_t *domain, ocs_vport_spec_t *vport)
1059 ocs_assert((vport->sport == NULL), -1);
1062 vport->sport = sport = ocs_sport_alloc(domain, vport->wwpn, vport->wwnn, UINT32_MAX, vport->enable_ini, vport->enable_tgt);
1069 sport->tgt_data = vport->tgt_data;
1070 sport->ini_data = vport->tgt_data;
1099 ocs_vport_spec_t *vport;
1113 ocs_list_foreach_safe(&xport->vport_list, vport, next) {
1114 if ((vport->domain_instance == instance) &&
1115 (vport->wwpn == wwpn) && (vport->wwnn == wwnn)) {
1116 vport->sport = NULL;
1157 ocs_vport_spec_t *vport;
1161 ocs_list_foreach_safe(&xport->vport_list, vport, next) {
1162 ocs_list_remove(&xport->vport_list, vport);
1163 ocs_free(ocs, vport, sizeof(*vport));
1480 ocs_vport_spec_t *vport;
1483 ocs_list_foreach(&xport->vport_list, vport) {
1484 if (vport->sport == sport) {
1485 vport->wwnn = sport->wwnn;
1486 vport->wwpn = sport->wwpn;
1487 vport->tgt_data = sport->tgt_data;
1488 vport->ini_data = sport->ini_data;
1496 * @brief Create a saved vport entry.
1498 * A saved vport entry is added to the vport list, which is restored following
1506 * @param enable_ini TRUE if vport is to be an initiator port.
1507 * @param enable_tgt TRUE if vport is to be a target port.
1518 ocs_vport_spec_t *vport;
1520 /* walk the ocs_vport_list and return failure if a valid(vport with non zero WWPN and WWNN) vport entry
1522 ocs_list_foreach(&xport->vport_list, vport) {
1523 if ((wwpn && (vport->wwpn == wwpn)) && (wwnn && (vport->wwnn == wwnn))) {
1530 vport = ocs_malloc(ocs, sizeof(*vport), OCS_M_ZERO | OCS_M_NOWAIT);
1531 if (vport == NULL) {
1536 vport->wwnn = wwnn;
1537 vport->wwpn = wwpn;
1538 vport->fc_id = fc_id;
1539 vport->domain_instance = 0; /*TODO: may need to change this */
1540 vport->enable_tgt = enable_tgt;
1541 vport->enable_ini = enable_ini;
1542 vport->tgt_data = tgt_data;
1543 vport->ini_data = ini_data;
1546 ocs_list_add_tail(&xport->vport_list, vport);